Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-09-14 15:02:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-09-14 15:43:56 +0300
commitd7fdd505dad68323c3d862e5e6713fab676cd231 (patch)
tree4fccf39e0bb62e15c846f57d96fa9b977bf5e719 /source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
parent95f257395e0f0322ce539671dee1370e5b081cd4 (diff)
Depsgraph: Respect parent object visibility in more places
Mainly coverts object->parent and pose constraints.
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc22
1 files changed, 14 insertions, 8 deletions
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 71810e5efe8..83ef33e4771 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
@@ -67,15 +67,16 @@ extern "C" {
namespace DEG {
-void DepsgraphNodeBuilder::build_pose_constraints(Object *object,
- bPoseChannel *pchan,
- int pchan_index)
+void DepsgraphNodeBuilder::build_pose_constraints(
+ Object *object,
+ bPoseChannel *pchan,
+ int pchan_index,
+ bool is_object_visible)
{
/* Pull indirect dependencies via constraints. */
BuilderWalkUserData data;
data.builder = this;
- /* TODO(sergey): Use own visibility. */
- data.is_parent_visible = true;
+ data.is_parent_visible = is_object_visible;
BKE_constraints_id_loop(&pchan->constraints, constraint_walk, &data);
/* Create node for constraint stack. */
add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
@@ -144,7 +145,7 @@ void DepsgraphNodeBuilder::build_splineik_pose(Object *object,
}
/* Pose/Armature Bones Graph */
-void DepsgraphNodeBuilder::build_rig(Object *object)
+void DepsgraphNodeBuilder::build_rig(Object *object, bool is_object_visible)
{
bArmature *armature = (bArmature *)object->data;
Scene *scene_cow = get_cow_datablock(scene_);
@@ -264,7 +265,8 @@ void DepsgraphNodeBuilder::build_rig(Object *object)
}
/* Build constraints. */
if (pchan->constraints.first != NULL) {
- build_pose_constraints(object, pchan, pchan_index);
+ build_pose_constraints(
+ object, pchan, pchan_index, is_object_visible);
}
/**
* IK Solvers.
@@ -295,7 +297,11 @@ void DepsgraphNodeBuilder::build_rig(Object *object)
/* Custom shape. */
if (pchan->custom != NULL) {
/* TODO(sergey): Use own visibility. */
- build_object(-1, pchan->custom, DEG_ID_LINKED_INDIRECTLY, true);
+ build_object(
+ -1,
+ pchan->custom,
+ DEG_ID_LINKED_INDIRECTLY,
+ is_object_visible);
}
pchan_index++;
}