Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2011-01-12 21:00:23 +0300
committerTon Roosendaal <ton@blender.org>2011-01-12 21:00:23 +0300
commit604d029ddf164e87eb453d83c59e65c2f16f8879 (patch)
treec981354dab170549f1fb729e51e068f0cb0a8ecc /source/blender/editors/physics/particle_edit.c
parent505e2d882af792480764791c070c19849477f774 (diff)
Bugfix #25570
The tool-redo depends on a working undo system, so it can rewind a step and then redo operator with new settings. When a user disables undo, this won't work. Now the properties for redo operator (toolbar, F6) will grey out when a redo isn't possible.
Diffstat (limited to 'source/blender/editors/physics/particle_edit.c')
-rw-r--r--source/blender/editors/physics/particle_edit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 4ac4bf9fa9b..9ce8488c461 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3884,6 +3884,16 @@ void PE_undo_step(Scene *scene, int step)
DAG_id_tag_update(&OBACT->id, OB_RECALC_DATA);
}
+int PE_undo_valid(Scene *scene)
+{
+ PTCacheEdit *edit= PE_get_current(scene, OBACT);
+
+ if(edit) {
+ return (edit->undo.last != edit->undo.first);
+ }
+ return 0;
+}
+
static void PTCacheUndo_number(Scene *scene, PTCacheEdit *edit, int nr)
{
PTCacheUndo *undo;