diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-03-07 17:39:01 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-03-07 19:16:16 +0300 |
commit | ac4d45dbf156f538d2591b5323a042b4a59692e1 (patch) | |
tree | c71773e7164b3e89009383eb04dea92eb06a6997 | |
parent | 111a77e81827705119fb82f8191a41dd8752a888 (diff) |
Alembic procedural: fix infinite update loop when modifying Object level properties
-rw-r--r-- | intern/cycles/render/alembic.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/intern/cycles/render/alembic.cpp b/intern/cycles/render/alembic.cpp index 627ffe2318a..60e24e7b375 100644 --- a/intern/cycles/render/alembic.cpp +++ b/intern/cycles/render/alembic.cpp @@ -1358,11 +1358,16 @@ void AlembicProcedural::generate(Scene *scene, Progress &progress) } bool need_shader_updates = false; + bool need_data_updates = false; - /* Check for changes in shaders (newly requested attributes). */ foreach (Node *object_node, objects) { AlembicObject *object = static_cast<AlembicObject *>(object_node); + if (object->is_modified()) { + need_data_updates = true; + } + + /* Check for changes in shaders (e.g. newly requested attributes). */ foreach (Node *shader_node, object->get_used_shaders()) { Shader *shader = static_cast<Shader *>(shader_node); @@ -1373,7 +1378,7 @@ void AlembicProcedural::generate(Scene *scene, Progress &progress) } } - if (!is_modified() && !need_shader_updates) { + if (!is_modified() && !need_shader_updates && !need_data_updates) { return; } |