Alembic procedural: fix infinite update loop when modifying Object level properties

This commit is contained in:
Kévin Dietrich 2021-03-07 15:39:01 +01:00
parent 111a77e818
commit ac4d45dbf1
1 changed files with 7 additions and 2 deletions

View File

@ -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;
}