Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
| Show First 20 Lines • Show All 588 Lines • ▼ Show 20 Lines | void DepsgraphNodeBuilder::build_object(int base_index, | ||||
| if (scene_ != nullptr && object == scene_->camera) { | if (scene_ != nullptr && object == scene_->camera) { | ||||
| id_node->is_directly_visible = true; | id_node->is_directly_visible = true; | ||||
| } | } | ||||
| else { | else { | ||||
| id_node->is_directly_visible = is_visible; | id_node->is_directly_visible = is_visible; | ||||
| } | } | ||||
| id_node->has_base |= (base_index != -1); | id_node->has_base |= (base_index != -1); | ||||
| /* Various flags, flushing from bases/collections. */ | /* Various flags, flushing from bases/collections. */ | ||||
| build_object_flags(base_index, object, linked_state); | build_object_from_layer(base_index, object, linked_state); | ||||
| /* Transform. */ | /* Transform. */ | ||||
| build_object_transform(object); | build_object_transform(object); | ||||
| /* Parent. */ | /* Parent. */ | ||||
| if (object->parent != nullptr) { | if (object->parent != nullptr) { | ||||
| build_object(-1, object->parent, DEG_ID_LINKED_INDIRECTLY, is_visible); | build_object(-1, object->parent, DEG_ID_LINKED_INDIRECTLY, is_visible); | ||||
| } | } | ||||
| /* Modifiers. */ | /* Modifiers. */ | ||||
| if (object->modifiers.first != nullptr) { | if (object->modifiers.first != nullptr) { | ||||
| ▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | void DepsgraphNodeBuilder::build_object(int base_index, | ||||
| } | } | ||||
| /* Synchronization back to original object. */ | /* Synchronization back to original object. */ | ||||
| add_operation_node(&object->id, | add_operation_node(&object->id, | ||||
| NodeType::SYNCHRONIZATION, | NodeType::SYNCHRONIZATION, | ||||
| OperationCode::SYNCHRONIZE_TO_ORIGINAL, | OperationCode::SYNCHRONIZE_TO_ORIGINAL, | ||||
| function_bind(BKE_object_sync_to_original, _1, object_cow)); | function_bind(BKE_object_sync_to_original, _1, object_cow)); | ||||
| } | } | ||||
| void DepsgraphNodeBuilder::build_object_from_layer(int base_index, | |||||
| Object *object, | |||||
| eDepsNode_LinkedState_Type linked_state) | |||||
| { | |||||
| OperationNode *entry_node = add_operation_node( | |||||
| &object->id, NodeType::OBJECT_FROM_LAYER, OperationCode::OBJECT_FROM_LAYER_ENTRY); | |||||
| entry_node->set_as_entry(); | |||||
| OperationNode *exit_node = add_operation_node( | |||||
| &object->id, NodeType::OBJECT_FROM_LAYER, OperationCode::OBJECT_FROM_LAYER_EXIT); | |||||
| exit_node->set_as_exit(); | |||||
| build_object_flags(base_index, object, linked_state); | |||||
| } | |||||
| void DepsgraphNodeBuilder::build_object_flags(int base_index, | void DepsgraphNodeBuilder::build_object_flags(int base_index, | ||||
| Object *object, | Object *object, | ||||
| eDepsNode_LinkedState_Type linked_state) | eDepsNode_LinkedState_Type linked_state) | ||||
| { | { | ||||
| if (base_index == -1) { | if (base_index == -1) { | ||||
| return; | return; | ||||
| } | } | ||||
| Scene *scene_cow = get_cow_datablock(scene_); | Scene *scene_cow = get_cow_datablock(scene_); | ||||
| ▲ Show 20 Lines • Show All 1,215 Lines • Show Last 20 Lines | |||||