[Bf-blender-cvs] [93561197656] blender2.8: Depsgraph: Use more explicit naming for operation codes

Sergey Sharybin noreply at git.blender.org
Wed Jul 19 17:33:38 CEST 2017


Commit: 93561197656983fab3ea428164295ba56e82a4ee
Author: Sergey Sharybin
Date:   Tue Jul 18 11:48:35 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB93561197656983fab3ea428164295ba56e82a4ee

Depsgraph: Use more explicit naming for operation codes

This way it's better indication what group of operation codes things belongs to.

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M	source/blender/depsgraph/intern/depsgraph_type_defines.cc
M	source/blender/depsgraph/intern/depsgraph_types.h

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 33a31ac3b5f..2fb04db54ee 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -475,7 +475,7 @@ void DepsgraphNodeBuilder::build_object_transform(Scene *scene, Object *ob)
 	                   function_bind(BKE_object_eval_uber_transform,
 	                                 _1,
 	                                 scene_cow, ob_cow),
-	                   DEG_OPCODE_OBJECT_UBEREVAL);
+	                   DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
 
 	/* object transform is done */
 	op_node = add_operation_node(&ob->id, DEG_NODE_TYPE_TRANSFORM,
@@ -679,7 +679,7 @@ void DepsgraphNodeBuilder::build_rigidbody(Scene *scene)
 			                                 _1,
 			                                 scene_cow,
 			                                 get_cow_datablock(ob)),
-			                   DEG_OPCODE_TRANSFORM_RIGIDBODY);
+			                   DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY);
 		}
 	}
 }
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 4c088be38d0..14dab1275b5 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -423,7 +423,7 @@ void DepsgraphRelationBuilder::build_object(Main *bmain, Scene *scene, Object *o
 	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 ob_ubereval_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_OBJECT_UBEREVAL);
+	OperationKey ob_ubereval_key(&ob->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
 
 	/* parenting */
 	if (ob->parent != NULL) {
@@ -1173,7 +1173,7 @@ 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_TRANSFORM_RIGIDBODY);
+			OperationKey rbo_key(&ob->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);
@@ -1202,7 +1202,7 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
 				 */
 				OperationKey uber_key(&ob->id,
 				                      DEG_NODE_TYPE_TRANSFORM,
-				                      DEG_OPCODE_OBJECT_UBEREVAL);
+				                      DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL);
 				add_relation(rbo_key, uber_key, "RBO Sync -> Uber (Temp)");
 			}
 
@@ -1225,8 +1225,8 @@ void DepsgraphRelationBuilder::build_rigidbody(Scene *scene)
 			 * constraint affects the physics sim for these objects
 			 */
 			ComponentKey trans_key(&ob->id, DEG_NODE_TYPE_TRANSFORM);
-			OperationKey ob1_key(&rbc->ob1->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_RIGIDBODY);
-			OperationKey ob2_key(&rbc->ob2->id, DEG_NODE_TYPE_TRANSFORM, DEG_OPCODE_TRANSFORM_RIGIDBODY);
+			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);
 
 			/* - constrained-objects sync depends on the constraint-holder */
 			add_relation(trans_key, ob1_key, "RigidBodyConstraint -> RBC.Object_1");
diff --git a/source/blender/depsgraph/intern/depsgraph_type_defines.cc b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
index d8ffb1bbdc4..638b8179a7a 100644
--- a/source/blender/depsgraph/intern/depsgraph_type_defines.cc
+++ b/source/blender/depsgraph/intern/depsgraph_type_defines.cc
@@ -108,12 +108,12 @@ static const char *stringify_opcode(eDepsOperation_Code opcode)
 		STRINGIFY_OPCODE(TRANSFORM_LOCAL);
 		STRINGIFY_OPCODE(TRANSFORM_PARENT);
 		STRINGIFY_OPCODE(TRANSFORM_CONSTRAINTS);
+		STRINGIFY_OPCODE(TRANSFORM_FINAL);
+		STRINGIFY_OPCODE(TRANSFORM_OBJECT_UBEREVAL);
 		/* Rigid body. */
 		STRINGIFY_OPCODE(RIGIDBODY_REBUILD);
 		STRINGIFY_OPCODE(RIGIDBODY_SIM);
-		STRINGIFY_OPCODE(TRANSFORM_RIGIDBODY);
-		STRINGIFY_OPCODE(TRANSFORM_FINAL);
-		STRINGIFY_OPCODE(OBJECT_UBEREVAL);
+		STRINGIFY_OPCODE(RIGIDBODY_TRANSFORM_COPY);
 		/* Geometry. */
 		STRINGIFY_OPCODE(GEOMETRY_UBEREVAL);
 		STRINGIFY_OPCODE(GEOMETRY_PATH);
diff --git a/source/blender/depsgraph/intern/depsgraph_types.h b/source/blender/depsgraph/intern/depsgraph_types.h
index 9f4ab5cba0f..f846e81d52f 100644
--- a/source/blender/depsgraph/intern/depsgraph_types.h
+++ b/source/blender/depsgraph/intern/depsgraph_types.h
@@ -160,14 +160,14 @@ typedef enum eDepsOperation_Code {
 	/* Transform exit point */
 	DEG_OPCODE_TRANSFORM_FINAL,
 	/* Handle object-level updates, mainly proxies hacks and recalc flags.  */
-	DEG_OPCODE_OBJECT_UBEREVAL,
+	DEG_OPCODE_TRANSFORM_OBJECT_UBEREVAL,
 
 	/* Rigid body. -------------------------------------- */
 	/* Perform Simulation */
 	DEG_OPCODE_RIGIDBODY_REBUILD,
 	DEG_OPCODE_RIGIDBODY_SIM,
 	/* Copy results to object */
-	DEG_OPCODE_TRANSFORM_RIGIDBODY,
+	DEG_OPCODE_RIGIDBODY_TRANSFORM_COPY,
 
 	/* Geometry. ---------------------------------------- */
 	/* Evaluate the whole geometry, including modifiers. */




More information about the Bf-blender-cvs mailing list