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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-23 13:42:06 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-23 13:47:47 +0300
commit7ba1babc902b9baf460b26ac24a19497231b64b5 (patch)
treea1c0fa2bfb1c458b0fd3f88f5f7c0c4c50ef5fd8 /source/blender
parent99f518043537238577b332be64f83a812fbb4253 (diff)
parentf3fa5c1258d2fb08b83e080b99172ccc0dc1d67a (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_build.h10
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc164
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.h24
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc46
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc288
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.h24
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc98
-rw-r--r--source/blender/depsgraph/intern/depsgraph.cc10
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc20
-rw-r--r--source/blender/depsgraph/intern/depsgraph_query.cc14
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_flush.cc2
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.cc4
12 files changed, 352 insertions, 352 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h
index c85c15e2aa2..334b15cc638 100644
--- a/source/blender/depsgraph/DEG_depsgraph_build.h
+++ b/source/blender/depsgraph/DEG_depsgraph_build.h
@@ -136,12 +136,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);
@@ -159,7 +159,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,
unsigned int modifier_type,
DEG_CollobjFilterFunction fn,
@@ -167,7 +167,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,
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index ae6be5256dd..aea74af6861 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -121,7 +121,7 @@ struct BuilderWalkUserData {
};
static void modifier_walk(void *user_data,
- struct Object * /*ob*/,
+ struct Object * /*object*/,
struct Object **obpoin,
int /*cb_flag*/)
{
@@ -396,56 +396,56 @@ void DepsgraphNodeBuilder::build_group(Group *group)
}
}
-void DepsgraphNodeBuilder::build_object(Object *ob,
+void DepsgraphNodeBuilder::build_object(Object *object,
eDepsNode_LinkedState_Type linked_state)
{
/* Skip rest of components if the ID node was already there. */
- if (ob->id.tag & LIB_TAG_DOIT) {
- IDDepsNode *id_node = find_id_node(&ob->id);
+ if (object->id.tag & LIB_TAG_DOIT) {
+ IDDepsNode *id_node = find_id_node(&object->id);
id_node->linked_state = max(id_node->linked_state, linked_state);
return;
}
- ob->id.tag |= LIB_TAG_DOIT;
+ object->id.tag |= LIB_TAG_DOIT;
/* Create ID node for object and begin init. */
- IDDepsNode *id_node = add_id_node(&ob->id);
+ IDDepsNode *id_node = add_id_node(&object->id);
id_node->linked_state = linked_state;
- ob->customdata_mask = 0;
+ object->customdata_mask = 0;
/* Standard components. */
- build_object_transform(ob);
+ build_object_transform(object);
- if (ob->parent != NULL) {
- build_object(ob->parent, linked_state);
+ if (object->parent != NULL) {
+ build_object(object->parent, linked_state);
}
- 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;
}
@@ -453,29 +453,29 @@ void DepsgraphNodeBuilder::build_object(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;
case OB_LIGHTPROBE:
- build_lightprobe(ob);
+ build_lightprobe(object);
break;
default:
{
- ID *obdata = (ID *)ob->data;
+ ID *obdata = (ID *)object->data;
if ((obdata->tag & LIB_TAG_DOIT) == 0) {
build_animdata(obdata);
}
@@ -490,38 +490,38 @@ void DepsgraphNodeBuilder::build_object(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(ob->proxy, DEG_ID_LINKED_INDIRECTLY);
+ if (object->proxy) {
+ object->proxy->proxy_from = object;
+ build_object(object->proxy, DEG_ID_LINKED_INDIRECTLY);
}
/* Object dupligroup. */
- if (ob->dup_group != NULL) {
- build_group(ob->dup_group);
+ if (object->dup_group != NULL) {
+ build_group(object->dup_group);
}
}
-void DepsgraphNodeBuilder::build_object_transform(Object *ob)
+void DepsgraphNodeBuilder::build_object_transform(Object *object)
{
OperationDepsNode *op_node;
Scene *scene_cow = get_cow_datablock(scene_);
- Object *ob_cow = get_cow_datablock(ob);
+ Object *ob_cow = get_cow_datablock(object);
/* local transforms (from transform channels - loc/rot/scale + deltas) */
- op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
+ op_node = add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
function_bind(BKE_object_eval_local_transform,
_1,
scene_cow,
@@ -530,8 +530,8 @@ void DepsgraphNodeBuilder::build_object_transform(Object *ob)
op_node->set_as_entry();
/* object parent */
- if (ob->parent != NULL) {
- add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
+ if (object->parent != NULL) {
+ add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
function_bind(BKE_object_eval_parent,
_1,
scene_cow,
@@ -540,12 +540,12 @@ void DepsgraphNodeBuilder::build_object_transform(Object *ob)
}
/* object constraints */
- if (ob->constraints.first != NULL) {
- build_object_constraints(ob);
+ if (object->constraints.first != NULL) {
+ build_object_constraints(object);
}
/* Rest of transformation update. */
- add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
+ add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
function_bind(BKE_object_eval_uber_transform,
_1,
scene_cow,
@@ -553,7 +553,7 @@ void DepsgraphNodeBuilder::build_object_transform(Object *ob)
DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
/* object transform is done */
- op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
+ op_node = add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
function_bind(BKE_object_eval_done,
_1,
ob_cow),
@@ -578,14 +578,14 @@ 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,
+ add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
function_bind(BKE_object_eval_constraints,
_1,
get_cow_datablock(scene_),
- get_cow_datablock(ob)),
+ get_cow_datablock(object)),
DEG_OPCODE_TRANSFORM_CONSTRAINTS);
}
@@ -746,26 +746,26 @@ 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,
+ add_operation_node(&object->id, DEG_NODE_TYPE_TRANSFORM,
function_bind(
BKE_rigidbody_object_sync_transforms,
_1,
scene_cow,
- get_cow_datablock(ob)),
+ get_cow_datablock(object)),
DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY);
}
}
}
-void DepsgraphNodeBuilder::build_particles(Object *ob)
+void DepsgraphNodeBuilder::build_particles(Object *object)
{
/**
* Particle Systems Nodes
@@ -784,11 +784,11 @@ 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);
/* TODO(sergey): Need to get COW of PSYS. */
Scene *scene_cow = get_cow_datablock(scene_);
- Object *ob_cow = get_cow_datablock(ob);
+ Object *ob_cow = get_cow_datablock(object);
add_operation_node(psys_comp,
function_bind(BKE_particle_system_eval_init,
@@ -798,7 +798,7 @@ void DepsgraphNodeBuilder::build_particles(Object *ob)
DEG_OPCODE_PARTICLE_SYSTEM_EVAL_INIT);
/* particle systems */
- LINKLIST_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
+ LINKLIST_FOREACH (ParticleSystem *, psys, &object->particlesystem) {
ParticleSettings *part = psys->part;
/* Build particle settings operations.
@@ -871,18 +871,18 @@ 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)
{
OperationDepsNode *op_node;
Scene *scene_cow = get_cow_datablock(scene_);
- Object *object_cow = get_cow_datablock(ob);
+ Object *object_cow = get_cow_datablock(object);
/* TODO(sergey): This way using this object's properties as driver target
* works fine.
*
* 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);
@@ -895,7 +895,7 @@ 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,
@@ -904,7 +904,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
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,
@@ -914,16 +914,16 @@ 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 */
- if (ob->totcol != 0) {
- if (ob->type == OB_MESH) {
- add_operation_node(&ob->id,
+ if (object->totcol != 0) {
+ if (object->type == OB_MESH) {
+ add_operation_node(&object->id,
DEG_NODE_TYPE_SHADING,
function_bind(BKE_object_eval_update_shading,
_1,
@@ -931,8 +931,8 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
DEG_OPCODE_SHADING);
}
- 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);
}
@@ -940,11 +940,11 @@ void DepsgraphNodeBuilder::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
}
- ID *obdata = (ID *)ob->data;
+ ID *obdata = (ID *)object->data;
if (obdata->tag & LIB_TAG_DOIT) {
return;
}
@@ -954,7 +954,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
ID *obdata_cow = get_cow_id(obdata);
/* ShapeKeys */
- Key *key = BKE_key_from_object(ob);
+ Key *key = BKE_key_from_object(object);
if (key) {
build_shapekeys(key);
}
@@ -964,10 +964,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,
@@ -983,11 +983,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,
@@ -1033,7 +1033,7 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
if (cu->taperobj != NULL) {
build_object(cu->taperobj, DEG_ID_LINKED_INDIRECTLY);
}
- if (ob->type == OB_FONT && cu->textoncurve != NULL) {
+ if (object->type == OB_FONT && cu->textoncurve != NULL) {
build_object(cu->textoncurve, DEG_ID_LINKED_INDIRECTLY);
}
break;
@@ -1066,10 +1066,10 @@ void DepsgraphNodeBuilder::build_obdata_geom(Object *ob)
}
/* Cameras */
-void DepsgraphNodeBuilder::build_camera(Object *ob)
+void DepsgraphNodeBuilder::build_camera(Object *object)
{
/* Object itself. */
- add_operation_node(&ob->id,
+ add_operation_node(&object->id,
DEG_NODE_TYPE_PARAMETERS,
NULL,
DEG_OPCODE_PARAMETERS_EVAL,
@@ -1077,7 +1077,7 @@ void DepsgraphNodeBuilder::build_camera(Object *ob)
/* Object data. */
/* 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;
@@ -1092,17 +1092,17 @@ void DepsgraphNodeBuilder::build_camera(Object *ob)
}
/* Lamps */
-void DepsgraphNodeBuilder::build_lamp(Object *ob)
+void DepsgraphNodeBuilder::build_lamp(Object *object)
{
/* Object itself. */
- add_operation_node(&ob->id,
+ add_operation_node(&object->id,
DEG_NODE_TYPE_PARAMETERS,
NULL,
DEG_OPCODE_PARAMETERS_EVAL,
"Lamp Parameters");
/* Object data. */
- Lamp *la = (Lamp *)ob->data;
+ Lamp *la = (Lamp *)object->data;
ID *lamp_id = &la->id;
if (lamp_id->tag & LIB_TAG_DOIT) {
return;
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
index 76977aa7e5b..a956c94a682 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
@@ -161,29 +161,29 @@ struct DepsgraphNodeBuilder {
ViewLayer *view_layer,
eDepsNode_LinkedState_Type linked_state);
void build_group(Group *group);
- void build_object(Object *ob,
+ void build_object(Object *object,
eDepsNode_LinkedState_Type linked_state);
- void build_object_transform(Object *ob);
- void build_object_constraints(Object *ob);
- void build_pose_constraints(Object *ob, bPoseChannel *pchan);
+ 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_particle_settings(ParticleSettings *part);
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);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
index 82b20a0d23c..70dfb3b8007 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
@@ -66,21 +66,21 @@ extern "C" {
namespace DEG {
-void DepsgraphNodeBuilder::build_pose_constraints(Object *ob,
+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,
+ add_operation_node(&object->id, DEG_NODE_TYPE_BONE, pchan->name,
function_bind(BKE_pose_constraints_evaluate,
_1,
get_cow_datablock(scene_),
- get_cow_datablock(ob),
+ get_cow_datablock(object),
pchan),
DEG_OPCODE_BONE_CONSTRAINTS);
}
/* IK Solver Eval Steps */
-void DepsgraphNodeBuilder::build_ik_pose(Object *ob,
+void DepsgraphNodeBuilder::build_ik_pose(Object *object,
bPoseChannel *pchan,
bConstraint *con)
{
@@ -92,24 +92,24 @@ void DepsgraphNodeBuilder::build_ik_pose(Object *ob,
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,
+ add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
function_bind(BKE_pose_iktree_evaluate,
_1,
get_cow_datablock(scene_),
- get_cow_datablock(ob),
+ get_cow_datablock(object),
rootchan),
DEG_OPCODE_POSE_IK_SOLVER);
}
/* Spline IK Eval Steps */
-void DepsgraphNodeBuilder::build_splineik_pose(Object *ob,
+void DepsgraphNodeBuilder::build_splineik_pose(Object *object,
bPoseChannel *pchan,
bConstraint *con)
{
@@ -122,11 +122,11 @@ void DepsgraphNodeBuilder::build_splineik_pose(Object *ob,
* 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,
+ add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
function_bind(BKE_pose_splineik_evaluate,
_1,
get_cow_datablock(scene_),
- get_cow_datablock(ob),
+ get_cow_datablock(object),
rootchan),
DEG_OPCODE_POSE_SPLINE_IK_SOLVER);
}
@@ -308,50 +308,50 @@ void DepsgraphNodeBuilder::build_rig(Object *object)
}
}
-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;
- Object *object_cow = get_cow_datablock(ob);
+ Object *object_cow = get_cow_datablock(object);
/* Sanity check. */
- BLI_assert(ob->pose != NULL);
+ BLI_assert(object->pose != NULL);
/* Animation. */
build_animdata(obdata);
/* 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,
object_cow),
DEG_OPCODE_POSE_INIT);
op_node->set_as_entry();
- LINKLIST_FOREACH (bPoseChannel *, pchan, &ob->pose->chanbase) {
+ LINKLIST_FOREACH (bPoseChannel *, pchan, &object->pose->chanbase) {
/* Local bone transform. */
- op_node = add_operation_node(&ob->id,
+ op_node = add_operation_node(&object->id,
DEG_NODE_TYPE_BONE,
pchan->name,
NULL,
DEG_OPCODE_BONE_LOCAL);
op_node->set_as_entry();
/* Bone is ready for solvers. */
- add_operation_node(&ob->id,
+ add_operation_node(&object->id,
DEG_NODE_TYPE_BONE,
pchan->name,
NULL,
DEG_OPCODE_BONE_READY);
/* Bone is fully evaluated. */
- op_node = add_operation_node(&ob->id,
+ 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,
+ op_node = add_operation_node(&object->id,
DEG_NODE_TYPE_EVAL_POSE,
NULL,
DEG_OPCODE_POSE_DONE);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 6a9023b5b6a..9da3046ff07 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -121,7 +121,7 @@ struct BuilderWalkUserData {
};
static void modifier_walk(void *user_data,
- struct Object * /*ob*/,
+ struct Object * /*object*/,
struct Object **obpoin,
int /*cb_flag*/)
{
@@ -328,10 +328,10 @@ void DepsgraphRelationBuilder::add_operation_relation(
}
}
-void DepsgraphRelationBuilder::add_collision_relations(const OperationKey &key, Scene *scene, Object *ob, Group *group, bool dupli, const char *name)
+void DepsgraphRelationBuilder::add_collision_relations(const OperationKey &key, Scene *scene, Object *object, Group *group, bool dupli, const char *name)
{
unsigned int numcollobj;
- Object **collobjs = get_collisionobjects_ext(scene, ob, group, &numcollobj, eModifierType_Collision, dupli);
+ Object **collobjs = get_collisionobjects_ext(scene, object, group, &numcollobj, eModifierType_Collision, dupli);
for (unsigned int i = 0; i < numcollobj; i++)
{
@@ -348,19 +348,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(NULL, scene, ob, psys, eff, false);
+ ListBase *effectors = pdInitEffectors(NULL, 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);
@@ -383,7 +383,7 @@ void DepsgraphRelationBuilder::add_forcefield_relations(const OperationKey &key,
}
if (add_absorption && (eff->pd->flag & PFIELD_VISIBILITY)) {
- add_collision_relations(key, scene, ob, NULL, true, "Force Absorption");
+ add_collision_relations(key, scene, object, NULL, true, "Force Absorption");
}
}
}
@@ -433,54 +433,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 */
@@ -496,7 +496,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.
*/
@@ -506,23 +506,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:
@@ -530,83 +530,83 @@ 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;
case OB_LIGHTPROBE:
- build_lightprobe(ob);
+ build_lightprobe(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;
}
@@ -614,7 +614,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 */
@@ -623,17 +623,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");
@@ -643,35 +643,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;
@@ -679,7 +679,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");
}
}
@@ -1012,9 +1012,9 @@ 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 = 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 != NULL) {
MEM_freeN(bone_name);
bone_name = NULL;
@@ -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_orig->name) == ID_OB) {
- Object *ob = (Object *)to_node->id_orig;
- // NOTE: ob->pose may be NULL
- bPoseChannel *pchan = BKE_pose_channel_find_name(ob->pose,
+ Object *object = (Object *)to_node->id_orig;
+ // NOTE: object->pose may be NULL
+ bPoseChannel *pchan = BKE_pose_channel_find_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);
@@ -1145,9 +1145,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!
@@ -1188,11 +1188,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;
@@ -1282,8 +1282,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;
}
@@ -1295,10 +1295,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");
@@ -1310,8 +1310,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");
@@ -1322,7 +1322,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)");
@@ -1336,17 +1336,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);
@@ -1360,21 +1360,21 @@ 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;
/* Build particle settings relations.
@@ -1384,7 +1384,7 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
build_particle_settings(part);
/* This particle system. */
- OperationKey psys_key(&ob->id,
+ OperationKey psys_key(&object->id,
DEG_NODE_TYPE_EVAL_PARTICLES,
DEG_OPCODE_PARTICLE_SYSTEM_EVAL,
psys->name);
@@ -1397,7 +1397,7 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
&part->id,
DEG_NODE_TYPE_PARAMETERS,
DEG_OPCODE_PARTICLE_SETTINGS_RECALC_CLEAR);
- OperationKey psys_settings_key(&ob->id,
+ OperationKey psys_settings_key(&object->id,
DEG_NODE_TYPE_EVAL_PARTICLES,
DEG_OPCODE_PARTICLE_SETTINGS_EVAL,
psys->name);
@@ -1408,7 +1408,7 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
"Particle Settings Recalc Clear");
/* 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");
@@ -1423,7 +1423,7 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
if (part->type != PART_HAIR) {
add_collision_relations(psys_key,
scene_,
- ob,
+ object,
part->collision_group,
true,
"Particle Collision");
@@ -1434,7 +1434,7 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
{
add_collision_relations(psys_key,
scene_,
- ob,
+ object,
psys->clmd->coll_parms->group,
true,
"Hair Collision");
@@ -1443,7 +1443,7 @@ void DepsgraphRelationBuilder::build_particles(Object *ob)
/* effectors */
add_forcefield_relations(psys_key,
scene_,
- ob,
+ object,
psys,
part->effector_weights,
part->type == PART_HAIR,
@@ -1479,7 +1479,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");
/* TODO(sergey): Do we need a point cache operations here? */
@@ -1562,21 +1562,21 @@ 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");
- OperationKey obdata_ubereval_key(&ob->id,
+ OperationKey obdata_ubereval_key(&object->id,
DEG_NODE_TYPE_GEOMETRY,
DEG_OPCODE_GEOMETRY_UBEREVAL);
@@ -1591,8 +1591,8 @@ void DepsgraphRelationBuilder::build_obdata_geom(Object *ob)
add_relation(scene_key, obdata_ubereval_key, "CoW Relation");
/* Modifiers */
- if (ob->modifiers.first != NULL) {
- LINKLIST_FOREACH (ModifierData *, md, &ob->modifiers) {
+ if (object->modifiers.first != NULL) {
+ LINKLIST_FOREACH (ModifierData *, md, &object->modifiers) {
const ModifierTypeInfo *mti = modifierType_getInfo((ModifierType)md->type);
if (mti->updateDepsgraph) {
@@ -1601,11 +1601,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");
@@ -1615,30 +1615,30 @@ 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);
- if (ob->type == OB_MESH) {
+ if (object->type == OB_MESH) {
OperationKey material_key(&ma->id,
DEG_NODE_TYPE_SHADING,
DEG_OPCODE_MATERIAL_UPDATE);
- OperationKey shading_key(&ob->id, DEG_NODE_TYPE_SHADING, DEG_OPCODE_SHADING);
+ OperationKey shading_key(&object->id, DEG_NODE_TYPE_SHADING, DEG_OPCODE_SHADING);
add_relation(material_key, shading_key, "Material Update");
}
}
@@ -1646,7 +1646,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
}
@@ -1654,9 +1654,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");
}
@@ -1671,7 +1671,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
*
@@ -1681,9 +1681,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");
@@ -1692,10 +1692,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,
@@ -1703,7 +1703,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");
}
@@ -1727,7 +1727,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);
@@ -1749,7 +1749,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);
}
@@ -1767,16 +1767,16 @@ 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;
}
camera_id->tag |= LIB_TAG_DOIT;
- ComponentKey object_parameters_key(&ob->id, DEG_NODE_TYPE_PARAMETERS);
+ ComponentKey object_parameters_key(&object->id, DEG_NODE_TYPE_PARAMETERS);
ComponentKey camera_parameters_key(camera_id, DEG_NODE_TYPE_PARAMETERS);
add_relation(camera_parameters_key, object_parameters_key,
@@ -1795,16 +1795,16 @@ void DepsgraphRelationBuilder::build_camera(Object *ob)
}
/* 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;
}
lamp_id->tag |= LIB_TAG_DOIT;
- ComponentKey object_parameters_key(&ob->id, DEG_NODE_TYPE_PARAMETERS);
+ ComponentKey object_parameters_key(&object->id, DEG_NODE_TYPE_PARAMETERS);
ComponentKey lamp_parameters_key(lamp_id, DEG_NODE_TYPE_PARAMETERS);
add_relation(lamp_parameters_key, object_parameters_key,
@@ -1829,7 +1829,7 @@ void DepsgraphRelationBuilder::build_lamp(Object *ob)
/* Make sure copy on write of lamp data is always properly updated for
* visible lamps.
*/
- OperationKey ob_copy_on_write_key(&ob->id,
+ OperationKey ob_copy_on_write_key(&object->id,
DEG_NODE_TYPE_COPY_ON_WRITE,
DEG_OPCODE_COPY_ON_WRITE);
OperationKey lamp_copy_on_write_key(lamp_id,
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
index b3e5ed9f7f9..15d9f1db4dc 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@ -188,8 +188,8 @@ struct DepsgraphRelationBuilder
void build_view_layer(Scene *scene, ViewLayer *view_layer);
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,
@@ -199,23 +199,23 @@ 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_particle_settings(ParticleSettings *part);
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);
@@ -229,13 +229,13 @@ struct DepsgraphRelationBuilder
void add_collision_relations(const OperationKey &key,
Scene *scene,
- Object *ob,
+ Object *object,
Group *group,
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, const char *name);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index 476e793d3f7..49035f27daa 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -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;
/* Pose init to bone local. */
add_relation(init_key, bone_local_key, "PoseEval Source-Bone Link");
@@ -409,16 +409,16 @@ 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]");
}
/* Buil 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 */
@@ -446,14 +446,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");
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index d9b814f5a77..d4907eeff46 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -157,19 +157,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;
@@ -193,7 +193,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) {
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 34ca2244b3a..e4e0247f251 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -126,12 +126,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,
@@ -152,13 +152,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.
@@ -306,7 +306,7 @@ void DEG_relations_tag_update(Main *bmain)
void DEG_add_collision_relations(DepsNodeHandle *handle,
Scene *scene,
- Object *ob,
+ Object *object,
Group *group,
unsigned int modifier_type,
DEG_CollobjFilterFunction fn,
@@ -314,7 +314,7 @@ void DEG_add_collision_relations(DepsNodeHandle *handle,
const char *name)
{
unsigned int numcollobj;
- Object **collobjs = get_collisionobjects_ext(scene, ob, group, &numcollobj, modifier_type, dupli);
+ Object **collobjs = get_collisionobjects_ext(scene, object, group, &numcollobj, modifier_type, dupli);
for (unsigned int i = 0; i < numcollobj; i++) {
Object *ob1 = collobjs[i];
@@ -331,17 +331,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(NULL, scene, ob, NULL, effector_weights, false);
+ ListBase *effectors = pdInitEffectors(NULL, 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) {
@@ -367,7 +367,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,
eModifierType_Collision,
NULL,
diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc
index 9740e93ffec..6ffdfeac644 100644
--- a/source/blender/depsgraph/intern/depsgraph_query.cc
+++ b/source/blender/depsgraph/intern/depsgraph_query.cc
@@ -242,21 +242,21 @@ static void deg_objects_iterator_step(BLI_Iterator *iter, DEG::IDDepsNode *id_no
return;
}
- Object *ob = (Object *)id_node->id_cow;
- BLI_assert(DEG::deg_validate_copy_on_write_datablock(&ob->id));
+ Object *object = (Object *)id_node->id_cow;
+ BLI_assert(DEG::deg_validate_copy_on_write_datablock(&object->id));
- if (deg_flush_base_flags_and_settings(data, ob, ob, false) == false) {
+ if (deg_flush_base_flags_and_settings(data, object, object, false) == false) {
iter->skip = true;
return;
}
- if ((data->flag & DEG_OBJECT_ITER_FLAG_DUPLI) && (ob->transflag & OB_DUPLI)) {
- data->dupli_parent = ob;
- data->dupli_list = object_duplilist(&data->eval_ctx, data->scene, ob);
+ if ((data->flag & DEG_OBJECT_ITER_FLAG_DUPLI) && (object->transflag & OB_DUPLI)) {
+ data->dupli_parent = object;
+ data->dupli_list = object_duplilist(&data->eval_ctx, data->scene, object);
data->dupli_object_next = (DupliObject *)data->dupli_list->first;
}
- iter->current = ob;
+ iter->current = object;
}
void DEG_objects_iterator_begin(BLI_Iterator *iter, DEGObjectsIteratorData *data)
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
index 86e69458f41..cbe00a98719 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_flush.cc
@@ -147,7 +147,7 @@ void deg_graph_flush_updates(Main *bmain, Depsgraph *graph)
}
if (comp_node->done != COMPONENT_STATE_DONE) {
- /* Currently this is needed to get ob->mesh to be replaced with
+ /* Currently this is needed to get object->mesh to be replaced with
* original mesh (rather than being evaluated_mesh).
*
* TODO(sergey): This is something we need to avoid.
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
index a250dce1239..4d64ac36f2b 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
@@ -379,8 +379,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");