[Bf-blender-cvs] [ce0582ee2b3] master: Particle: Cleanup, remove unused depsgraph argument

Sergey Sharybin noreply at git.blender.org
Wed Jul 31 11:52:43 CEST 2019


Commit: ce0582ee2b3a8942cc389f0cb2a99fa83084766e
Author: Sergey Sharybin
Date:   Wed Jul 31 11:50:42 2019 +0200
Branches: master
https://developer.blender.org/rBce0582ee2b3a8942cc389f0cb2a99fa83084766e

Particle: Cleanup, remove unused depsgraph argument

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

M	source/blender/editors/physics/particle_edit.c
M	source/blender/editors/physics/particle_object.c
M	source/blender/editors/physics/physics_intern.h

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

diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 2f2516f2055..31f7cb2b8e8 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -1499,7 +1499,7 @@ static void PE_update_selection(Depsgraph *depsgraph, Scene *scene, Object *ob,
   DEG_id_tag_update(&ob->id, ID_RECALC_SELECT);
 }
 
-void update_world_cos(Depsgraph *UNUSED(depsgraph), Object *ob, PTCacheEdit *edit)
+void update_world_cos(Object *ob, PTCacheEdit *edit)
 {
   ParticleSystem *psys = edit->psys;
   ParticleSystemModifierData *psmd_eval = edit->psmd_eval;
@@ -1619,7 +1619,7 @@ void PE_update_object(Depsgraph *depsgraph, Scene *scene, Object *ob, int usefla
     PE_apply_mirror(ob, edit->psys);
   }
   if (edit->psys) {
-    update_world_cos(depsgraph, ob, edit);
+    update_world_cos(ob, edit);
   }
   if (pset->flag & PE_AUTO_VELOCITY) {
     update_velocities(edit);
@@ -3519,7 +3519,7 @@ static int mirror_exec(bContext *C, wmOperator *UNUSED(op))
 
   PE_mirror_x(scene, ob, 0);
 
-  update_world_cos(CTX_data_depsgraph(C), ob, edit);
+  update_world_cos(ob, edit);
   WM_event_add_notifier(C, NC_OBJECT | ND_PARTICLE | NA_EDITED, ob);
   DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
 
@@ -4747,7 +4747,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
           PE_mirror_x(scene, ob, 1);
         }
 
-        update_world_cos(depsgraph, ob, edit);
+        update_world_cos(ob, edit);
         psys_free_path_cache(NULL, edit);
         DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
       }
@@ -4993,7 +4993,6 @@ static void shape_cut(PEData *data, int pa_index)
 
 static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op))
 {
-  Depsgraph *depsgraph = CTX_data_depsgraph(C);
   Scene *scene = CTX_data_scene(C);
   Object *ob = CTX_data_active_object(C);
   ParticleEditSettings *pset = PE_settings(scene);
@@ -5032,7 +5031,7 @@ static int shape_cut_exec(bContext *C, wmOperator *UNUSED(op))
     recalc_lengths(edit);
 
     if (removed) {
-      update_world_cos(depsgraph, ob, edit);
+      update_world_cos(ob, edit);
       psys_free_path_cache(NULL, edit);
       DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
     }
@@ -5203,7 +5202,7 @@ void PE_create_particle_edit(
         }
         pa++;
       }
-      update_world_cos(depsgraph, ob, edit);
+      update_world_cos(ob, edit);
     }
     else {
       PTCacheMem *pm;
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index fcee2cde5b1..71877fc6b39 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -1037,7 +1037,7 @@ static void copy_particle_edit(Depsgraph *depsgraph,
 
     pa++;
   }
-  update_world_cos(depsgraph, ob, edit);
+  update_world_cos(ob, edit);
 
   UI_GetThemeColor3ubv(TH_EDGE_SELECT, edit->sel_col);
   UI_GetThemeColor3ubv(TH_WIRE, edit->nosel_col);
diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h
index bb7cfe9b1a3..9ebbba07fdf 100644
--- a/source/blender/editors/physics/physics_intern.h
+++ b/source/blender/editors/physics/physics_intern.h
@@ -70,7 +70,7 @@ void recalc_lengths(struct PTCacheEdit *edit);
 void recalc_emitter_field(struct Depsgraph *depsgraph,
                           struct Object *ob,
                           struct ParticleSystem *psys);
-void update_world_cos(struct Depsgraph *depsgraph, struct Object *ob, struct PTCacheEdit *edit);
+void update_world_cos(struct Object *ob, struct PTCacheEdit *edit);
 
 /* particle_object.c */
 void OBJECT_OT_particle_system_add(struct wmOperatorType *ot);



More information about the Bf-blender-cvs mailing list