diff options
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
9 files changed, 3 insertions, 242 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc index b2e136c3d3b..990021dc29b 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder.cc @@ -125,10 +125,6 @@ bool DepsgraphBuilder::check_pchan_has_bbone(Object *object, const bPoseChannel bool DepsgraphBuilder::check_pchan_has_bbone_segments(Object *object, const bPoseChannel *pchan) { - /* Proxies don't have BONE_SEGMENTS */ - if (ID_IS_LINKED(object) && object->proxy_from != nullptr) { - return false; - } return check_pchan_has_bbone(object, pchan); } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 79d674e8415..b886d5a5b9a 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -726,9 +726,6 @@ void DepsgraphNodeBuilder::build_object(int base_index, eDepsNode_LinkedState_Type linked_state, bool is_visible) { - if (object->proxy != nullptr) { - object->proxy->proxy_from = object; - } const bool has_object = built_map_.checkIsBuiltAndTag(object); /* When there is already object in the dependency graph accumulate visibility an linked state @@ -819,9 +816,6 @@ void DepsgraphNodeBuilder::build_object(int base_index, (object->pd->tex != nullptr)) { build_texture(object->pd->tex); } - /* Proxy object to copy from. */ - build_object_proxy_from(object, is_visible); - build_object_proxy_group(object, is_visible); /* Object dupligroup. */ if (object->instance_collection != nullptr) { build_object_instance_collection(object, is_visible); @@ -875,22 +869,6 @@ void DepsgraphNodeBuilder::build_object_flags(int base_index, }); } -void DepsgraphNodeBuilder::build_object_proxy_from(Object *object, bool is_object_visible) -{ - if (object->proxy_from == nullptr) { - return; - } - build_object(-1, object->proxy_from, DEG_ID_LINKED_INDIRECTLY, is_object_visible); -} - -void DepsgraphNodeBuilder::build_object_proxy_group(Object *object, bool is_object_visible) -{ - if (object->proxy_group == nullptr) { - return; - } - build_object(-1, object->proxy_group, DEG_ID_LINKED_INDIRECTLY, is_object_visible); -} - void DepsgraphNodeBuilder::build_object_instance_collection(Object *object, bool is_object_visible) { if (object->instance_collection == nullptr) { @@ -922,12 +900,7 @@ void DepsgraphNodeBuilder::build_object_data(Object *object) build_object_data_geometry(object); break; case OB_ARMATURE: - if (ID_IS_LINKED(object) && object->proxy_from != nullptr) { - build_proxy_rig(object); - } - else { - build_rig(object); - } + build_rig(object); break; case OB_LAMP: build_object_data_light(object); @@ -1183,12 +1156,6 @@ void DepsgraphNodeBuilder::build_driver_variables(ID *id, FCurve *fcurve) } build_id(dtar->id); build_driver_id_property(dtar->id, dtar->rna_path); - /* Corresponds to dtar_id_ensure_proxy_from(). */ - if ((GS(dtar->id->name) == ID_OB) && (((Object *)dtar->id)->proxy_from != nullptr)) { - Object *proxy_from = ((Object *)dtar->id)->proxy_from; - build_id(&proxy_from->id); - build_driver_id_property(&proxy_from->id, dtar->rna_path); - } } DRIVER_TARGETS_LOOPER_END; } diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h index a1db4aaf693..6e319383478 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h @@ -184,8 +184,6 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder { Object *object, eDepsNode_LinkedState_Type linked_state, bool is_visible); - virtual void build_object_proxy_from(Object *object, bool is_object_visible); - virtual void build_object_proxy_group(Object *object, bool is_object_visible); virtual void build_object_instance_collection(Object *object, bool is_object_visible); virtual void build_object_from_layer(int base_index, Object *object, @@ -232,7 +230,6 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder { virtual void build_ik_pose(Object *object, bPoseChannel *pchan, bConstraint *con); virtual void build_splineik_pose(Object *object, bPoseChannel *pchan, bConstraint *con); virtual void build_rig(Object *object); - virtual void build_proxy_rig(Object *object); virtual void build_armature(bArmature *armature); virtual void build_armature_bones(ListBase *bones); virtual void build_shapekeys(Key *key); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc index e8dda7b8de4..0e196450f60 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -306,72 +306,4 @@ void DepsgraphNodeBuilder::build_rig(Object *object) } } -void DepsgraphNodeBuilder::build_proxy_rig(Object *object) -{ - bArmature *armature = (bArmature *)object->data; - OperationNode *op_node; - Object *object_cow = get_cow_datablock(object); - /* Sanity check. */ - BLI_assert(object->pose != nullptr); - /* Armature. */ - build_armature(armature); - /* speed optimization for animation lookups */ - BKE_pose_channels_hash_ensure(object->pose); - if (object->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) { - BKE_pose_update_constraint_flags(object->pose); - } - op_node = add_operation_node( - &object->id, - NodeType::EVAL_POSE, - OperationCode::POSE_INIT, - [object_cow](::Depsgraph *depsgraph) { BKE_pose_eval_proxy_init(depsgraph, object_cow); }); - op_node->set_as_entry(); - - int pchan_index = 0; - LISTBASE_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) { - op_node = add_operation_node( - &object->id, NodeType::BONE, pchan->name, OperationCode::BONE_LOCAL); - op_node->set_as_entry(); - /* Bone is ready for solvers. */ - add_operation_node(&object->id, NodeType::BONE, pchan->name, OperationCode::BONE_READY); - /* Bone is fully evaluated. */ - op_node = add_operation_node(&object->id, - NodeType::BONE, - pchan->name, - OperationCode::BONE_DONE, - [object_cow, pchan_index](::Depsgraph *depsgraph) { - BKE_pose_eval_proxy_copy_bone( - depsgraph, object_cow, pchan_index); - }); - op_node->set_as_exit(); - - /* Custom properties. */ - if (pchan->prop != nullptr) { - build_idproperties(pchan->prop); - add_operation_node( - &object->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EVAL, nullptr, pchan->name); - } - - /* Custom shape. */ - if (pchan->custom != nullptr) { - /* NOTE: The relation builder will ensure visibility of the custom shape object. */ - build_object(-1, pchan->custom, DEG_ID_LINKED_INDIRECTLY, false); - } - - pchan_index++; - } - op_node = add_operation_node(&object->id, - NodeType::EVAL_POSE, - OperationCode::POSE_CLEANUP, - [object_cow](::Depsgraph *depsgraph) { - BKE_pose_eval_proxy_cleanup(depsgraph, object_cow); - }); - op_node = add_operation_node( - &object->id, - NodeType::EVAL_POSE, - OperationCode::POSE_DONE, - [object_cow](::Depsgraph *depsgraph) { BKE_pose_eval_proxy_done(depsgraph, object_cow); }); - op_node->set_as_exit(); -} - } // namespace blender::deg diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index cb43ef685d4..d346fcf0f94 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -787,9 +787,6 @@ void DepsgraphRelationBuilder::build_object(Object *object) (object->pd->tex != nullptr)) { build_texture(object->pd->tex); } - /* Proxy object to copy from. */ - build_object_proxy_from(object); - build_object_proxy_group(object); /* Object dupligroup. */ if (object->instance_collection != nullptr) { build_collection(nullptr, object, object->instance_collection); @@ -804,31 +801,6 @@ void DepsgraphRelationBuilder::build_object(Object *object) build_parameters(&object->id); } -void DepsgraphRelationBuilder::build_object_proxy_from(Object *object) -{ - if (object->proxy_from == nullptr) { - return; - } - /* Object is linked here (comes from the library). */ - build_object(object->proxy_from); - ComponentKey ob_transform_key(&object->proxy_from->id, NodeType::TRANSFORM); - ComponentKey proxy_transform_key(&object->id, NodeType::TRANSFORM); - add_relation(ob_transform_key, proxy_transform_key, "Proxy Transform"); -} - -void DepsgraphRelationBuilder::build_object_proxy_group(Object *object) -{ - if (ELEM(object->proxy_group, nullptr, object->proxy)) { - return; - } - /* Object is local here (local in .blend file, users interacts with it). */ - build_object(object->proxy_group); - OperationKey proxy_group_eval_key( - &object->proxy_group->id, NodeType::TRANSFORM, OperationCode::TRANSFORM_EVAL); - OperationKey transform_eval_key(&object->id, NodeType::TRANSFORM, OperationCode::TRANSFORM_EVAL); - add_relation(proxy_group_eval_key, transform_eval_key, "Proxy Group Transform"); -} - void DepsgraphRelationBuilder::build_object_from_layer_relations(Object *object) { OperationKey object_from_layer_entry_key( @@ -895,12 +867,7 @@ void DepsgraphRelationBuilder::build_object_data(Object *object) break; } case OB_ARMATURE: - if (ID_IS_LINKED(object) && object->proxy_from != nullptr) { - build_proxy_rig(object); - } - else { - build_rig(object); - } + build_rig(object); break; case OB_LAMP: build_object_data_light(object); @@ -1663,18 +1630,9 @@ void DepsgraphRelationBuilder::build_driver_variables(ID *id, FCurve *fcu) } build_id(target_id); build_driver_id_property(target_id, dtar->rna_path); - /* Look up the proxy - matches dtar_id_ensure_proxy_from during evaluation. */ Object *object = nullptr; if (GS(target_id->name) == ID_OB) { object = (Object *)target_id; - if (object->proxy_from != nullptr) { - /* Redirect the target to the proxy, like in evaluation. */ - object = object->proxy_from; - target_id = &object->id; - /* Prepare the redirected target. */ - build_id(target_id); - build_driver_id_property(target_id, dtar->rna_path); - } } /* Special handling for directly-named bones. */ if ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (object && object->type == OB_ARMATURE) && diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h index d699c799e40..df315176a92 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h @@ -216,8 +216,6 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder { Object *object, Collection *collection); virtual void build_object(Object *object); - virtual void build_object_proxy_from(Object *object); - virtual void build_object_proxy_group(Object *object); virtual void build_object_from_layer_relations(Object *object); virtual void build_object_data(Object *object); virtual void build_object_data_camera(Object *object); @@ -273,7 +271,6 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder { const bPoseChannel *rootchan, const RootPChanMap *root_map); virtual void build_rig(Object *object); - virtual void build_proxy_rig(Object *object); virtual void build_shapekeys(Key *key); virtual void build_armature(bArmature *armature); virtual void build_armature_bones(ListBase *bones); diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc index 856e37ee473..377ef9fc357 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc @@ -471,65 +471,4 @@ void DepsgraphRelationBuilder::build_rig(Object *object) } } -void DepsgraphRelationBuilder::build_proxy_rig(Object *object) -{ - bArmature *armature = (bArmature *)object->data; - Object *proxy_from = object->proxy_from; - build_armature(armature); - OperationKey pose_init_key(&object->id, NodeType::EVAL_POSE, OperationCode::POSE_INIT); - OperationKey pose_done_key(&object->id, NodeType::EVAL_POSE, OperationCode::POSE_DONE); - OperationKey pose_cleanup_key(&object->id, NodeType::EVAL_POSE, OperationCode::POSE_CLEANUP); - LISTBASE_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) { - build_idproperties(pchan->prop); - OperationKey bone_local_key( - &object->id, NodeType::BONE, pchan->name, OperationCode::BONE_LOCAL); - OperationKey bone_ready_key( - &object->id, NodeType::BONE, pchan->name, OperationCode::BONE_READY); - OperationKey bone_done_key(&object->id, NodeType::BONE, pchan->name, OperationCode::BONE_DONE); - OperationKey from_bone_done_key( - &proxy_from->id, NodeType::BONE, pchan->name, OperationCode::BONE_DONE); - add_relation(pose_init_key, bone_local_key, "Pose Init -> Bone Local"); - add_relation(bone_local_key, bone_ready_key, "Local -> Ready"); - add_relation(bone_ready_key, bone_done_key, "Ready -> Done"); - add_relation(bone_done_key, pose_cleanup_key, "Bone Done -> Pose Cleanup"); - add_relation(bone_done_key, pose_done_key, "Bone Done -> Pose Done", RELATION_FLAG_GODMODE); - /* Make sure bone in the proxy is not done before its FROM is done. */ - if (check_pchan_has_bbone(object, pchan)) { - OperationKey from_bone_segments_key( - &proxy_from->id, NodeType::BONE, pchan->name, OperationCode::BONE_SEGMENTS); - add_relation(from_bone_segments_key, - bone_done_key, - "Bone Segments -> Bone Done", - RELATION_FLAG_GODMODE); - } - else { - add_relation(from_bone_done_key, bone_done_key, "Bone Done -> Bone Done"); - } - - /* Parent relation: even though the proxy bone itself doesn't need - * the parent bone, some users expect the parent to be ready if the - * bone itself is (e.g. for computing the local space matrix). - */ - if (pchan->parent != nullptr) { - OperationKey parent_key( - &object->id, NodeType::BONE, pchan->parent->name, OperationCode::BONE_DONE); - add_relation(parent_key, bone_done_key, "Parent Bone -> Child Bone"); - } - - if (pchan->prop != nullptr) { - OperationKey bone_parameters( - &object->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EVAL, pchan->name); - OperationKey from_bone_parameters( - &proxy_from->id, NodeType::PARAMETERS, OperationCode::PARAMETERS_EVAL, pchan->name); - add_relation(from_bone_parameters, bone_parameters, "Proxy Bone Parameters"); - } - - /* Custom shape. */ - if (pchan->custom != nullptr) { - build_object(pchan->custom); - add_visibility_relation(&pchan->custom->id, &armature->id); - } - } -} - } // namespace blender::deg diff --git a/source/blender/depsgraph/intern/builder/pipeline_from_ids.cc b/source/blender/depsgraph/intern/builder/pipeline_from_ids.cc index 9e62432ea54..b77b935b9f6 100644 --- a/source/blender/depsgraph/intern/builder/pipeline_from_ids.cc +++ b/source/blender/depsgraph/intern/builder/pipeline_from_ids.cc @@ -63,17 +63,6 @@ class DepsgraphFromIDsNodeBuilder : public DepsgraphNodeBuilder { return DepsgraphNodeBuilder::need_pull_base_into_graph(base); } - void build_object_proxy_group(Object *object, bool is_visible) override - { - if (object->proxy_group == nullptr) { - return; - } - if (!filter_.contains(&object->proxy_group->id)) { - return; - } - DepsgraphNodeBuilder::build_object_proxy_group(object, is_visible); - } - protected: DepsgraphFromIDsFilter filter_; }; @@ -96,17 +85,6 @@ class DepsgraphFromIDsRelationBuilder : public DepsgraphRelationBuilder { return DepsgraphRelationBuilder::need_pull_base_into_graph(base); } - void build_object_proxy_group(Object *object) override - { - if (object->proxy_group == nullptr) { - return; - } - if (!filter_.contains(&object->proxy_group->id)) { - return; - } - DepsgraphRelationBuilder::build_object_proxy_group(object); - } - protected: DepsgraphFromIDsFilter filter_; }; diff --git a/source/blender/depsgraph/intern/builder/pipeline_from_ids.h b/source/blender/depsgraph/intern/builder/pipeline_from_ids.h index 79fcfc52446..8c89bbf1660 100644 --- a/source/blender/depsgraph/intern/builder/pipeline_from_ids.h +++ b/source/blender/depsgraph/intern/builder/pipeline_from_ids.h @@ -36,10 +36,7 @@ namespace deg { * visibility and other flags assigned to the objects. * All other bases (the ones which points to object which is outside of the set of IDs) are * completely ignored. - * - * - Proxy groups pointing to objects which are outside of the IDs set are also ignored. - * This way we avoid high-poly character body pulled into the dependency graph when it's coming - * from a library into an animation file and the dependency graph constructed for a proxy rig. */ + */ class FromIDsBuilderPipeline : public AbstractBuilderPipeline { public: |