Commit: 632d66eb89066a3101af2b5c34b95db989074093
Author: Sergey Sharybin
Date:   Thu Feb 22 10:31:47 2018 +0100
Branches: master
https://developer.blender.org/rB632d66eb89066a3101af2b5c34b95db989074093

Depsgraph: Cleanup, reduce indentation level

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

M       source/blender/depsgraph/intern/depsgraph_build.cc

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

diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc 
b/source/blender/depsgraph/intern/depsgraph_build.cc
index 0c093c26fc5..a04e59160c8 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -348,46 +348,41 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
                                   const char *name)
 {
        ListBase *effectors = pdInitEffectors(scene, object, NULL, 
effector_weights, false);
-
-       if (effectors) {
-               for (EffectorCache *eff = (EffectorCache*)effectors->first; 
eff; eff = eff->next) {
-                       if (eff->ob != object && eff->pd->forcefield != 
skip_forcefield) {
-                               DEG_add_object_relation(handle, eff->ob, 
DEG_OB_COMP_TRANSFORM, name);
-
-                               if (eff->psys) {
-                                       DEG_add_object_relation(handle, 
eff->ob, DEG_OB_COMP_EVAL_PARTICLES, name);
-
-                                       /* TODO: remove this when/if 
EVAL_PARTICLES is sufficient
-                                        * for up to date particles.
-                                        */
-                                       DEG_add_object_relation(handle, 
eff->ob, DEG_OB_COMP_GEOMETRY, name);
-                               }
-
-                               if (eff->pd->forcefield == PFIELD_SMOKEFLOW && 
eff->pd->f_source) {
-                                       DEG_add_object_relation(handle,
-                                                               
eff->pd->f_source,
-                                                               
DEG_OB_COMP_TRANSFORM,
-                                                               "Smoke Force 
Domain");
-                                       DEG_add_object_relation(handle,
-                                                               
eff->pd->f_source,
-                                                               
DEG_OB_COMP_GEOMETRY,
-                                                               "Smoke Force 
Domain");
-                               }
-
-                               if (add_absorption && (eff->pd->flag & 
PFIELD_VISIBILITY)) {
-                                       DEG_add_collision_relations(handle,
-                                                                   scene,
-                                                                   object,
-                                                                   NULL,
-                                                                   
eff->ob->lay,
-                                                                   
eModifierType_Collision,
-                                                                   NULL,
-                                                                   true,
-                                                                   "Force 
Absorption");
-                               }
+       if (effectors == NULL) {
+               return;
+       }
+       for (EffectorCache *eff = (EffectorCache*)effectors->first; eff; eff = 
eff->next) {
+               if (eff->ob != object && eff->pd->forcefield != 
skip_forcefield) {
+                       DEG_add_object_relation(handle, eff->ob, 
DEG_OB_COMP_TRANSFORM, name);
+                       if (eff->psys) {
+                               DEG_add_object_relation(handle, eff->ob, 
DEG_OB_COMP_EVAL_PARTICLES, name);
+                               /* TODO: remove this when/if EVAL_PARTICLES is 
sufficient
+                                * for up to date particles.
+                                */
+                               DEG_add_object_relation(handle, eff->ob, 
DEG_OB_COMP_GEOMETRY, name);
+                       }
+                       if (eff->pd->forcefield == PFIELD_SMOKEFLOW && 
eff->pd->f_source) {
+                               DEG_add_object_relation(handle,
+                                                       eff->pd->f_source,
+                                                       DEG_OB_COMP_TRANSFORM,
+                                                       "Smoke Force Domain");
+                               DEG_add_object_relation(handle,
+                                                       eff->pd->f_source,
+                                                       DEG_OB_COMP_GEOMETRY,
+                                                       "Smoke Force Domain");
+                       }
+                       if (add_absorption && (eff->pd->flag & 
PFIELD_VISIBILITY)) {
+                               DEG_add_collision_relations(handle,
+                                                           scene,
+                                                           object,
+                                                           NULL,
+                                                           eff->ob->lay,
+                                                           
eModifierType_Collision,
+                                                           NULL,
+                                                           true,
+                                                           "Force Absorption");
                        }
                }
        }
-
        pdEndEffectors(&effectors);
 }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to