Fix #19468: particle mode crash in transform, when there are
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 28 Sep 2009 14:51:42 +0000 (14:51 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 28 Sep 2009 14:51:42 +0000 (14:51 +0000)
no editable particles.

source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c

index a49950f15f190a84fe6c0a98ff2946b31a1c541c..8d709d1b38a74e8f196cab1c078a58c4125c6084 100644 (file)
@@ -4825,7 +4825,7 @@ void special_aftertrans_update(TransInfo *t)
                //      allqueue(REDRAWBUTSEDIT, 0);
 
        }
-       else if(t->scene->basact && (ob = t->scene->basact->object) && ob->mode & OB_MODE_PARTICLE_EDIT) {
+       else if(t->scene->basact && (ob = t->scene->basact->object) && (ob->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, ob)) {
                ;
        }
        else {
index 88469794e5dabdd3d4f29432fdafbeb349443d93..6637122ffb82c6d0030940248afd85a3599c65f8 100644 (file)
@@ -92,6 +92,7 @@
 #include "ED_markers.h"
 #include "ED_mesh.h"
 #include "ED_retopo.h"
+#include "ED_particle.h"
 #include "ED_screen_types.h"
 #include "ED_space_api.h"
 #include "ED_uvedit.h"
@@ -346,7 +347,7 @@ void recalcData(TransInfo *t)
 
        if (t->obedit) {
        }
-       else if(base && base->object->mode & OB_MODE_PARTICLE_EDIT) {
+       else if(base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(scene, base->object)) {
                flushTransParticles(t);
        }
        if (t->spacetype==SPACE_NODE) {