[Bf-blender-cvs] [73f8a7ca0a3] master: Depsgraph: Cleanup, comments wrapping and spacing between lines

Sergey Sharybin noreply at git.blender.org
Tue Jul 19 14:39:51 CEST 2022


Commit: 73f8a7ca0a30de398b0309d15cc459cfeff495ce
Author: Sergey Sharybin
Date:   Tue Jul 19 14:25:02 2022 +0200
Branches: master
https://developer.blender.org/rB73f8a7ca0a30de398b0309d15cc459cfeff495ce

Depsgraph: Cleanup, comments wrapping and spacing between lines

Should make it easier to read. No functional changes expected.

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

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
M	source/blender/depsgraph/intern/node/deg_node_operation.h

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 92396a89cea..4fe8a626af5 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -692,7 +692,7 @@ void DepsgraphRelationBuilder::build_object(Object *object)
 
   const BuilderStack::ScopedEntry stack_entry = stack_.trace(object->id);
 
-  /* Object Transforms */
+  /* Object Transforms. */
   OperationCode base_op = (object->parent) ? OperationCode::TRANSFORM_PARENT :
                                              OperationCode::TRANSFORM_LOCAL;
   OperationKey base_op_key(&object->id, NodeType::TRANSFORM, base_op);
@@ -705,9 +705,12 @@ void DepsgraphRelationBuilder::build_object(Object *object)
   OperationKey final_transform_key(
       &object->id, NodeType::TRANSFORM, OperationCode::TRANSFORM_FINAL);
   OperationKey ob_eval_key(&object->id, NodeType::TRANSFORM, OperationCode::TRANSFORM_EVAL);
+
   add_relation(init_transform_key, local_transform_key, "Transform Init");
+
   /* Various flags, flushing from bases/collections. */
   build_object_layer_component_relations(object);
+
   /* Parenting. */
   if (object->parent != nullptr) {
     /* Make sure parent object's relations are built. */
@@ -717,30 +720,35 @@ void DepsgraphRelationBuilder::build_object(Object *object)
     /* Local -> parent. */
     add_relation(local_transform_key, parent_transform_key, "ObLocal -> ObParent");
   }
+
   /* Modifiers. */
   if (object->modifiers.first != nullptr) {
     BuilderWalkUserData data;
     data.builder = this;
     BKE_modifiers_foreach_ID_link(object, modifier_walk, &data);
   }
+
   /* Grease Pencil Modifiers. */
   if (object->greasepencil_modifiers.first != nullptr) {
     BuilderWalkUserData data;
     data.builder = this;
     BKE_gpencil_modifiers_foreach_ID_link(object, modifier_walk, &data);
   }
+
   /* Shader FX. */
   if (object->shader_fx.first != nullptr) {
     BuilderWalkUserData data;
     data.builder = this;
     BKE_shaderfx_foreach_ID_link(object, modifier_walk, &data);
   }
+
   /* Constraints. */
   if (object->constraints.first != nullptr) {
     BuilderWalkUserData data;
     data.builder = this;
     BKE_constraints_id_loop(&object->constraints, constraint_walk, &data);
   }
+
   /* Object constraints. */
   OperationKey object_transform_simulation_init_key(
       &object->id, NodeType::TRANSFORM, OperationCode::TRANSFORM_SIMULATION_INIT);
@@ -767,30 +775,39 @@ void DepsgraphRelationBuilder::build_object(Object *object)
                  final_transform_key,
                  "Simulation -> Final Transform");
   }
+
   build_idproperties(object->id.properties);
+
   /* Animation data */
   build_animdata(&object->id);
+
   /* Object data. */
   build_object_data(object);
+
   /* Particle systems. */
   if (object->particlesystem.first != nullptr) {
     build_particle_systems(object);
   }
+
   /* Force field Texture. */
   if ((object->pd != nullptr) && (object->pd->forcefield == PFIELD_TEXTURE) &&
       (object->pd->tex != nullptr)) {
     build_texture(object->pd->tex);
   }
+
   /* Object dupligroup. */
   if (object->instance_collection != nullptr) {
     build_collection(nullptr, object, object->instance_collection);
   }
+
   /* Point caches. */
   build_object_pointcache(object);
+
   /* Synchronization back to original object. */
   OperationKey synchronize_key(
       &object->id, NodeType::SYNCHRONIZATION, OperationCode::SYNCHRONIZE_TO_ORIGINAL);
   add_relation(final_transform_key, synchronize_key, "Synchronize to Original");
+
   /* Parameters. */
   build_parameters(&object->id);
 }
@@ -2460,7 +2477,10 @@ void DepsgraphRelationBuilder::build_camera(Camera *camera)
     ComponentKey dof_ob_key(&camera->dof.focus_object->id, NodeType::TRANSFORM);
     add_relation(dof_ob_key, camera_parameters_key, "Camera DOF");
     if (camera->dof.focus_subtarget[0]) {
-      OperationKey target_key(&camera->dof.focus_object->id, NodeType::BONE, camera->dof.focus_subtarget, OperationCode::BONE_DONE);
+      OperationKey target_key(&camera->dof.focus_object->id,
+                              NodeType::BONE,
+                              camera->dof.focus_subtarget,
+                              OperationCode::BONE_DONE);
       add_relation(target_key, camera_parameters_key, "Camera DOF subtarget");
     }
   }
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.h b/source/blender/depsgraph/intern/node/deg_node_operation.h
index aaa508ab3e8..4808e004dc2 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.h
@@ -203,13 +203,16 @@ const char *operationCodeAsString(OperationCode opcode);
 enum OperationFlag {
   /* Node needs to be updated. */
   DEPSOP_FLAG_NEEDS_UPDATE = (1 << 0),
+
   /* Node was directly modified, causing need for update. */
   DEPSOP_FLAG_DIRECTLY_MODIFIED = (1 << 1),
+
   /* Node was updated due to user input. */
   DEPSOP_FLAG_USER_MODIFIED = (1 << 2),
-  /* Node may not be removed, even when it has no evaluation callback and no
-   * outgoing relations. This is for NO-OP nodes that are purely used to indicate a
-   * relation between components/IDs, and not for connecting to an operation. */
+
+  /* Node may not be removed, even when it has no evaluation callback and no outgoing relations.
+   * This is for NO-OP nodes that are purely used to indicate a relation between components/IDs,
+   * and not for connecting to an operation. */
   DEPSOP_FLAG_PINNED = (1 << 3),
 
   /* Set of flags which gets flushed along the relations. */



More information about the Bf-blender-cvs mailing list