Merge branch 'master' into blender2.8
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 4 May 2018 10:50:40 +0000 (12:50 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 4 May 2018 10:50:40 +0000 (12:50 +0200)
1  2 
source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc

@@@ -144,32 -141,19 +144,32 @@@ void DepsgraphNodeBuilder::build_spline
  /* Pose/Armature Bones Graph */
  void DepsgraphNodeBuilder::build_rig(Object *object)
  {
 -      bArmature *arm = (bArmature *)object->data;
 +      bArmature *armature = (bArmature *)object->data;
 +      Scene *scene_cow;
 +      Object *object_cow;
 +      if (DEG_depsgraph_use_copy_on_write()) {
 +              scene_cow = get_cow_datablock(scene_);
 +              object_cow = get_cow_datablock(object);
 +      }
 +      else {
 +              scene_cow = scene_;
 +              object_cow = object;
 +      }
        OperationDepsNode *op_node;
  
 -      /* animation and/or drivers linking posebones to base-armature used to define them
 +      /* Animation and/or drivers linking posebones to base-armature used to
 +       * define them.
 +       *
         * NOTE: AnimData here is really used to control animated deform properties,
 -       *       which ideally should be able to be unique across different instances.
 -       *       Eventually, we need some type of proxy/isolation mechanism in-between here
 -       *       to ensure that we can use same rig multiple times in same scene...
 +       *       which ideally should be able to be unique across different
 +       *       instances. Eventually, we need some type of proxy/isolation
 +       *       mechanism in-between here to ensure that we can use same rig
 +       *       multiple times in same scene.
         */
-       if (!built_map_.checkIsBuilt(armature)) {
 -      if (!built_map_.checkIsBuiltAndTag(arm)) {
 -              build_animdata(&arm->id);
++      if (!built_map_.checkIsBuiltAndTag(armature)) {
 +              build_animdata(&armature->id);
                /* Make sure pose is up-to-date with armature updates. */
 -              add_operation_node(&arm->id,
 +              add_operation_node(&armature->id,
                                   DEG_NODE_TYPE_PARAMETERS,
                                   NULL,
                                   DEG_OPCODE_PLACEHOLDER,