Depsgraph: Cleanup, always call full `object`
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 23 Nov 2017 10:39:28 +0000 (11:39 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 23 Nov 2017 10:39:28 +0000 (11:39 +0100)
12 files changed:
source/blender/depsgraph/DEG_depsgraph_build.h
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes.h
source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
source/blender/depsgraph/intern/builder/deg_builder_nodes_scene.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.h
source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
source/blender/depsgraph/intern/depsgraph.cc
source/blender/depsgraph/intern/depsgraph_build.cc
source/blender/depsgraph/intern/nodes/deg_node_component.cc

index c915b7ef076c15f8d2158f719375223f6af41175..b268822f659e5099e81c9cc080ab7b6c71434ede 100644 (file)
@@ -141,12 +141,12 @@ void DEG_add_scene_relation(struct DepsNodeHandle *node,
                             struct Scene *scene,
                             eDepsSceneComponentType component,
                             const char *description);
-void DEG_add_object_relation(struct DepsNodeHandle *node, struct
-                             Object *ob,
+void DEG_add_object_relation(struct DepsNodeHandle *node,
+                             struct Object *object,
                              eDepsObjectComponentType component,
                              const char *description);
 void DEG_add_bone_relation(struct DepsNodeHandle *handle,
-                           struct Object *ob,
+                           struct Object *object,
                            const char *bone_name,
                            eDepsObjectComponentType component,
                            const char *description);
@@ -164,7 +164,7 @@ typedef bool (*DEG_CollobjFilterFunction)(struct Object *obj, struct ModifierDat
 
 void DEG_add_collision_relations(struct DepsNodeHandle *handle,
                                  struct Scene *scene,
-                                 struct Object *ob,
+                                 struct Object *object,
                                  struct Group *group,
                                  int layer,
                                  unsigned int modifier_type,
@@ -173,7 +173,7 @@ void DEG_add_collision_relations(struct DepsNodeHandle *handle,
                                  const char *name);
 void DEG_add_forcefield_relations(struct DepsNodeHandle *handle,
                                   struct Scene *scene,
-                                  struct Object *ob,
+                                  struct Object *object,
                                   struct EffectorWeights *eff,
                                   bool add_absorption,
                                   int skip_forcefield,
index 635354a9413b1f4fe97c390d0dbc768c52ef61db..60150eda0bf72ec3a84911b5b908a3017ecd9a3c 100644 (file)
@@ -120,7 +120,7 @@ struct BuilderWalkUserData {
 };
 
 static void modifier_walk(void *user_data,
-                          struct Object * /*ob*/,
+                          struct Object * /*object*/,
                           struct Object **obpoin,
                           int /*cb_flag*/)
 {
@@ -309,12 +309,12 @@ void DepsgraphNodeBuilder::build_group(Base *base, Group *group)
        }
 }
 
-void DepsgraphNodeBuilder::build_object(Base *base, Object *ob)
+void DepsgraphNodeBuilder::build_object(Base *base, Object *object)
 {
-       const bool has_object = (ob->id.tag & LIB_TAG_DOIT);
+       const bool has_object = (object->id.tag & LIB_TAG_DOIT);
        IDDepsNode *id_node = (has_object)
-               ? graph_->find_id_node(&ob->id)
-               : add_id_node(&ob->id);
+               ? graph_->find_id_node(&object->id)
+               : add_id_node(&object->id);
        /* Update node layers.
         * Do it for both new and existing ID nodes. This is so because several
         * bases might be sharing same object.
@@ -322,7 +322,7 @@ void DepsgraphNodeBuilder::build_object(Base *base, Object *ob)
        if (base != NULL) {
                id_node->layers |= base->lay;
        }
-       if (ob->type == OB_CAMERA) {
+       if (object->type == OB_CAMERA) {
                /* Camera should always be updated, it used directly by viewport.
                 *
                 * TODO(sergey): Make it only for active scene camera.
@@ -333,42 +333,42 @@ void DepsgraphNodeBuilder::build_object(Base *base, Object *ob)
        if (has_object) {
                return;
        }
-       ob->id.tag |= LIB_TAG_DOIT;
-       ob->customdata_mask = 0;
+       object->id.tag |= LIB_TAG_DOIT;
+       object->customdata_mask = 0;
 
        /* Standard components. */
-       build_object_transform(ob);
+       build_object_transform(object);
 
-       if (ob->parent != NULL) {
-               build_object(NULL, ob->parent);
+       if (object->parent != NULL) {
+               build_object(NULL, object->parent);
        }
-       if (ob->modifiers.first != NULL) {
+       if (object->modifiers.first != NULL) {
                BuilderWalkUserData data;
                data.builder = this;
-               modifiers_foreachObjectLink(ob, modifier_walk, &data);
+               modifiers_foreachObjectLink(object, modifier_walk, &data);
        }
-       if (ob->constraints.first != NULL) {
+       if (object->constraints.first != NULL) {
                BuilderWalkUserData data;
                data.builder = this;
-               BKE_constraints_id_loop(&ob->constraints, constraint_walk, &data);
+               BKE_constraints_id_loop(&object->constraints, constraint_walk, &data);
        }
 
        /* Object data. */
-       if (ob->data != NULL) {
+       if (object->data != NULL) {
                /* type-specific data... */
-               switch (ob->type) {
+               switch (object->type) {
                        case OB_MESH:     /* Geometry */
                        case OB_CURVE:
                        case OB_FONT:
                        case OB_SURF:
                        case OB_MBALL:
                        case OB_LATTICE:
-                               build_obdata_geom(ob);
+                               build_obdata_geom(object);
                                /* TODO(sergey): Only for until we support granular
                                 * update of curves.
                                 */
-                               if (ob->type == OB_FONT) {
-                                       Curve *curve = (Curve *)ob->data;
+                               if (object->type == OB_FONT) {
+                                       Curve *curve = (Curve *)object->data;
                                        if (curve->textoncurve) {
                                                id_node->eval_flags |= DAG_EVAL_NEED_CURVE_PATH;
                                        }
@@ -376,25 +376,25 @@ void DepsgraphNodeBuilder::build_object(Base *base, Object *ob)
                                break;
 
                        case OB_ARMATURE: /* Pose */
-                               if (ID_IS_LINKED(ob) && ob->proxy_from != NULL) {
-                                       build_proxy_rig(ob);
+                               if (ID_IS_LINKED(object) && object->proxy_from != NULL) {
+                                       build_proxy_rig(object);
                                }
                                else {
-                                       build_rig(ob);
+                                       build_rig(object);
                                }
                                break;
 
                        case OB_LAMP:   /* Lamp */
-                               build_lamp(ob);
+                               build_lamp(object);
                                break;
 
                        case OB_CAMERA: /* Camera */
-                               build_camera(ob);
+                               build_camera(object);
                                break;
 
                        default:
                        {
-                               ID *obdata = (ID *)ob->data;
+                               ID *obdata = (ID *)object->data;
                                if ((obdata->tag & LIB_TAG_DOIT) == 0) {
                                        build_animdata(obdata);
                                }
@@ -409,50 +409,50 @@ void DepsgraphNodeBuilder::build_object(Base *base, Object *ob)
         * on object's level animation, for example in case of rebuilding
         * pose for proxy.
         */
-       build_animdata(&ob->id);
+       build_animdata(&object->id);
 
        /* particle systems */
-       if (ob->particlesystem.first != NULL) {
-               build_particles(ob);
+       if (object->particlesystem.first != NULL) {
+               build_particles(object);
        }
 
        /* Grease pencil. */
-       if (ob->gpd != NULL) {
-               build_gpencil(ob->gpd);
+       if (object->gpd != NULL) {
+               build_gpencil(object->gpd);
        }
 
        /* Object that this is a proxy for. */
-       if (ob->proxy) {
-               ob->proxy->proxy_from = ob;
-               build_object(base, ob->proxy);
+       if (object->proxy) {
+               object->proxy->proxy_from = object;
+               build_object(base, object->proxy);
        }
 
        /* Object dupligroup. */
-       if (ob->dup_group != NULL) {
-               build_group(base, ob->dup_group);
+       if (object->dup_group != NULL) {
+               build_group(base, object->dup_group);
        }
 }
 
-void DepsgraphNodeBuilder::build_object_transform(Object *ob)
+void DepsgraphNodeBuilder::build_object_transform(Object *object)
 {
        OperationDepsNode *op_node;
 
        /* local transforms (from transform channels - loc/rot/scale + deltas) */
-       op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                                    function_bind(BKE_object_eval_local_transform, _1, scene_, ob),
+       op_node = add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
+                                    function_bind(BKE_object_eval_local_transform, _1, scene_, object),
                                     DEG_OPCODE_TRANSFORM_LOCAL);
        op_node->set_as_entry();
 
        /* object parent */
-       if (ob->parent) {
-               add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                                  function_bind(BKE_object_eval_parent, _1, scene_, ob),
+       if (object->parent) {
+               add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
+                                  function_bind(BKE_object_eval_parent, _1, scene_, object),
                                   DEG_OPCODE_TRANSFORM_PARENT);
        }
 
        /* object constraints */
-       if (ob->constraints.first) {
-               build_object_constraints(ob);
+       if (object->constraints.first) {
+               build_object_constraints(object);
        }
 
        /* Temporary uber-update node, which does everything.
@@ -462,13 +462,13 @@ void DepsgraphNodeBuilder::build_object_transform(Object *ob)
         *
         * TODO(sergey): Get rid of this node.
         */
-       add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                          function_bind(BKE_object_eval_uber_transform, _1, scene_, ob),
+       add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
+                          function_bind(BKE_object_eval_uber_transform, _1, scene_, object),
                           DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
 
        /* object transform is done */
-       op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                                    function_bind(BKE_object_eval_done, _1, ob),
+       op_node = add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
+                                    function_bind(BKE_object_eval_done, _1, object),
                                     DEG_OPCODE_TRANSFORM_FINAL);
        op_node->set_as_exit();
 }
@@ -490,11 +490,11 @@ void DepsgraphNodeBuilder::build_object_transform(Object *ob)
  *
  * -- Aligorith, August 2013
  */
-void DepsgraphNodeBuilder::build_object_constraints(Object *ob)
+void DepsgraphNodeBuilder::build_object_constraints(Object *object)
 {
        /* create node for constraint stack */
-       add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                          function_bind(BKE_object_eval_constraints, _1, scene_, ob),
+       add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
+                          function_bind(BKE_object_eval_constraints, _1, scene_, object),
                           DEG_OPCODE_TRANSFORM_CONSTRAINTS);
 }
 
@@ -632,21 +632,21 @@ void DepsgraphNodeBuilder::build_rigidbody(Scene *scene)
        /* objects - simulation participants */
        if (rbw->group) {
                LINKLIST_FOREACH (GroupObject *, go, &rbw->group->gobject) {
-                       Object *ob = go->ob;
+                       Object *object = go->ob;
 
-                       if (!ob || (ob->type != OB_MESH))
+                       if (!object || (object->type != OB_MESH))
                                continue;
 
                        /* 2) create operation for flushing results */
                        /* object's transform component - where the rigidbody operation lives */
-                       add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
-                                          function_bind(BKE_rigidbody_object_sync_transforms, _1, scene, ob),
+                       add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
+                                          function_bind(BKE_rigidbody_object_sync_transforms, _1, scene, object),
                                           DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY);
                }
        }
 }
 
-void DepsgraphNodeBuilder::build_particles(Object *ob)
+void DepsgraphNodeBuilder::build_particles(Object *object)
 {
        /**
         * Particle Systems Nodes
@@ -665,17 +665,17 @@ void DepsgraphNodeBuilder::build_particles(Object *ob)
 
        /* component for all particle systems */
        ComponentDepsNode *psys_comp =
-               add_component_node(&ob->id, DEG_NODE_TYPE_EVAL_PARTICLES);
+               add_component_node(&object->id, DEG_NODE_TYPE_EVAL_PARTICLES);
 
        add_operation_node(psys_comp,
                           function_bind(BKE_particle_system_eval_init,
                                         _1,
                                         scene_,
-                                        ob),
+                                        object),
                           DEG_OPCODE_PARTICLE_SYSTEM_EVAL_INIT);
 
        /* particle systems */
-       LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
+       LINKLIST_FOREACH (ParticleSystem *, psys, &object->particlesystem) {
                ParticleSettings *part = psys->part;
 
                /* particle settings */
@@ -717,9 +717,9 @@ void DepsgraphNodeBuilder::build_shapekeys(Key *key)
 
 /* ObData Geometry Evaluation */
 // XXX: what happens if the datablock is shared!
-void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
+void DepsgraphNodeBuilder::build_obdata_geom(Object *object)
 {
-       ID *obdata = (ID *)ob->data;
+       ID *obdata = (ID *)object->data;
        OperationDepsNode *op_node;
 
        /* TODO(sergey): This way using this object's properties as driver target
@@ -727,7 +727,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
         *
         * Does this depend on other nodes?
         */
-       op_node = add_operation_node(&ob->id,
+       op_node = add_operation_node(&object->id,
                                     DEG_NODE_TYPE_PARAMETERS,
                                     NULL,
                                     DEG_OPCODE_PARAMETERS_EVAL);
@@ -740,16 +740,16 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
         *
         * TODO(sergey): Get rid of this node.
         */
-       op_node = add_operation_node(&ob->id,
+       op_node = add_operation_node(&object->id,
                                     DEG_NODE_TYPE_GEOMETRY,
-                                                                function_bind(BKE_object_eval_uber_data,
-                                                                              _1,
-                                                                              scene_,
-                                                                              ob),
+                                    function_bind(BKE_object_eval_uber_data,
+                                                  _1,
+                                                  scene_,
+                                                  object),
                                     DEG_OPCODE_GEOMETRY_UBEREVAL);
        op_node->set_as_exit();
 
-       op_node = add_operation_node(&ob->id,
+       op_node = add_operation_node(&object->id,
                                     DEG_NODE_TYPE_GEOMETRY,
                                     NULL,
                                     DEG_OPCODE_PLACEHOLDER,
@@ -759,22 +759,22 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
        // TODO: "Done" operation
 
        /* Cloyth modifier. */
-       LINKLIST_FOREACH (ModifierData *, md, &ob->modifiers) {
+       LINKLIST_FOREACH (ModifierData *, md, &object->modifiers) {
                if (md->type == eModifierType_Cloth) {
-                       build_cloth(ob);
+                       build_cloth(object);
                }
        }
 
        /* materials */
-       for (int a = 1; a <= ob->totcol; a++) {
-               Material *ma = give_current_material(ob, a);
+       for (int a = 1; a <= object->totcol; a++) {
+               Material *ma = give_current_material(object, a);
                if (ma != NULL) {
                        build_material(ma);
                }
        }
 
        /* geometry collision */
-       if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_LATTICE)) {
+       if (ELEM(object->type, OB_MESH, OB_CURVE, OB_LATTICE)) {
                // add geometry collider relations
        }
 
@@ -783,7 +783,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
        }
 
        /* ShapeKeys */
-       Key *key = BKE_key_from_object(ob);
+       Key *key = BKE_key_from_object(object);
        if (key) {
                build_shapekeys(key);
        }
@@ -793,10 +793,10 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
        /* Nodes for result of obdata's evaluation, and geometry
         * evaluation on object.
         */
-       switch (ob->type) {
+       switch (object->type) {
                case OB_MESH:
                {
-                       //Mesh *me = (Mesh *)ob->data;
+                       //Mesh *me = (Mesh *)object->data;
 
                        /* evaluation operations */
                        op_node = add_operation_node(obdata,
@@ -812,11 +812,11 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
 
                case OB_MBALL:
                {
-                       Object *mom = BKE_mball_basis_find(scene_, ob);
+                       Object *mom = BKE_mball_basis_find(scene_, object);
                        /* NOTE: Only the motherball gets evaluated, it's children are
                         * having empty placeholders for the correct relations being built.
                         */
-                       if (mom == ob) {
+                       if (mom == object) {
                                /* metaball evaluation operations */
                                op_node = add_operation_node(obdata,
                                                             DEG_NODE_TYPE_GEOMETRY,
@@ -862,7 +862,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
                        if (cu->taperobj != NULL) {
                                build_object(NULL, cu->taperobj);
                        }
-                       if (ob->type == OB_FONT && cu->textoncurve != NULL) {
+                       if (object->type == OB_FONT && cu->textoncurve != NULL) {
                                build_object(NULL, cu->textoncurve);
                        }
                        break;
@@ -895,10 +895,10 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
 }
 
 /* Cameras */
-void DepsgraphNodeBuilder::build_camera(Object *ob)
+void DepsgraphNodeBuilder::build_camera(Object *object)
 {
        /* TODO: Link scene-camera links in somehow... */
-       Camera *cam = (Camera *)ob->data;
+       Camera *cam = (Camera *)object->data;
        ID *camera_id = &cam->id;
        if (camera_id->tag & LIB_TAG_DOIT) {
                return;
@@ -913,15 +913,15 @@ void DepsgraphNodeBuilder::build_camera(Object *ob)
 
        if (cam->dof_ob != NULL) {
                /* TODO(sergey): For now parametrs are on object level. */
-               add_operation_node(&ob->id, DEG_NODE_TYPE_PARAMETERS, NULL,
+               add_operation_node(&object->id, DEG_NODE_TYPE_PARAMETERS, NULL,
                                   DEG_OPCODE_PLACEHOLDER, "Camera DOF");
        }
 }
 
 /* Lamps */
-void DepsgraphNodeBuilder::build_lamp(Object *ob)
+void DepsgraphNodeBuilder::build_lamp(Object *object)
 {
-       Lamp *la = (Lamp *)ob->data;
+       Lamp *la = (Lamp *)object->data;
        ID *lamp_id = &la->id;
        if (lamp_id->tag & LIB_TAG_DOIT) {
                return;
index ec9fe6a40a20df8eff90834fb63ec052e8d3d3c1..cd1355558ea360c315c1b4c88735022602f01a1e 100644 (file)
@@ -120,27 +120,27 @@ struct DepsgraphNodeBuilder {
 
        void build_scene(Scene *scene);
        void build_group(Base *base, Group *group);
-       void build_object(Base *base, Object *ob);
-       void build_object_transform(Object *ob);
-       void build_object_constraints(Object *ob);
-       void build_pose_constraints(Object *ob, bPoseChannel *pchan);
+       void build_object(Base *base, Object *object);
+       void build_object_transform(Object *object);
+       void build_object_constraints(Object *object);
+       void build_pose_constraints(Object *object, bPoseChannel *pchan);
        void build_rigidbody(Scene *scene);
-       void build_particles(Object *ob);
+       void build_particles(Object *object);
        void build_cloth(Object *object);
        void build_animdata(ID *id);
        OperationDepsNode *build_driver(ID *id, FCurve *fcurve);
-       void build_ik_pose(Object *ob,
+       void build_ik_pose(Object *object,
                           bPoseChannel *pchan,
                           bConstraint *con);
-       void build_splineik_pose(Object *ob,
+       void build_splineik_pose(Object *object,
                                 bPoseChannel *pchan,
                                 bConstraint *con);
-       void build_rig(Object *ob);
-       void build_proxy_rig(Object *ob);
+       void build_rig(Object *object);
+       void build_proxy_rig(Object *object);
        void build_shapekeys(Key *key);
-       void build_obdata_geom(Object *ob);
-       void build_camera(Object *ob);
-       void build_lamp(Object *ob);
+       void build_obdata_geom(Object *object);
+       void build_camera(Object *object);
+       void build_lamp(Object *object);
        void build_nodetree(bNodeTree *ntree);
        void build_material(Material *ma);
        void build_texture(Tex *tex);
index a1f20b1c683c938680b62f9a9a4bff1e73ab37d2..caf6f60165c0b879a8dc21f9b74caa4f8cd21694 100644 (file)
@@ -64,16 +64,16 @@ extern "C" {
 
 namespace DEG {
 
-void DepsgraphNodeBuilder::build_pose_constraints(Object *ob, bPoseChannel *pchan)
+void DepsgraphNodeBuilder::build_pose_constraints(Object *object, bPoseChannel *pchan)
 {
        /* create node for constraint stack */
-       add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
-                          function_bind(BKE_pose_constraints_evaluate, _1, scene_, ob, pchan),
+       add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
+                          function_bind(BKE_pose_constraints_evaluate, _1, scene_, object, pchan),
                           DEG_OPCODE_BONE_CONSTRAINTS);
 }
 
 /* IK Solver Eval Steps */
-void DepsgraphNodeBuilder::build_ik_pose(Object *ob, bPoseChannel *pchan, bConstraint *con)
+void DepsgraphNodeBuilder::build_ik_pose(Object *object, bPoseChannel *pchan, bConstraint *con)
 {
        bKinematicConstraint *data = (bKinematicConstraint *)con->data;
 
@@ -83,20 +83,20 @@ void DepsgraphNodeBuilder::build_ik_pose(Object *ob, bPoseChannel *pchan, bConst
                return;
        }
 
-       if (has_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
+       if (has_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
                               DEG_OPCODE_POSE_IK_SOLVER))
        {
                return;
        }
 
        /* Operation node for evaluating/running IK Solver. */
-       add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
-                          function_bind(BKE_pose_iktree_evaluate, _1, scene_, ob, rootchan),
+       add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
+                          function_bind(BKE_pose_iktree_evaluate, _1, scene_, object, rootchan),
                           DEG_OPCODE_POSE_IK_SOLVER);
 }
 
 /* Spline IK Eval Steps */
-void DepsgraphNodeBuilder::build_splineik_pose(Object *ob, bPoseChannel *pchan, bConstraint *con)
+void DepsgraphNodeBuilder::build_splineik_pose(Object *object, bPoseChannel *pchan, bConstraint *con)
 {
        bSplineIKConstraint *data = (bSplineIKConstraint *)con->data;
 
@@ -106,15 +106,15 @@ void DepsgraphNodeBuilder::build_splineik_pose(Object *ob, bPoseChannel *pchan,
        /* Operation node for evaluating/running Spline IK Solver.
         * Store the "root bone" of this chain in the solver, so it knows where to start.
         */
-       add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
-                          function_bind(BKE_pose_splineik_evaluate, _1, scene_, ob, rootchan),
+       add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
+                          function_bind(BKE_pose_splineik_evaluate, _1, scene_, object, rootchan),
                           DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
 }
 
 /* Pose/Armature Bones Graph */
-void DepsgraphNodeBuilder::build_rig(Object *ob)
+void DepsgraphNodeBuilder::build_rig(Object *object)
 {
-       bArmature *arm = (bArmature *)ob->data;
+       bArmature *arm = (bArmature *)object->data;
        OperationDepsNode *op_node;
 
        /* animation and/or drivers linking posebones to base-armature used to define them
@@ -135,22 +135,22 @@ void DepsgraphNodeBuilder::build_rig(Object *ob)
        }
 
        /* Rebuild pose if not up to date. */
-       if (ob->pose == NULL || (ob->pose->flag & POSE_RECALC)) {
-               BKE_pose_rebuild_ex(ob, arm, false);
+       if (object->pose == NULL || (object->pose->flag & POSE_RECALC)) {
+               BKE_pose_rebuild_ex(object, arm, false);
                /* XXX: Without this animation gets lost in certain circumstances
                 * after loading file. Need to investigate further since it does
                 * not happen with simple scenes..
                 */
-               if (ob->adt) {
-                       ob->adt->recalc |= ADT_RECALC_ANIM;
+               if (object->adt) {
+                       object->adt->recalc |= ADT_RECALC_ANIM;
                }
        }
 
        /* speed optimization for animation lookups */
-       if (ob->pose) {
-               BKE_pose_channels_hash_make(ob->pose);
-               if (ob->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
-                       BKE_pose_update_constraint_flags(ob->pose);
+       if (object->pose) {
+               BKE_pose_channels_hash_make(object->pose);
+               if (object->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
+                       BKE_pose_update_constraint_flags(object->pose);
                }
        }
 
@@ -177,46 +177,46 @@ void DepsgraphNodeBuilder::build_rig(Object *ob)
         */
 
        /* pose eval context */
-       op_node = add_operation_node(&ob->id,
+       op_node = add_operation_node(&object->id,
                                     DEG_NODE_TYPE_EVAL_POSE,
-                                    function_bind(BKE_pose_eval_init, _1, scene_, ob, ob->pose),
+                                    function_bind(BKE_pose_eval_init, _1, scene_, object, object->pose),
                                     DEG_OPCODE_POSE_INIT);
        op_node->set_as_entry();
 
-       op_node = add_operation_node(&ob->id,
+       op_node = add_operation_node(&object->id,
                                     DEG_NODE_TYPE_EVAL_POSE,
-                                    function_bind(BKE_pose_eval_init_ik, _1, scene_, ob, ob->pose),
+                                    function_bind(BKE_pose_eval_init_ik, _1, scene_, object, object->pose),
                                     DEG_OPCODE_POSE_INIT_IK);
 
-       op_node = add_operation_node(&ob->id,
+       op_node = add_operation_node(&object->id,
                                     DEG_NODE_TYPE_EVAL_POSE,
-                                    function_bind(BKE_pose_eval_flush, _1, scene_, ob, ob->pose),
+                                    function_bind(BKE_pose_eval_flush, _1, scene_, object, object->pose),
                                     DEG_OPCODE_POSE_DONE);
        op_node->set_as_exit();
 
        /* bones */
-       LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
+       LINKLIST_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
                /* node for bone eval */
-               op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, NULL,
+               op_node = add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name, NULL,
                                             DEG_OPCODE_BONE_LOCAL);
                op_node->set_as_entry();
 
-               add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
-                                  function_bind(BKE_pose_eval_bone, _1, scene_, ob, pchan),
+               add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
+                                  function_bind(BKE_pose_eval_bone, _1, scene_, object, pchan),
                                   DEG_OPCODE_BONE_POSE_PARENT);
 
-               add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
+               add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
                                   NULL, /* NOTE: dedicated noop for easier relationship construction */
                                   DEG_OPCODE_BONE_READY);
 
-               op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
+               op_node = add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
                                             function_bind(BKE_pose_bone_done, _1, pchan),
                                             DEG_OPCODE_BONE_DONE);
                op_node->set_as_exit();
 
                /* constraints */
                if (pchan->constraints.first != NULL) {
-                       build_pose_constraints(ob, pchan);
+                       build_pose_constraints(object, pchan);
                }
 
                /**
@@ -233,11 +233,11 @@ void DepsgraphNodeBuilder::build_rig(Object *ob)
                LINKLIST_FOREACH (bConstraint *, con, &pchan->constraints) {
                        switch (con->type) {
                                case CONSTRAINT_TYPE_KINEMATIC:
-                                       build_ik_pose(ob, pchan, con);
+                                       build_ik_pose(object, pchan, con);
                                        break;
 
                                case CONSTRAINT_TYPE_SPLINEIK:
-                                       build_splineik_pose(ob, pchan, con);
+                                       build_splineik_pose(object, pchan, con);
                                        break;
 
                                default:
@@ -247,41 +247,41 @@ void DepsgraphNodeBuilder::build_rig(Object *ob)
        }
 }
 
-void DepsgraphNodeBuilder::build_proxy_rig(Object *ob)
+void DepsgraphNodeBuilder::build_proxy_rig(Object *object)
 {
-       ID *obdata = (ID *)ob->data;
+       ID *obdata = (ID *)object->data;
        OperationDepsNode *op_node;
 
        build_animdata(obdata);
 
-       BLI_assert(ob->pose != NULL);
+       BLI_assert(object->pose != NULL);
 
        /* speed optimization for animation lookups */
-       BKE_pose_channels_hash_make(ob->pose);
-       if (ob->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
-               BKE_pose_update_constraint_flags(ob->pose);
+       BKE_pose_channels_hash_make(object->pose);
+       if (object->pose->flag & POSE_CONSTRAINTS_NEED_UPDATE_FLAGS) {
+               BKE_pose_update_constraint_flags(object->pose);
        }
 
-       op_node = add_operation_node(&ob->id,
+       op_node = add_operation_node(&object->id,
                                     DEG_NODE_TYPE_EVAL_POSE,
-                                    function_bind(BKE_pose_eval_proxy_copy, _1, ob),
+                                    function_bind(BKE_pose_eval_proxy_copy, _1, object),
                                     DEG_OPCODE_POSE_INIT);
        op_node->set_as_entry();
 
-       LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
-               op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
+       LINKLIST_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
+               op_node = add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
                                             NULL, DEG_OPCODE_BONE_LOCAL);
                op_node->set_as_entry();
 
-               add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
+               add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
                                   NULL, DEG_OPCODE_BONE_READY);
 
-               op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_BONE, pchan->name,
+               op_node = add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
                                             NULL, DEG_OPCODE_BONE_DONE);
                op_node->set_as_exit();
        }
 
-       op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE,
+       op_node = add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE,
                                     NULL, DEG_OPCODE_POSE_DONE);
        op_node->set_as_exit();
 }
index 1ea44093cd7a46af9c6a517c75f94d7632f85835..a7b2906cefd0bbf5885bbc62c13efec133b36fe0 100644 (file)
@@ -83,8 +83,8 @@ void DepsgraphNodeBuilder::build_scene(Scene *scene)
 
        /* scene objects */
        LINKLIST_FOREACH (Base *, base, &scene->base) {
-               Object *ob = base->object;
-               build_object(base, ob);
+               Object *object = base->object;
+               build_object(base, object);
        }
 
        /* rigidbody */
index 40fb4c9fe69822a44f5405dc1182f60ce8b6a9e3..3520c518c364d166915179272b1e909a7dd0573c 100644 (file)
@@ -120,7 +120,7 @@ struct BuilderWalkUserData {
 };
 
 static void modifier_walk(void *user_data,
-                          struct Object * /*ob*/,
+                          struct Object * /*object*/,
                           struct Object **obpoin,
                           int /*cb_flag*/)
 {
@@ -327,10 +327,10 @@ void DepsgraphRelationBuilder::add_operation_relation(
        }
 }
 
-void DepsgraphRelationBuilder::add_collision_relations(const OperationKey &key, Scene *scene, Object *ob, Group *group, int layer, bool dupli, const char *name)
+void DepsgraphRelationBuilder::add_collision_relations(const OperationKey &key, Scene *scene, Object *object, Group *group, int layer, bool dupli, const char *name)
 {
        unsigned int numcollobj;
-       Object **collobjs = get_collisionobjects_ext(scene, ob, group, layer, &numcollobj, eModifierType_Collision, dupli);
+       Object **collobjs = get_collisionobjects_ext(scene, object, group, layer, &numcollobj, eModifierType_Collision, dupli);
 
        for (unsigned int i = 0; i < numcollobj; i++)
        {
@@ -347,19 +347,19 @@ void DepsgraphRelationBuilder::add_collision_relations(const OperationKey &key,
                MEM_freeN(collobjs);
 }
 
-void DepsgraphRelationBuilder::add_forcefield_relations(const OperationKey &key, Scene *scene, Object *ob, ParticleSystem *psys, EffectorWeights *eff, bool add_absorption, const char *name)
+void DepsgraphRelationBuilder::add_forcefield_relations(const OperationKey &key, Scene *scene, Object *object, ParticleSystem *psys, EffectorWeights *eff, bool add_absorption, const char *name)
 {
-       ListBase *effectors = pdInitEffectors(scene, ob, psys, eff, false);
+       ListBase *effectors = pdInitEffectors(scene, object, psys, eff, false);
 
        if (effectors) {
                for (EffectorCache *eff = (EffectorCache *)effectors->first; eff; eff = eff->next) {
-                       if (eff->ob != ob) {
+                       if (eff->ob != object) {
                                ComponentKey eff_key(&eff->ob->id, DEG_NODE_TYPE_TRANSFORM);
                                add_relation(eff_key, key, name);
                        }
 
                        if (eff->psys) {
-                               if (eff->ob != ob) {
+                               if (eff->ob != object) {
                                        ComponentKey eff_key(&eff->ob->id, DEG_NODE_TYPE_EVAL_PARTICLES);
                                        add_relation(eff_key, key, name);
 
@@ -382,7 +382,7 @@ void DepsgraphRelationBuilder::add_forcefield_relations(const OperationKey &key,
                        }
 
                        if (add_absorption && (eff->pd->flag & PFIELD_VISIBILITY)) {
-                               add_collision_relations(key, scene, ob, NULL, eff->ob->lay, true, "Force Absorption");
+                               add_collision_relations(key, scene, object, NULL, eff->ob->lay, true, "Force Absorption");
                        }
                }
        }
@@ -432,54 +432,54 @@ void DepsgraphRelationBuilder::build_group(Object *object, Group *group)
        group_id->tag |= LIB_TAG_DOIT;
 }
 
-void DepsgraphRelationBuilder::build_object(Object *ob)
+void DepsgraphRelationBuilder::build_object(Object *object)
 {
-       if (ob->id.tag & LIB_TAG_DOIT) {
+       if (object->id.tag & LIB_TAG_DOIT) {
                return;
        }
-       ob->id.tag |= LIB_TAG_DOIT;
+       object->id.tag |= LIB_TAG_DOIT;
 
        /* Object Transforms */
-       eDepsOperation_Code base_op = (ob->parent) ? DEG_OPCODE_TRANSFORM_PARENT : DEG_OPCODE_TRANSFORM_LOCAL;
-       OperationKey base_op_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, base_op);
+       eDepsOperation_Code base_op = (object->parent) ? DEG_OPCODE_TRANSFORM_PARENT : DEG_OPCODE_TRANSFORM_LOCAL;
+       OperationKey base_op_key(&object->id, DEG_NODE_TYPE_TRANSFORM, base_op);
 
-       OperationKey local_transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
-       OperationKey parent_transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_PARENT);
-       OperationKey final_transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
+       OperationKey local_transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_LOCAL);
+       OperationKey parent_transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_PARENT);
+       OperationKey final_transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_FINAL);
 
-       OperationKey ob_ubereval_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
+       OperationKey ob_ubereval_key(&object->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
 
        /* parenting */
-       if (ob->parent != NULL) {
+       if (object->parent != NULL) {
                /* parent relationship */
-               build_object_parent(ob);
+               build_object_parent(object);
 
                /* local -> parent */
                add_relation(local_transform_key, parent_transform_key, "[ObLocal -> ObParent]");
        }
 
-       if (ob->modifiers.first != NULL) {
+       if (object->modifiers.first != NULL) {
                BuilderWalkUserData data;
                data.builder = this;
-               modifiers_foreachObjectLink(ob, modifier_walk, &data);
+               modifiers_foreachObjectLink(object, modifier_walk, &data);
        }
-       if (ob->constraints.first != NULL) {
+       if (object->constraints.first != NULL) {
                BuilderWalkUserData data;
                data.builder = this;
-               BKE_constraints_id_loop(&ob->constraints, constraint_walk, &data);
+               BKE_constraints_id_loop(&object->constraints, constraint_walk, &data);
        }
 
        /* object constraints */
-       if (ob->constraints.first != NULL) {
-               OperationKey constraint_key(&ob->id,
+       if (object->constraints.first != NULL) {
+               OperationKey constraint_key(&object->id,
                                            DEG_NODE_TYPE_TRANSFORM,
                                            DEG_OPCODE_TRANSFORM_CONSTRAINTS);
 
                /* constraint relations */
-               build_constraints(&ob->id,
+               build_constraints(&object->id,
                                  DEG_NODE_TYPE_TRANSFORM,
                                  "",
-                                 &ob->constraints,
+                                 &object->constraints,
                                  NULL);
 
                /* operation order */
@@ -495,7 +495,7 @@ void DepsgraphRelationBuilder::build_object(Object *ob)
                 * dependencies and avoid transitive relations which causes overhead.
                 * But once we get rid of uber eval node this will need reconsideration.
                 */
-               if (ob->rigidbody_object == NULL) {
+               if (object->rigidbody_object == NULL) {
                        /* Rigid body will hook up another node inbetween, so skip
                         * relation here to avoid transitive relation.
                         */
@@ -505,23 +505,23 @@ void DepsgraphRelationBuilder::build_object(Object *ob)
        }
 
        /* AnimData */
-       build_animdata(&ob->id);
+       build_animdata(&object->id);
 
        // XXX: This should be hooked up by the build_animdata code
-       if (needs_animdata_node(&ob->id)) {
-               ComponentKey adt_key(&ob->id, DEG_NODE_TYPE_ANIMATION);
+       if (needs_animdata_node(&object->id)) {
+               ComponentKey adt_key(&object->id, DEG_NODE_TYPE_ANIMATION);
                add_relation(adt_key, local_transform_key, "Object Animation");
        }
 
        /* object data */
-       if (ob->data) {
-               ID *obdata_id = (ID *)ob->data;
+       if (object->data) {
+               ID *obdata_id = (ID *)object->data;
 
-               /* ob data animation */
+               /* object data animation */
                build_animdata(obdata_id);
 
                /* type-specific data... */
-               switch (ob->type) {
+               switch (object->type) {
                        case OB_MESH:     /* Geometry */
                        case OB_CURVE:
                        case OB_FONT:
@@ -529,79 +529,79 @@ void DepsgraphRelationBuilder::build_object(Object *ob)
                        case OB_MBALL:
                        case OB_LATTICE:
                        {
-                               build_obdata_geom(ob);
+                               build_obdata_geom(object);
                                break;
                        }
 
                        case OB_ARMATURE: /* Pose */
-                               if (ID_IS_LINKED(ob) && ob->proxy_from != NULL) {
-                                       build_proxy_rig(ob);
+                               if (ID_IS_LINKED(object) && object->proxy_from != NULL) {
+                                       build_proxy_rig(object);
                                }
                                else {
-                                       build_rig(ob);
+                                       build_rig(object);
                                }
                                break;
 
                        case OB_LAMP:   /* Lamp */
-                               build_lamp(ob);
+                               build_lamp(object);
                                break;
 
                        case OB_CAMERA: /* Camera */
-                               build_camera(ob);
+                               build_camera(object);
                                break;
                }
 
-               Key *key = BKE_key_from_object(ob);
+               Key *key = BKE_key_from_object(object);
                if (key != NULL) {
-                       ComponentKey geometry_key((ID *)ob->data, DEG_NODE_TYPE_GEOMETRY);
+                       ComponentKey geometry_key((ID *)object->data, DEG_NODE_TYPE_GEOMETRY);
                        ComponentKey key_key(&key->id, DEG_NODE_TYPE_GEOMETRY);
                        add_relation(key_key, geometry_key, "Shapekeys");
                }
        }
 
        /* Particle systems. */
-       if (ob->particlesystem.first != NULL) {
-               build_particles(ob);
+       if (object->particlesystem.first != NULL) {
+               build_particles(object);
        }
 
        /* Grease pencil. */
-       if (ob->gpd != NULL) {
-               build_gpencil(ob->gpd);
+       if (object->gpd != NULL) {
+               build_gpencil(object->gpd);
        }
 
        /* Object that this is a proxy for. */
-       if (ob->proxy != NULL) {
-               ob->proxy->proxy_from = ob;
-               build_object(ob->proxy);
+       if (object->proxy != NULL) {
+               object->proxy->proxy_from = object;
+               build_object(object->proxy);
                /* TODO(sergey): This is an inverted relation, matches old depsgraph
                 * behavior and need to be investigated if it still need to be inverted.
                 */
-               ComponentKey ob_pose_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE);
-               ComponentKey proxy_pose_key(&ob->proxy->id, DEG_NODE_TYPE_EVAL_POSE);
+               ComponentKey ob_pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE);
+               ComponentKey proxy_pose_key(&object->proxy->id, DEG_NODE_TYPE_EVAL_POSE);
                add_relation(ob_pose_key, proxy_pose_key, "Proxy");
        }
 
        /* Object dupligroup. */
-       if (ob->dup_group != NULL) {
-               build_group(ob, ob->dup_group);
+       if (object->dup_group != NULL) {
+               build_group(object, object->dup_group);
        }
 }
 
-void DepsgraphRelationBuilder::build_object_parent(Object *ob)
+void DepsgraphRelationBuilder::build_object_parent(Object *object)
 {
        /* XXX: for now, need to use the component key (not just direct to the parent op),
         * or else the matrix doesn't get reset/
         */
        // XXX: @sergey - it would be good if we got that backwards flushing working
        // when tagging for updates.
-       //OperationKey ob_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_PARENT);
-       ComponentKey ob_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
+       //OperationKey ob_key(&object->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_PARENT);
+       ComponentKey ob_key(&object->id, DEG_NODE_TYPE_TRANSFORM);
 
        /* type-specific links */
-       switch (ob->partype) {
+       switch (object->partype) {
                case PARSKEL:  /* Armature Deform (Virtual Modifier) */
                {
-                       ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
+                       ComponentKey parent_key(&object->parent->id, DEG_NODE_TYPE_TRANSFORM);
                        add_relation(parent_key, ob_key, "Armature Deform Parent");
                        break;
                }
@@ -609,7 +609,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
                case PARVERT1: /* Vertex Parent */
                case PARVERT3:
                {
-                       ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_GEOMETRY);
+                       ComponentKey parent_key(&object->parent->id, DEG_NODE_TYPE_GEOMETRY);
                        add_relation(parent_key, ob_key, "Vertex Parent");
 
                        /* XXX not sure what this is for or how you could be done properly - lukas */
@@ -618,17 +618,17 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
                                parent_node->customdata_mask |= CD_MASK_ORIGINDEX;
                        }
 
-                       ComponentKey transform_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
+                       ComponentKey transform_key(&object->parent->id, DEG_NODE_TYPE_TRANSFORM);
                        add_relation(transform_key, ob_key, "Vertex Parent TFM");
                        break;
                }
 
                case PARBONE: /* Bone Parent */
                {
-                       ComponentKey parent_bone_key(&ob->parent->id,
+                       ComponentKey parent_bone_key(&object->parent->id,
                                                     DEG_NODE_TYPE_BONE,
-                                                    ob->parsubstr);
-                       OperationKey parent_transform_key(&ob->parent->id,
+                                                    object->parsubstr);
+                       OperationKey parent_transform_key(&object->parent->id,
                                                          DEG_NODE_TYPE_TRANSFORM,
                                                          DEG_OPCODE_TRANSFORM_FINAL);
                        add_relation(parent_bone_key, ob_key, "Bone Parent");
@@ -638,35 +638,35 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
 
                default:
                {
-                       if (ob->parent->type == OB_LATTICE) {
+                       if (object->parent->type == OB_LATTICE) {
                                /* Lattice Deform Parent - Virtual Modifier */
                                // XXX: no virtual modifiers should be left!
-                               ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
-                               ComponentKey geom_key(&ob->parent->id, DEG_NODE_TYPE_GEOMETRY);
+                               ComponentKey parent_key(&object->parent->id, DEG_NODE_TYPE_TRANSFORM);
+                               ComponentKey geom_key(&object->parent->id, DEG_NODE_TYPE_GEOMETRY);
 
                                add_relation(parent_key, ob_key, "Lattice Deform Parent");
                                add_relation(geom_key, ob_key, "Lattice Deform Parent Geom");
                        }
-                       else if (ob->parent->type == OB_CURVE) {
-                               Curve *cu = (Curve *)ob->parent->data;
+                       else if (object->parent->type == OB_CURVE) {
+                               Curve *cu = (Curve *)object->parent->data;
 
                                if (cu->flag & CU_PATH) {
                                        /* Follow Path */
-                                       ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_GEOMETRY);
+                                       ComponentKey parent_key(&object->parent->id, DEG_NODE_TYPE_GEOMETRY);
                                        add_relation(parent_key, ob_key, "Curve Follow Parent");
 
-                                       ComponentKey transform_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
+                                       ComponentKey transform_key(&object->parent->id, DEG_NODE_TYPE_TRANSFORM);
                                        add_relation(transform_key, ob_key, "Curve Follow TFM");
                                }
                                else {
                                        /* Standard Parent */
-                                       ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
+                                       ComponentKey parent_key(&object->parent->id, DEG_NODE_TYPE_TRANSFORM);
                                        add_relation(parent_key, ob_key, "Curve Parent");
                                }
                        }
                        else {
                                /* Standard Parent */
-                               ComponentKey parent_key(&ob->parent->id, DEG_NODE_TYPE_TRANSFORM);
+                               ComponentKey parent_key(&object->parent->id, DEG_NODE_TYPE_TRANSFORM);
                                add_relation(parent_key, ob_key, "Parent");
                        }
                        break;
@@ -674,7 +674,7 @@ void DepsgraphRelationBuilder::build_object_parent(Object *ob)
        }
 
        /* exception case: parent is duplivert */
-       if ((ob->type == OB_MBALL) && (ob->parent->transflag & OB_DUPLIVERTS)) {
+       if ((object->type == OB_MBALL) && (object->parent->transflag & OB_DUPLIVERTS)) {
                //dag_add_relation(dag, node2, node, DAG_RL_DATA_DATA | DAG_RL_OB_OB, "Duplivert");
        }
 }
@@ -1007,11 +1007,11 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                /* TODO: ideally, if this is for a constraint, it goes to said
                 * constraint.
                 */
-               Object *ob = (Object *)id;
+               Object *object = (Object *)id;
                char *bone_name;
 
                bone_name = BLI_str_quoted_substrN(rna_path, "pose.bones[");
-               pchan = BKE_pose_channel_find_name(ob->pose, bone_name);
+               pchan = BKE_pose_channel_find_name(object->pose, bone_name);
 
                if (bone_name) {
                        MEM_freeN(bone_name);
@@ -1046,12 +1046,12 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                                IDDepsNode *to_node = (IDDepsNode *)rel->to;
                                /* We only care about objects with pose data which use this. */
                                if (GS(to_node->id->name) == ID_OB) {
-                                       Object *ob = (Object *)to_node->id;
-                                       /* NOTE: ob->pose may be NULL. */
+                                       Object *object = (Object *)to_node->id;
+                                       /* NOTE: object->pose may be NULL. */
                                        bPoseChannel *pchan = BKE_pose_channel_find_name(
-                                               ob->pose, bone_name);
+                                               object->pose, bone_name);
                                        if (pchan != NULL) {
-                                               OperationKey bone_key(&ob->id,
+                                               OperationKey bone_key(&object->id,
                                                                      DEG_NODE_TYPE_BONE,
                                                                      pchan->name,
                                                                      DEG_OPCODE_BONE_LOCAL);
@@ -1130,9 +1130,9 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                        }
                        /* Special handling for directly-named bones. */
                        if ((dtar->flag & DTAR_FLAG_STRUCT_REF) && (dtar->pchan_name[0])) {
-                               Object *ob = (Object *)dtar->id;
+                               Object *object = (Object *)dtar->id;
                                bPoseChannel *target_pchan =
-                                       BKE_pose_channel_find_name(ob->pose, dtar->pchan_name);
+                                       BKE_pose_channel_find_name(object->pose, dtar->pchan_name);
                                if (target_pchan != NULL) {
                                        /* Get node associated with bone. */
                                        // XXX: watch the space!
@@ -1173,11 +1173,11 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu)
                                /* Workaround for ensuring that local bone transforms don't end
                                 * up having to wait for pose eval to finish (to prevent cycles).
                                 */
-                               Object *ob = (Object *)dtar->id;
+                               Object *object = (Object *)dtar->id;
                                char *bone_name = BLI_str_quoted_substrN(dtar->rna_path,
                                                                         "pose.bones[");
                                bPoseChannel *target_pchan =
-                                       BKE_pose_channel_find_name(ob->pose, bone_name);
+                                       BKE_pose_channel_find_name(object->pose, bone_name);
                                if (bone_name != NULL) {
                                        MEM_freeN(bone_name);
                                        bone_name = NULL;
@@ -1267,8 +1267,8 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
        /* objects - simulation participants */
        if (rbw->group) {
                LINKLIST_FOREACH (GroupObject *, go, &rbw->group->gobject) {
-                       Object *ob = go->ob;
-                       if (ob == NULL || ob->type != OB_MESH) {
+                       Object *object = go->ob;
+                       if (object == NULL || object->type != OB_MESH) {
                                continue;
                        }
 
@@ -1280,10 +1280,10 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
                         *    XXX: there's probably a difference between passive and active
                         *         - passive don't change, so may need to know full transform...
                         */
-                       OperationKey rbo_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY);
+                       OperationKey rbo_key(&object->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY);
 
-                       eDepsOperation_Code trans_opcode = ob->parent ? DEG_OPCODE_TRANSFORM_PARENT : DEG_OPCODE_TRANSFORM_LOCAL;
-                       OperationKey trans_op(&ob->id, DEG_NODE_TYPE_TRANSFORM, trans_opcode);
+                       eDepsOperation_Code trans_opcode = object->parent ? DEG_OPCODE_TRANSFORM_PARENT : DEG_OPCODE_TRANSFORM_LOCAL;
+                       OperationKey trans_op(&object->id, DEG_NODE_TYPE_TRANSFORM, trans_opcode);
 
                        add_relation(sim_key, rbo_key, "Rigidbody Sim Eval -> RBO Sync");
 
@@ -1295,8 +1295,8 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
                         * - Later, it might be good to include a constraint in the stack allowing us
                         *   to control whether rigidbody eval gets interleaved into the constraint stack
                         */
-                       if (ob->constraints.first) {
-                               OperationKey constraint_key(&ob->id,
+                       if (object->constraints.first) {
+                               OperationKey constraint_key(&object->id,
                                                            DEG_NODE_TYPE_TRANSFORM,
                                                            DEG_OPCODE_TRANSFORM_CONSTRAINTS);
                                add_relation(rbo_key, constraint_key, "RBO Sync -> Ob Constraints");
@@ -1307,7 +1307,7 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
                                 * NOTE: Currently we consider final here an ubereval node.
                                 * If it is gone we'll need to reconsider relation here.
                                 */
-                               OperationKey uber_key(&ob->id,
+                               OperationKey uber_key(&object->id,
                                                      DEG_NODE_TYPE_TRANSFORM,
                                                      DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
                                add_relation(rbo_key, uber_key, "RBO Sync -> Uber (Temp)");
@@ -1321,17 +1321,17 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
        /* constraints */
        if (rbw->constraints) {
                LINKLIST_FOREACH (GroupObject *, go, &rbw->constraints->gobject) {
-                       Object *ob = go->ob;
-                       if (ob == NULL || !ob->rigidbody_constraint) {
+                       Object *object = go->ob;
+                       if (object == NULL || !object->rigidbody_constraint) {
                                continue;
                        }
 
-                       RigidBodyCon *rbc = ob->rigidbody_constraint;
+                       RigidBodyCon *rbc = object->rigidbody_constraint;
 
                        /* final result of the constraint object's transform controls how the
                         * constraint affects the physics sim for these objects
                         */
-                       ComponentKey trans_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
+                       ComponentKey trans_key(&object->id, DEG_NODE_TYPE_TRANSFORM);
                        OperationKey ob1_key(&rbc->ob1->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY);
                        OperationKey ob2_key(&rbc->ob2->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY);
 
@@ -1345,31 +1345,31 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
        }
 }
 
-void DepsgraphRelationBuilder::build_particles(Object *ob)
+void DepsgraphRelationBuilder::build_particles(Object *object)
 {
        TimeSourceKey time_src_key;
-       OperationKey obdata_ubereval_key(&ob->id,
+       OperationKey obdata_ubereval_key(&object->id,
                                         DEG_NODE_TYPE_GEOMETRY,
                                         DEG_OPCODE_GEOMETRY_UBEREVAL);
-       OperationKey eval_init_key(&ob->id,
+       OperationKey eval_init_key(&object->id,
                                   DEG_NODE_TYPE_EVAL_PARTICLES,
                                   DEG_OPCODE_PARTICLE_SYSTEM_EVAL_INIT);
-       if (object_particles_depends_on_time(ob)) {
+       if (object_particles_depends_on_time(object)) {
                add_relation(time_src_key, eval_init_key, "TimeSrc -> PSys");
        }
 
        /* particle systems */
-       LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
+       LINKLIST_FOREACH (ParticleSystem *, psys, &object->particlesystem) {
                ParticleSettings *part = psys->part;
 
                /* particle settings */
                build_animdata(&part->id);
 
                /* this particle system */
-               OperationKey psys_key(&ob->id, DEG_NODE_TYPE_EVAL_PARTICLES, DEG_OPCODE_PARTICLE_SYSTEM_EVAL, psys->name);
+               OperationKey psys_key(&object->id, DEG_NODE_TYPE_EVAL_PARTICLES, DEG_OPCODE_PARTICLE_SYSTEM_EVAL, psys->name);
 
                /* XXX: if particle system is later re-enabled, we must do full rebuild? */
-               if (!psys_check_enabled(ob, psys, G.is_rendering))
+               if (!psys_check_enabled(object, psys, G.is_rendering))
                        continue;
 
                add_relation(eval_init_key, psys_key, "Init -> PSys");
@@ -1382,14 +1382,14 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
 
                /* collisions */
                if (part->type != PART_HAIR) {
-                       add_collision_relations(psys_key, scene_, ob, part->collision_group, ob->lay, true, "Particle Collision");
+                       add_collision_relations(psys_key, scene_, object, part->collision_group, object->lay, true, "Particle Collision");
                }
                else if ((psys->flag & PSYS_HAIR_DYNAMICS) && psys->clmd && psys->clmd->coll_parms) {
-                       add_collision_relations(psys_key, scene_, ob, psys->clmd->coll_parms->group, ob->lay | scene_->lay, true, "Hair Collision");
+                       add_collision_relations(psys_key, scene_, object, psys->clmd->coll_parms->group, object->lay | scene_->lay, true, "Hair Collision");
                }
 
                /* effectors */
-               add_forcefield_relations(psys_key, scene_, ob, psys, part->effector_weights, part->type == PART_HAIR, "Particle Field");
+               add_forcefield_relations(psys_key, scene_, object, psys, part->effector_weights, part->type == PART_HAIR, "Particle Field");
 
                /* boids */
                if (part->boids) {
@@ -1421,7 +1421,7 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
         * TODO(sergey): This relation should be altered once real granular update
         * is implemented.
         */
-       ComponentKey transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
+       ComponentKey transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM);
        add_relation(transform_key, obdata_ubereval_key, "Partcile Eval");
 
        /* pointcache */
@@ -1485,27 +1485,27 @@ void DepsgraphRelationBuilder::build_shapekeys(ID *obdata, Key *key)
  *   re-evaluation of the individual instances of this geometry.
  */
 // TODO: Materials and lighting should probably get their own component, instead of being lumped under geometry?
-void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
+void DepsgraphRelationBuilder::build_obdata_geom(Object *object)
 {
-       ID *obdata = (ID *)ob->data;
+       ID *obdata = (ID *)object->data;
 
        /* Init operation of object-level geometry evaluation. */
-       OperationKey geom_init_key(&ob->id, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_PLACEHOLDER, "Eval Init");
+       OperationKey geom_init_key(&object->id, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_PLACEHOLDER, "Eval Init");
 
        /* get nodes for result of obdata's evaluation, and geometry evaluation on object */
        ComponentKey obdata_geom_key(obdata, DEG_NODE_TYPE_GEOMETRY);
-       ComponentKey geom_key(&ob->id, DEG_NODE_TYPE_GEOMETRY);
+       ComponentKey geom_key(&object->id, DEG_NODE_TYPE_GEOMETRY);
 
        /* link components to each other */
        add_relation(obdata_geom_key, geom_key, "Object Geometry Base Data");
 
        /* Modifiers */
-       if (ob->modifiers.first != NULL) {
-               OperationKey obdata_ubereval_key(&ob->id,
+       if (object->modifiers.first != NULL) {
+               OperationKey obdata_ubereval_key(&object->id,
                                                 DEG_NODE_TYPE_GEOMETRY,
                                                 DEG_OPCODE_GEOMETRY_UBEREVAL);
 
-               LINKLIST_FOREACH (ModifierData *, md, &ob->modifiers) {
+               LINKLIST_FOREACH (ModifierData *, md, &object->modifiers) {
                        const ModifierTypeInfo *mti = modifierType_getInfo((ModifierType)md->type);
 
                        if (mti->updateDepsgraph) {
@@ -1514,11 +1514,11 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
                                        md,
                                        bmain_,
                                        scene_,
-                                       ob,
+                                       object,
                                        reinterpret_cast< ::DepsNodeHandle* >(&handle));
                        }
 
-                       if (BKE_object_modifier_use_time(ob, md)) {
+                       if (BKE_object_modifier_use_time(object, md)) {
                                TimeSourceKey time_src_key;
                                add_relation(time_src_key, obdata_ubereval_key, "Time Source");
 
@@ -1528,22 +1528,22 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
                                 * for either the modifier needing time, or that it is animated.
                                 */
                                /* XXX: Remove this hack when these links are added as part of build_animdata() instead */
-                               if (modifier_dependsOnTime(md) == false && needs_animdata_node(&ob->id)) {
-                                       ComponentKey animation_key(&ob->id, DEG_NODE_TYPE_ANIMATION);
+                               if (modifier_dependsOnTime(md) == false && needs_animdata_node(&object->id)) {
+                                       ComponentKey animation_key(&object->id, DEG_NODE_TYPE_ANIMATION);
                                        add_relation(animation_key, obdata_ubereval_key, "Modifier Animation");
                                }
                        }
 
                        if (md->type == eModifierType_Cloth) {
-                               build_cloth(ob, md);
+                               build_cloth(object, md);
                        }
                }
        }
 
        /* materials */
-       if (ob->totcol) {
-               for (int a = 1; a <= ob->totcol; a++) {
-                       Material *ma = give_current_material(ob, a);
+       if (object->totcol) {
+               for (int a = 1; a <= object->totcol; a++) {
+                       Material *ma = give_current_material(object, a);
                        if (ma != NULL) {
                                build_material(ma);
                        }
@@ -1551,7 +1551,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
        }
 
        /* geometry collision */
-       if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_LATTICE)) {
+       if (ELEM(object->type, OB_MESH, OB_CURVE, OB_LATTICE)) {
                // add geometry collider relations
        }
 
@@ -1559,9 +1559,9 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
         *
         * TODO(sergey): Get rid of this node.
         */
-       if (ob->type != OB_ARMATURE) {
+       if (object->type != OB_ARMATURE) {
                /* Armatures does no longer require uber node. */
-               OperationKey obdata_ubereval_key(&ob->id, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_GEOMETRY_UBEREVAL);
+               OperationKey obdata_ubereval_key(&object->id, DEG_NODE_TYPE_GEOMETRY, DEG_OPCODE_GEOMETRY_UBEREVAL);
                add_relation(geom_init_key, obdata_ubereval_key, "Object Geometry UberEval");
        }
 
@@ -1576,7 +1576,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
        add_relation(obdata_geom_eval_key, obdata_geom_done_key, "ObData Geom Eval Done");
 
        /* type-specific node/links */
-       switch (ob->type) {
+       switch (object->type) {
                case OB_MESH:
                        /* NOTE: This is compatibility code to support particle systems
                         *
@@ -1586,9 +1586,9 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
                         *
                         * Ideally we need to get rid of this relation.
                         */
-                       if (object_particles_depends_on_time(ob)) {
+                       if (object_particles_depends_on_time(object)) {
                                TimeSourceKey time_key;
-                               OperationKey obdata_ubereval_key(&ob->id,
+                               OperationKey obdata_ubereval_key(&object->id,
                                                                 DEG_NODE_TYPE_GEOMETRY,
                                                                 DEG_OPCODE_GEOMETRY_UBEREVAL);
                                add_relation(time_key, obdata_ubereval_key, "Legacy particle time");
@@ -1597,10 +1597,10 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
 
                case OB_MBALL:
                {
-                       Object *mom = BKE_mball_basis_find(scene_, ob);
+                       Object *mom = BKE_mball_basis_find(scene_, object);
                        ComponentKey mom_geom_key(&mom->id, DEG_NODE_TYPE_GEOMETRY);
                        /* motherball - mom depends on children! */
-                       if (mom == ob) {
+                       if (mom == object) {
                                ComponentKey mom_transform_key(&mom->id,
                                                               DEG_NODE_TYPE_TRANSFORM);
                                add_relation(mom_transform_key,
@@ -1608,7 +1608,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
                                             "Metaball Motherball Transform -> Geometry");
                        }
                        else {
-                               ComponentKey transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
+                               ComponentKey transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM);
                                add_relation(geom_key, mom_geom_key, "Metaball Motherball");
                                add_relation(transform_key, mom_geom_key, "Metaball Motherball");
                        }
@@ -1632,7 +1632,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
                                build_object(cu->taperobj);
                                add_relation(taperob_key, geom_key, "Curve Taper");
                        }
-                       if (ob->type == OB_FONT) {
+                       if (object->type == OB_FONT) {
                                if (cu->textoncurve) {
                                        ComponentKey textoncurve_key(&cu->textoncurve->id, DEG_NODE_TYPE_GEOMETRY);
                                        build_object(cu->textoncurve);
@@ -1654,7 +1654,7 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
        }
 
        /* ShapeKeys */
-       Key *key = BKE_key_from_object(ob);
+       Key *key = BKE_key_from_object(object);
        if (key) {
                build_shapekeys(obdata, key);
        }
@@ -1672,9 +1672,9 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
 
 /* Cameras */
 // TODO: Link scene-camera links in somehow...
-void DepsgraphRelationBuilder::build_camera(Object *ob)
+void DepsgraphRelationBuilder::build_camera(Object *object)
 {
-       Camera *cam = (Camera *)ob->data;
+       Camera *cam = (Camera *)object->data;
        ID *camera_id = &cam->id;
        if (camera_id->tag & LIB_TAG_DOIT) {
                return;
@@ -1690,16 +1690,16 @@ void DepsgraphRelationBuilder::build_camera(Object *ob)
 
        /* DOF */
        if (cam->dof_ob) {
-               ComponentKey ob_param_key(&ob->id, DEG_NODE_TYPE_PARAMETERS);
+               ComponentKey ob_param_key(&object->id, DEG_NODE_TYPE_PARAMETERS);
                ComponentKey dof_ob_key(&cam->dof_ob->id, DEG_NODE_TYPE_TRANSFORM);
                add_relation(dof_ob_key, ob_param_key, "Camera DOF");
        }
 }
 
 /* Lamps */
-void DepsgraphRelationBuilder::build_lamp(Object *ob)
+void DepsgraphRelationBuilder::build_lamp(Object *object)
 {
-       Lamp *la = (Lamp *)ob->data;
+       Lamp *la = (Lamp *)object->data;
        ID *lamp_id = &la->id;
        if (lamp_id->tag & LIB_TAG_DOIT) {
                return;
index 86227f4aaf801e58febc18e0398719ef37eaedda..3be7472dbfce7ab239d5e1743e0ba140d68786ad 100644 (file)
@@ -186,8 +186,8 @@ struct DepsgraphRelationBuilder
 
        void build_scene(Scene *scene);
        void build_group(Object *object, Group *group);
-       void build_object(Object *ob);
-       void build_object_parent(Object *ob);
+       void build_object(Object *object);
+       void build_object_parent(Object *object);
        void build_constraints(ID *id,
                               eDepsNode_Type component_type,
                               const char *component_subdata,
@@ -197,22 +197,22 @@ struct DepsgraphRelationBuilder
        void build_driver(ID *id, FCurve *fcurve);
        void build_world(World *world);
        void build_rigidbody(Scene *scene);
-       void build_particles(Object *ob);
+       void build_particles(Object *object);
        void build_cloth(Object *object, ModifierData *md);
-       void build_ik_pose(Object *ob,
+       void build_ik_pose(Object *object,
                           bPoseChannel *pchan,
                           bConstraint *con,
                           RootPChanMap *root_map);
-       void build_splineik_pose(Object *ob,
+       void build_splineik_pose(Object *object,
                                 bPoseChannel *pchan,
                                 bConstraint *con,
                                 RootPChanMap *root_map);
-       void build_rig(Object *ob);
-       void build_proxy_rig(Object *ob);
+       void build_rig(Object *object);
+       void build_proxy_rig(Object *object);
        void build_shapekeys(ID *obdata, Key *key);
-       void build_obdata_geom(Object *ob);
-       void build_camera(Object *ob);
-       void build_lamp(Object *ob);
+       void build_obdata_geom(Object *object);
+       void build_camera(Object *object);
+       void build_lamp(Object *object);
        void build_nodetree(bNodeTree *ntree);
        void build_material(Material *ma);
        void build_texture(Tex *tex);
@@ -225,14 +225,14 @@ struct DepsgraphRelationBuilder
 
        void add_collision_relations(const OperationKey &key,
                                     Scene *scene,
-                                    Object *ob,
+                                    Object *object,
                                     Group *group,
                                     int layer,
                                     bool dupli,
                                     const char *name);
        void add_forcefield_relations(const OperationKey &key,
                                      Scene *scene,
-                                     Object *ob,
+                                     Object *object,
                                      ParticleSystem *psys,
                                      EffectorWeights *eff,
                                      bool add_absorption,
index 6ff21393ed6a1fffe8669a7afd6c18f89285d585..cdc98ad6b6a58f44e0112d8fa1f6da06c8a00908 100644 (file)
@@ -71,7 +71,7 @@ extern "C" {
 namespace DEG {
 
 /* IK Solver Eval Steps */
-void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
+void DepsgraphRelationBuilder::build_ik_pose(Object *object,
                                              bPoseChannel *pchan,
                                              bConstraint *con,
                                              RootPChanMap *root_map)
@@ -86,10 +86,10 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
        if (rootchan == NULL) {
                return;
        }
-       OperationKey pchan_local_key(&ob->id, DEG_NODE_TYPE_BONE,
+       OperationKey pchan_local_key(&object->id, DEG_NODE_TYPE_BONE,
                                     pchan->name, DEG_OPCODE_BONE_LOCAL);
-       OperationKey init_ik_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT_IK);
-       OperationKey solver_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE,
+       OperationKey init_ik_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT_IK);
+       OperationKey solver_key(&object->id, DEG_NODE_TYPE_EVAL_POSE,
                                rootchan->name,
                                DEG_OPCODE_POSE_IK_SOLVER);
 
@@ -107,10 +107,10 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                 * testing IK solver.
                 */
                // FIXME: geometry targets...
-               ComponentKey pose_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE);
+               ComponentKey pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE);
                if ((data->tar->type == OB_ARMATURE) && (data->subtarget[0])) {
                        /* TODO(sergey): This is only for until granular update stores intermediate result. */
-                       if (data->tar != ob) {
+                       if (data->tar != object) {
                                /* different armature - can just read the results */
                                ComponentKey target_key(&data->tar->id, DEG_NODE_TYPE_BONE, data->subtarget);
                                add_relation(target_key, pose_key, con->name);
@@ -140,7 +140,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                        add_relation(target_key, pose_key, con->name);
                }
 
-               if ((data->tar == ob) && (data->subtarget[0])) {
+               if ((data->tar == object) && (data->subtarget[0])) {
                        /* Prevent target's constraints from linking to anything from same
                         * chain that it controls.
                         */
@@ -181,7 +181,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
        bPoseChannel *parchan = pchan;
        /* exclude tip from chain? */
        if (!(data->flag & CONSTRAINT_IK_TIP)) {
-               OperationKey tip_transforms_key(&ob->id, DEG_NODE_TYPE_BONE,
+               OperationKey tip_transforms_key(&object->id, DEG_NODE_TYPE_BONE,
                                                parchan->name, DEG_OPCODE_BONE_LOCAL);
                add_relation(solver_key, tip_transforms_key, "IK Solver Result");
                parchan = pchan->parent;
@@ -189,7 +189,7 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
 
        root_map->add_bone(parchan->name, rootchan->name);
 
-       OperationKey parchan_transforms_key(&ob->id, DEG_NODE_TYPE_BONE,
+       OperationKey parchan_transforms_key(&object->id, DEG_NODE_TYPE_BONE,
                                            parchan->name, DEG_OPCODE_BONE_READY);
        add_relation(parchan_transforms_key, solver_key, "IK Solver Owner");
 
@@ -205,14 +205,14 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                 * grab the result with IK solver results...
                 */
                if (parchan != pchan) {
-                       OperationKey parent_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_READY);
+                       OperationKey parent_key(&object->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_READY);
                        add_relation(parent_key, solver_key, "IK Chain Parent");
 
-                       OperationKey done_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
+                       OperationKey done_key(&object->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                        add_relation(solver_key, done_key, "IK Chain Result");
                }
                else {
-                       OperationKey final_transforms_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
+                       OperationKey final_transforms_key(&object->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                        add_relation(solver_key, final_transforms_key, "IK Solver Result");
                }
                parchan->flag |= POSE_DONE;
@@ -228,20 +228,20 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
                parchan  = parchan->parent;
        }
 
-       OperationKey flush_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
+       OperationKey flush_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
        add_relation(solver_key, flush_key, "PoseEval Result-Bone Link");
 }
 
 /* Spline IK Eval Steps */
-void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
+void DepsgraphRelationBuilder::build_splineik_pose(Object *object,
                                                    bPoseChannel *pchan,
                                                    bConstraint *con,
                                                    RootPChanMap *root_map)
 {
        bSplineIKConstraint *data = (bSplineIKConstraint *)con->data;
        bPoseChannel *rootchan = BKE_armature_splineik_solver_find_root(pchan, data);
-       OperationKey transforms_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
-       OperationKey solver_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name, DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
+       OperationKey transforms_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
+       OperationKey solver_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name, DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
 
        /* attach owner to IK Solver too
         * - assume that owner is always part of chain
@@ -257,12 +257,12 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
                 */
                // TODO: the bigggest point here is that we need the curve PATH and not just the general geometry...
                ComponentKey target_key(&data->tar->id, DEG_NODE_TYPE_GEOMETRY);
-               ComponentKey pose_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE);
+               ComponentKey pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE);
                add_relation(target_key, pose_key, "[Curve.Path -> Spline IK] DepsRel");
        }
 
        pchan->flag |= POSE_DONE;
-       OperationKey final_transforms_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
+       OperationKey final_transforms_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
        add_relation(solver_key, final_transforms_key, "Spline IK Result");
 
        root_map->add_bone(pchan->name, rootchan->name);
@@ -279,15 +279,15 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
                 * grab the result with IK solver results...
                 */
                if (parchan != pchan) {
-                       OperationKey parent_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_READY);
+                       OperationKey parent_key(&object->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_READY);
                        add_relation(parent_key, solver_key, "Spline IK Solver Update");
 
-                       OperationKey done_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
+                       OperationKey done_key(&object->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                        add_relation(solver_key, done_key, "IK Chain Result");
                }
                parchan->flag |= POSE_DONE;
 
-               OperationKey final_transforms_key(&ob->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
+               OperationKey final_transforms_key(&object->id, DEG_NODE_TYPE_BONE, parchan->name, DEG_OPCODE_BONE_DONE);
                add_relation(solver_key, final_transforms_key, "Spline IK Solver Result");
 
                root_map->add_bone(parchan->name, rootchan->name);
@@ -297,22 +297,22 @@ void DepsgraphRelationBuilder::build_splineik_pose(Object *ob,
                if ((segcount == data->chainlen) || (segcount > 255)) break;  /* 255 is weak */
        }
 
-       OperationKey flush_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
+       OperationKey flush_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
        add_relation(solver_key, flush_key, "PoseEval Result-Bone Link");
 }
 
 /* Pose/Armature Bones Graph */
-void DepsgraphRelationBuilder::build_rig(Object *ob)
+void DepsgraphRelationBuilder::build_rig(Object *object)
 {
        /* Armature-Data */
-       bArmature *arm = (bArmature *)ob->data;
+       bArmature *arm = (bArmature *)object->data;
 
        // TODO: selection status?
 
        /* attach links between pose operations */
-       OperationKey init_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT);
-       OperationKey init_ik_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT_IK);
-       OperationKey flush_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
+       OperationKey init_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT);
+       OperationKey init_ik_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT_IK);
+       OperationKey flush_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
 
        add_relation(init_key, init_ik_key, "Pose Init -> Pose Init IK");
        add_relation(init_ik_key, flush_key, "Pose Init IK -> Pose Cleanup");
@@ -324,8 +324,8 @@ void DepsgraphRelationBuilder::build_rig(Object *ob)
                                  "Armature Eval");
        add_relation(armature_key, init_key, "Data dependency");
 
-       if (needs_animdata_node(&ob->id)) {
-               ComponentKey animation_key(&ob->id, DEG_NODE_TYPE_ANIMATION);
+       if (needs_animdata_node(&object->id)) {
+               ComponentKey animation_key(&object->id, DEG_NODE_TYPE_ANIMATION);
                add_relation(animation_key, init_key, "Rig Animation");
        }
 
@@ -346,16 +346,16 @@ void DepsgraphRelationBuilder::build_rig(Object *ob)
         */
        RootPChanMap root_map;
        bool pose_depends_on_local_transform = false;
-       LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
+       LINKLIST_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
                LINKLIST_FOREACH (bConstraint *, con, &pchan->constraints) {
                        switch (con->type) {
                                case CONSTRAINT_TYPE_KINEMATIC:
-                                       build_ik_pose(ob, pchan, con, &root_map);
+                                       build_ik_pose(object, pchan, con, &root_map);
                                        pose_depends_on_local_transform = true;
                                        break;
 
                                case CONSTRAINT_TYPE_SPLINEIK:
-                                       build_splineik_pose(ob, pchan, con, &root_map);
+                                       build_splineik_pose(object, pchan, con, &root_map);
                                        pose_depends_on_local_transform = true;
                                        break;
 
@@ -381,17 +381,17 @@ void DepsgraphRelationBuilder::build_rig(Object *ob)
                /* TODO(sergey): Once partial updates are possible use relation between
                 * object transform and solver itself in it's build function.
                 */
-               ComponentKey pose_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE);
-               ComponentKey local_transform_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
+               ComponentKey pose_key(&object->id, DEG_NODE_TYPE_EVAL_POSE);
+               ComponentKey local_transform_key(&object->id, DEG_NODE_TYPE_TRANSFORM);
                add_relation(local_transform_key, pose_key, "Local Transforms");
        }
 
        /* links between operations for each bone */
-       LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
-               OperationKey bone_local_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
-               OperationKey bone_pose_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_POSE_PARENT);
-               OperationKey bone_ready_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
-               OperationKey bone_done_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
+       LINKLIST_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
+               OperationKey bone_local_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
+               OperationKey bone_pose_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_POSE_PARENT);
+               OperationKey bone_ready_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
+               OperationKey bone_done_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
 
                pchan->flag &= ~POSE_DONE;
 
@@ -413,17 +413,17 @@ void DepsgraphRelationBuilder::build_rig(Object *ob)
                                parent_key_opcode = DEG_OPCODE_BONE_DONE;
                        }
 
-                       OperationKey parent_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->parent->name, parent_key_opcode);
+                       OperationKey parent_key(&object->id, DEG_NODE_TYPE_BONE, pchan->parent->name, parent_key_opcode);
                        add_relation(parent_key, bone_pose_key, "[Parent Bone -> Child Bone]");
                }
 
                /* constraints */
                if (pchan->constraints.first != NULL) {
                        /* constraints stack and constraint dependencies */
-                       build_constraints(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, &pchan->constraints, &root_map);
+                       build_constraints(&object->id, DEG_NODE_TYPE_BONE, pchan->name, &pchan->constraints, &root_map);
 
                        /* pose -> constraints */
-                       OperationKey constraints_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_CONSTRAINTS);
+                       OperationKey constraints_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_CONSTRAINTS);
                        add_relation(bone_pose_key, constraints_key, "Constraints Stack");
 
                        /* constraints -> ready */
@@ -447,14 +447,14 @@ void DepsgraphRelationBuilder::build_rig(Object *ob)
        }
 }
 
-void DepsgraphRelationBuilder::build_proxy_rig(Object *ob)
+void DepsgraphRelationBuilder::build_proxy_rig(Object *object)
 {
-       OperationKey pose_init_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT);
-       OperationKey pose_done_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
-       LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
-               OperationKey bone_local_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
-               OperationKey bone_ready_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
-               OperationKey bone_done_key(&ob->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_DONE);
+       OperationKey pose_init_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT);
+       OperationKey pose_done_key(&object->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_DONE);
+       LINKLIST_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
+               OperationKey bone_local_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_LOCAL);
+               OperationKey bone_ready_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_BONE_READY);
+               OperationKey bone_done_key(&object->id, DEG_NODE_TYPE_BONE, pchan->name, DEG_OPCODE_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");
index bedcb5aa223f68a503ce7c1058781baacf0532c0..bface46c20134fdb644a4ee65a4d08c67019df24 100644 (file)
@@ -78,8 +78,8 @@ void DepsgraphRelationBuilder::build_scene(Scene *scene)
 
        /* scene objects */
        LINKLIST_FOREACH (Base *, base, &scene->base) {
-               Object *ob = base->object;
-               build_object(ob);
+               Object *object = base->object;
+               build_object(object);
        }
 
        /* rigidbody */
index aa21f0995be2c2ea81fcc0c2c4211ea38803141a..a17b083feb9f012f5d2362c470966baca5e13715 100644 (file)
@@ -144,19 +144,19 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
                return true;
        }
        else if (RNA_struct_is_a(ptr->type, &RNA_Constraint)) {
-               Object *ob = (Object *)ptr->id.data;
+               Object *object = (Object *)ptr->id.data;
                bConstraint *con = (bConstraint *)ptr->data;
 
                /* object or bone? */
-               if (BLI_findindex(&ob->constraints, con) != -1) {
+               if (BLI_findindex(&object->constraints, con) != -1) {
                        /* object transform */
                        // XXX: for now, we can't address the specific constraint or the constraint stack...
                        *type = DEG_NODE_TYPE_TRANSFORM;
                        return true;
                }
-               else if (ob->pose) {
+               else if (object->pose) {
                        bPoseChannel *pchan;
-                       for (pchan = (bPoseChannel *)ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+                       for (pchan = (bPoseChannel *)object->pose->chanbase.first; pchan; pchan = pchan->next) {
                                if (BLI_findindex(&pchan->constraints, con) != -1) {
                                        /* bone transforms */
                                        *type = DEG_NODE_TYPE_BONE;
@@ -180,7 +180,7 @@ static bool pointer_to_component_node_criteria(const PointerRNA *ptr,
                return true;
        }
        else if (ptr->type == &RNA_Object) {
-               //Object *ob = (Object *)ptr->data;
+               //Object *object = (Object *)ptr->data;
 
                /* Transforms props? */
                if (prop) {
index fb762505ed2795d744b4f0e4ac5cf729845e7003..4b3d4190dcd53257056b4a46f050c4e076f4cb1b 100644 (file)
@@ -124,12 +124,12 @@ void DEG_add_scene_relation(DepsNodeHandle *handle,
 }
 
 void DEG_add_object_relation(DepsNodeHandle *handle,
-                             Object *ob,
+                             Object *object,
                              eDepsObjectComponentType component,
                              const char *description)
 {
        DEG::eDepsNode_Type type = deg_build_object_component_type(component);
-       DEG::ComponentKey comp_key(&ob->id, type);
+       DEG::ComponentKey comp_key(&object->id, type);
        DEG::DepsNodeHandle *deg_handle = get_handle(handle);
        deg_handle->builder->add_node_handle_relation(comp_key,
                                                      deg_handle,
@@ -150,13 +150,13 @@ void DEG_add_object_cache_relation(DepsNodeHandle *handle,
 }
 
 void DEG_add_bone_relation(DepsNodeHandle *handle,
-                           Object *ob,
+                           Object *object,
                            const char *bone_name,
                            eDepsObjectComponentType component,
                            const char *description)
 {
        DEG::eDepsNode_Type type = deg_build_object_component_type(component);
-       DEG::ComponentKey comp_key(&ob->id, type, bone_name);
+       DEG::ComponentKey comp_key(&object->id, type, bone_name);
        DEG::DepsNodeHandle *deg_handle = get_handle(handle);
        /* XXX: "Geometry Eval" might not always be true, but this only gets called
         * from modifier building now.
@@ -314,7 +314,7 @@ void DEG_scene_graph_free(Scene *scene)
 
 void DEG_add_collision_relations(DepsNodeHandle *handle,
                                  Scene *scene,
-                                 Object *ob,
+                                 Object *object,
                                  Group *group,
                                  int layer,
                                  unsigned int modifier_type,
@@ -323,7 +323,7 @@ void DEG_add_collision_relations(DepsNodeHandle *handle,
                                  const char *name)
 {
        unsigned int numcollobj;
-       Object **collobjs = get_collisionobjects_ext(scene, ob, group, layer, &numcollobj, modifier_type, dupli);
+       Object **collobjs = get_collisionobjects_ext(scene, object, group, layer, &numcollobj, modifier_type, dupli);
 
        for (unsigned int i = 0; i < numcollobj; i++) {
                Object *ob1 = collobjs[i];
@@ -340,17 +340,17 @@ void DEG_add_collision_relations(DepsNodeHandle *handle,
 
 void DEG_add_forcefield_relations(DepsNodeHandle *handle,
                                   Scene *scene,
-                                  Object *ob,
+                                  Object *object,
                                   EffectorWeights *effector_weights,
                                   bool add_absorption,
                                   int skip_forcefield,
                                   const char *name)
 {
-       ListBase *effectors = pdInitEffectors(scene, ob, NULL, effector_weights, false);
+       ListBase *effectors = pdInitEffectors(scene, object, NULL, effector_weights, false);
 
        if (effectors) {
                for (EffectorCache *eff = (EffectorCache*)effectors->first; eff; eff = eff->next) {
-                       if (eff->ob != ob && eff->pd->forcefield != skip_forcefield) {
+                       if (eff->ob != object && eff->pd->forcefield != skip_forcefield) {
                                DEG_add_object_relation(handle, eff->ob, DEG_OB_COMP_TRANSFORM, name);
 
                                if (eff->psys) {
@@ -376,7 +376,7 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
                                if (add_absorption && (eff->pd->flag & PFIELD_VISIBILITY)) {
                                        DEG_add_collision_relations(handle,
                                                                    scene,
-                                                                   ob,
+                                                                   object,
                                                                    NULL,
                                                                    eff->ob->lay,
                                                                    eModifierType_Collision,
index e87c87813e3be824f3b0f8a59c95dbc4e3be6bcd..f21665eeb823747150590b5bd6116c639c32e316 100644 (file)
@@ -383,8 +383,8 @@ void BoneComponentDepsNode::init(const ID *id, const char *subdata)
        //this->name = subdata;
 
        /* bone-specific node data */
-       Object *ob = (Object *)id;
-       this->pchan = BKE_pose_channel_find_name(ob->pose, subdata);
+       Object *object = (Object *)id;
+       this->pchan = BKE_pose_channel_find_name(object->pose, subdata);
 }
 
 DEG_DEPSNODE_DEFINE(BoneComponentDepsNode, DEG_NODE_TYPE_BONE, "Bone Component");