Fix T58118: Make duplicates real does nothing

The issue was caused by transflag set in geometry evaluation
never copied back top original object.

Now we have a dedicated operation which does all sort copy
back to original object, so we don't have to worry about
atomic assignments or what gets set where.

Still need to move boundbox to the same function, but it
needs some careful doublechecking first.
This commit is contained in:
2018-12-04 16:04:10 +01:00
parent e666ee965c
commit cf2e35fcfe
9 changed files with 78 additions and 33 deletions

View File

@@ -579,6 +579,7 @@ void DepsgraphNodeBuilder::build_object(int base_index,
}
/* Create ID node for object and begin init. */
IDDepsNode *id_node = add_id_node(&object->id);
Object *object_cow = get_cow_datablock(object);
id_node->linked_state = linked_state;
if (object == scene_->camera) {
id_node->is_directly_visible = true;
@@ -663,6 +664,13 @@ void DepsgraphNodeBuilder::build_object(int base_index,
DEG_OPCODE_PLACEHOLDER,
"Dupli");
}
/* Syncronization back to original object. */
add_operation_node(&object->id,
DEG_NODE_TYPE_SYNCHRONIZE,
function_bind(BKE_object_synchronize_to_original,
_1,
object_cow),
DEG_OPCODE_SYNCHRONIZE_TO_ORIGINAL);
}
void DepsgraphNodeBuilder::build_object_flags(