diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-01 21:31:01 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-05-01 21:31:01 +0400 |
commit | 0d1aa8d7bfc83162dc14616e4d588939d9361ba1 (patch) | |
tree | 6c6b2f6ece9cd8978fc08ce1eaa796b5cd695df7 /source | |
parent | 31adad5b4d8dd7728a1a4d21ede7b34e6ff01a89 (diff) |
Fix for bug #10144: "set editable" on a disabled particle system
could cause crashes.
Fix related to bug #10198: particle mode didn't respect undo steps
set to 0.
Also made the memory statistics print (ctrl+alt+shift+q) use the
more human readable form to give an overview, instead of printing
out a python script.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/buttons_object.c | 10 | ||||
-rw-r--r-- | source/blender/src/drawobject.c | 2 | ||||
-rw-r--r-- | source/blender/src/editscreen.c | 2 | ||||
-rw-r--r-- | source/blender/src/space.c | 2 |
4 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index d58a283b6d1..37becdc8912 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -3130,9 +3130,13 @@ void do_effects_panels(unsigned short event) } } else { - psys->flag |= PSYS_EDITED; - if(G.f & G_PARTICLEEDIT) - PE_create_particle_edit(ob, psys); + if(psys_check_enabled(ob, psys)) { + psys->flag |= PSYS_EDITED; + if(G.f & G_PARTICLEEDIT) + PE_create_particle_edit(ob, psys); + } + else + error("Particle system not enabled, skipping set editable"); } } case B_FIELD_DEP: diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 808320bb9de..aec0e112b32 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -3474,6 +3474,8 @@ static void draw_particle_edit(Object *ob, ParticleSystem *psys) PE_hide_keys_time(psys,CFRA); psys_cache_paths(ob,psys,CFRA,0); } + if(psys->pathcache==0) + return; if(pset->flag & PE_SHOW_CHILD && psys->part->draw_as == PART_DRAW_PATH) { if(psys->childcache==0) diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c index 2df92af5bca..9ad2bd34ea4 100644 --- a/source/blender/src/editscreen.c +++ b/source/blender/src/editscreen.c @@ -1396,7 +1396,7 @@ void screenmain(void) else if (event==QKEY) { /* Temp place to print mem debugging info ctrl+alt+shift + qkey */ if ( G.qual == (LR_SHIFTKEY | LR_ALTKEY | LR_CTRLKEY) ) { - MEM_printmemlist_pydict(); + MEM_printmemlist_stats(); } else if((G.obedit && G.obedit->type==OB_FONT && g_activearea->spacetype==SPACE_VIEW3D)||g_activearea->spacetype==SPACE_TEXT||g_activearea->spacetype==SPACE_SCRIPT); diff --git a/source/blender/src/space.c b/source/blender/src/space.c index 72fb442fda0..41e539c3d1a 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -1005,6 +1005,8 @@ void BIF_undo_push(char *str) undo_push_armature(str); } else if(G.f & G_PARTICLEEDIT) { + if (U.undosteps == 0) return; + PE_undo_push(str); } else { |