[Bf-blender-cvs] [b3004d30f5d] master: Undo: remove particle undo push

Campbell Barton noreply at git.blender.org
Tue Apr 3 14:16:56 CEST 2018


Commit: b3004d30f5d5060035c5f8ac4cb6338463872877
Author: Campbell Barton
Date:   Tue Apr 3 08:57:01 2018 +0200
Branches: master
https://developer.blender.org/rBb3004d30f5d5060035c5f8ac4cb6338463872877

Undo: remove particle undo push

Was only called on copy particle system
which is already doing an undo push.

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

M	source/blender/editors/include/ED_particle.h
M	source/blender/editors/physics/particle_edit.c
M	source/blender/editors/physics/particle_edit_undo.c
M	source/blender/editors/physics/particle_object.c

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

diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index fa5abb8e1dd..4f6aa1cc702 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -65,7 +65,5 @@ void PE_deselect_all_visible(struct PTCacheEdit *edit);
 /* particle_edit_undo.c */
 void ED_particle_undosys_type(struct UndoType *ut);
 
-void PE_undo_push(struct Scene *scene, const char *str);
-
 #endif /* __ED_PARTICLE_H__ */
 
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index fce43fa6425..bdffaf31384 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -4377,12 +4377,6 @@ void PE_create_particle_edit(Scene *scene, Object *ob, PointCache *cache, Partic
 		if (psys && !cache)
 			recalc_emitter_field(ob, psys);
 		PE_update_object(scene, ob, 1);
-
-		/* Causes issues, adding undo pushes while performing undo history.
-		 * Seems not to like this isn't needed anyway - Campbell. */
-#if 0
-		PE_undo_push(scene, "Original");
-#endif
 	}
 }
 
diff --git a/source/blender/editors/physics/particle_edit_undo.c b/source/blender/editors/physics/particle_edit_undo.c
index 6e212174f39..ef0a2711fdd 100644
--- a/source/blender/editors/physics/particle_edit_undo.c
+++ b/source/blender/editors/physics/particle_edit_undo.c
@@ -53,7 +53,6 @@
 #include "ED_object.h"
 #include "ED_particle.h"
 #include "ED_physics.h"
-#include "ED_undo.h"
 
 #include "particle_edit_utildefines.h"
 
@@ -296,18 +295,3 @@ void ED_particle_undosys_type(UndoType *ut)
 }
 
 /** \} */
-
-/* -------------------------------------------------------------------- */
-/** \name Utilities
- * \{ */
-
-void PE_undo_push(struct Scene *scene, const char *str)
-{
-	UndoStack *ustack = ED_undo_stack_get();
-	bContext *C_temp = CTX_create();
-	CTX_data_scene_set(C_temp, scene);
-	BKE_undosys_step_push_with_type(ustack, C_temp, str, BKE_UNDOSYS_TYPE_PARTICLE);
-	CTX_free(C_temp);
-}
-
-/** \} */
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 63b84df9fce..53a70abca05 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -940,8 +940,6 @@ static void copy_particle_edit(Scene *scene, Object *ob, ParticleSystem *psys, P
 	recalc_lengths(edit);
 	recalc_emitter_field(ob, psys);
 	PE_update_object(scene, ob, true);
-
-	PE_undo_push(scene, "Original");
 }
 
 static void remove_particle_systems_from_object(Object *ob_to)



More information about the Bf-blender-cvs mailing list