diff options
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 35bf7beda41..a05c982b367 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -384,6 +384,23 @@ Object *BlenderSync::sync_object(BL::Object& b_parent, object_updated = true; } + /* sync the asset name for Cryptomatte */ + BL::Object parent = b_ob.parent(); + ustring parent_name; + if(parent) { + while(parent.parent()) { + parent = parent.parent(); + } + parent_name = parent.name(); + } + else { + parent_name = b_ob.name(); + } + if(object->asset_name != parent_name) { + object->asset_name = parent_name; + object_updated = true; + } + /* object sync * transform comparison should not be needed, but duplis don't work perfect * in the depsgraph and may not signal changes, so this is a workaround */ @@ -404,8 +421,8 @@ Object *BlenderSync::sync_object(BL::Object& b_parent, if(scene->need_motion() == Scene::MOTION_BLUR) { motion_steps = object_motion_steps(b_parent, b_ob); + mesh->motion_steps = motion_steps; if(motion_steps && object_use_deform_motion(b_parent, b_ob)) { - mesh->motion_steps = motion_steps; mesh->use_motion_blur = true; } } |