diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_particle.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 8 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 5 |
6 files changed, 13 insertions, 15 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index e9285782a1e..2291601bd47 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -200,6 +200,7 @@ struct Object *psys_get_lattice(struct ParticleSimulationData *sim); int psys_in_edit_mode(struct Scene *scene, struct ParticleSystem *psys); int psys_check_enabled(struct Object *ob, struct ParticleSystem *psys); +int psys_check_edited(struct ParticleSystem *psys); void psys_check_group_weights(struct ParticleSettings *part); diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 011d5c3f134..ea8562c0ca8 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -298,6 +298,14 @@ int psys_check_enabled(Object *ob, ParticleSystem *psys) return 1; } +int psys_check_edited(ParticleSystem *psys) +{ + if(psys->part && psys->part->type==PART_HAIR) + return (psys->flag & PSYS_EDITED || (psys->edit && psys->edit->edited)); + else + return (psys->pointcache->edit && psys->pointcache->edit->edited); +} + void psys_check_group_weights(ParticleSettings *part) { ParticleDupliWeight *dw, *tdw; diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index d302e1eeec8..bd8b865a6c9 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -2002,12 +2002,6 @@ static int object_mode_set_exec(bContext *C, wmOperator *op) if(!ob || !object_mode_set_compat(C, op, ob)) return OPERATOR_PASS_THROUGH; - /* Irritating workaround! disallow paint modes from editmode since a number of shortcuts conflict - * XXX - would be much better to handle this on a keymap level */ - if((ob->mode & OB_MODE_EDIT) && ELEM6(mode, OB_MODE_SCULPT, OB_MODE_VERTEX_PAINT, OB_MODE_WEIGHT_PAINT, OB_MODE_TEXTURE_PAINT, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE)) { - return OPERATOR_PASS_THROUGH; - } - /* Exit current mode if it's not the mode we're setting */ if(ob->mode != OB_MODE_OBJECT && ob->mode != mode) WM_operator_name_call(C, object_mode_op_string(ob->mode), WM_OP_EXEC_REGION_WIN, NULL); diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index a49b0a072af..c35ff6ed7b6 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -795,9 +795,6 @@ int file_directory_exec(bContext *C, wmOperator *unused) SpaceFile *sfile= CTX_wm_space_file(C); if(sfile->params) { - char prev_dir[sizeof(sfile->params->dir)]; - BLI_strncpy(prev_dir, filelist_dir(sfile->files), sizeof(prev_dir)); - if ( sfile->params->dir[0] == '~' ) { if (sfile->params->dir[1] == '\0') { BLI_strncpy(sfile->params->dir, BLI_gethome(), sizeof(sfile->params->dir) ); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index d017e11e783..2cade9bb685 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -298,8 +298,6 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) wmKeyMap *keymap; /* object ops. */ - keymap= WM_keymap_find(wm->defaultconf, "Object Non-modal", 0, 0); - WM_event_add_keymap_handler(&ar->handlers, keymap); /* pose is not modal, operator poll checks for this */ keymap= WM_keymap_find(wm->defaultconf, "Pose", 0, 0); @@ -349,6 +347,9 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) keymap= WM_keymap_find(wm->defaultconf, "Font", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); + keymap= WM_keymap_find(wm->defaultconf, "Object Non-modal", 0, 0); + WM_event_add_keymap_handler(&ar->handlers, keymap); + /* own keymap, last so modes can override it */ keymap= WM_keymap_find(wm->defaultconf, "View3D Generic", SPACE_VIEW3D, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 28d0d2deb34..d261bda739e 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -420,10 +420,7 @@ static int rna_ParticleSystem_editable_get(PointerRNA *ptr) { ParticleSystem *psys= (ParticleSystem*)ptr->data; - if(psys->part && psys->part->type==PART_HAIR) - return (psys->flag & PSYS_HAIR_DONE); - else - return (psys->pointcache->flag & PTCACHE_BAKED); + return psys_check_edited(psys); } static int rna_ParticleSystem_edited_get(PointerRNA *ptr) { |