diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index f9ea7fa666..6a6f624c8f 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2107,7 +2107,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo } return false; }); - EntityTree::setGetUnscaledDimensionsForEntityIDOperator([this](const QUuid& id) { + EntityTree::setGetUnscaledDimensionsForIDOperator([this](const QUuid& id) { if (_aboutToQuit) { return glm::vec3(1.0f); } diff --git a/libraries/entities-renderer/src/RenderableMaterialEntityItem.cpp b/libraries/entities-renderer/src/RenderableMaterialEntityItem.cpp index af121f2957..7fa3a57804 100644 --- a/libraries/entities-renderer/src/RenderableMaterialEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableMaterialEntityItem.cpp @@ -396,7 +396,8 @@ void MaterialEntityRenderer::applyMaterial(const TypedEntityPointer& entity) { graphics::MaterialLayer materialLayer = graphics::MaterialLayer(material, _priority); - if (auto procedural = std::static_pointer_cast(material)) { + if (material->isProcedural()) { + auto procedural = std::static_pointer_cast(material); procedural->setBoundOperator([this] { return getBound(); }); entity->setHasVertexShader(procedural->hasVertexShader()); } diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index 01962bb79d..c43b543125 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -3154,7 +3154,7 @@ std::function EntityTree::_getEntityObjectOperator = nul std::function EntityTree::_textSizeOperator = nullptr; std::function EntityTree::_areEntityClicksCapturedOperator = nullptr; std::function EntityTree::_emitScriptEventOperator = nullptr; -std::function EntityTree::_getUnscaledDimensionsForEntityIDOperator = nullptr; +std::function EntityTree::_getUnscaledDimensionsForIDOperator = nullptr; QObject* EntityTree::getEntityObject(const QUuid& id) { if (_getEntityObjectOperator) { @@ -3183,9 +3183,9 @@ void EntityTree::emitScriptEvent(const QUuid& id, const QVariant& message) { } } -glm::vec3 EntityTree::getUnscaledDimensionsForEntityID(const QUuid& id) { - if (_getUnscaledDimensionsForEntityIDOperator) { - return _getUnscaledDimensionsForEntityIDOperator(id); +glm::vec3 EntityTree::getUnscaledDimensionsForID(const QUuid& id) { + if (_getUnscaledDimensionsForIDOperator) { + return _getUnscaledDimensionsForIDOperator(id); } return glm::vec3(1.0f); } diff --git a/libraries/entities/src/EntityTree.h b/libraries/entities/src/EntityTree.h index 4c942bf40a..3662f6acf0 100644 --- a/libraries/entities/src/EntityTree.h +++ b/libraries/entities/src/EntityTree.h @@ -273,8 +273,8 @@ public: static void setEmitScriptEventOperator(std::function emitScriptEventOperator) { _emitScriptEventOperator = emitScriptEventOperator; } static void emitScriptEvent(const QUuid& id, const QVariant& message); - static void setGetUnscaledDimensionsForEntityIDOperator(std::function getUnscaledDimensionsForEntityIDOperator) { _getUnscaledDimensionsForEntityIDOperator = getUnscaledDimensionsForEntityIDOperator; } - static glm::vec3 getUnscaledDimensionsForEntityID(const QUuid& id); + static void setGetUnscaledDimensionsForIDOperator(std::function getUnscaledDimensionsForIDOperator) { _getUnscaledDimensionsForIDOperator = getUnscaledDimensionsForIDOperator; } + static glm::vec3 getUnscaledDimensionsForID(const QUuid& id); std::map getNamedPaths() const { return _namedPaths; } @@ -392,7 +392,7 @@ private: static std::function _textSizeOperator; static std::function _areEntityClicksCapturedOperator; static std::function _emitScriptEventOperator; - static std::function _getUnscaledDimensionsForEntityIDOperator; + static std::function _getUnscaledDimensionsForIDOperator; std::vector _staleProxies; diff --git a/libraries/entities/src/MaterialEntityItem.cpp b/libraries/entities/src/MaterialEntityItem.cpp index 22143e88ba..73bebfc403 100644 --- a/libraries/entities/src/MaterialEntityItem.cpp +++ b/libraries/entities/src/MaterialEntityItem.cpp @@ -293,7 +293,7 @@ void MaterialEntityItem::setHasVertexShader(bool hasVertexShader) { if (hasVertexShader && !prevHasVertexShader) { setLocalPosition(glm::vec3(0.0f)); setLocalOrientation(glm::quat()); - setUnscaledDimensions(EntityTree::getUnscaledDimensionsForEntityID(getParentID())); + setUnscaledDimensions(EntityTree::getUnscaledDimensionsForID(getParentID())); } else if (!hasVertexShader && prevHasVertexShader) { setUnscaledDimensions(_desiredDimensions); }