diff options
author | Joseph Eagar <joeedh@gmail.com> | 2009-11-08 02:10:18 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2009-11-08 02:10:18 +0300 |
commit | 2ead17843c08c9c4ed211010c0ad4d2a5c31a99c (patch) | |
tree | 0fc77499284278cdf8b017eac803910c87b4e07a /source/blender/editors/physics | |
parent | cfa4f3222a427eff1991e8fd2c341ce4ca5385bd (diff) | |
parent | 4e9699debff6b0ac7e3bfc91d615e071218a67db (diff) |
merge with trunk/2.5 at r24378
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 11 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 1 |
3 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index a4bad0c708f..e3f25a9dc43 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -3321,8 +3321,7 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) if((pset->flag & PE_KEEP_LENGTHS)==0) recalc_lengths(edit); - if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_CUT)) { - if(added || removed) { + if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_CUT) && (added || removed)) { if(pset->brushtype == PE_BRUSH_ADD && (pset->flag & PE_X_MIRROR)) PE_mirror_x(scene, ob, 1); @@ -3330,7 +3329,6 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) psys_free_path_cache(NULL, edit); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); } - } else PE_update_object(scene, ob, 1); diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index bd94f7ff5bb..0c24e3fff0a 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -93,11 +93,20 @@ static int particle_system_remove_exec(bContext *C, wmOperator *op) { Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data; Scene *scene = CTX_data_scene(C); - + int mode_orig = ob->mode; if(!scene || !ob) return OPERATOR_CANCELLED; object_remove_particle_system(scene, ob); + + /* possible this isn't the active object + * object_remove_particle_system() clears the mode on the last psys + * */ + if(mode_orig & OB_MODE_PARTICLE_EDIT) + if((ob->mode & OB_MODE_PARTICLE_EDIT)==0) + if(scene->basact && scene->basact->object==ob) + WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL); + WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); return OPERATOR_FINISHED; diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 126c21a554b..b72c4991094 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -1195,6 +1195,7 @@ void FLUID_OT_bake(wmOperatorType *ot) { /* identifiers */ ot->name= "Fluid Simulation Bake"; + ot->description= "Bake fluid simulation."; ot->idname= "FLUID_OT_bake"; /* api callbacks */ |