Fix T63648: Missing update when changing particle force fields
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 19 Apr 2019 13:38:45 +0000 (15:38 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 19 Apr 2019 13:41:32 +0000 (15:41 +0200)
Force fields requires relations update in the dependency graph.

source/blender/makesrna/intern/rna_object_force.c

index 393e6d9..4dea47e 100644 (file)
@@ -524,6 +524,8 @@ static void rna_FieldSettings_type_set(PointerRNA *ptr, int value)
 
 static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
 {
+  DEG_relations_tag_update(bmain);
+
   if (particle_id_check(ptr)) {
     DEG_id_tag_update((ID *)ptr->id.data,
                       ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION |
@@ -534,8 +536,6 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point
 
     rna_FieldSettings_shape_update(bmain, scene, ptr);
 
-    DEG_relations_tag_update(bmain);
-
     if (ob->type == OB_CURVE && ob->pd->forcefield == PFIELD_GUIDE)
       DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
     else