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:
authorNicholas Bishop <nicholasbishop@gmail.com>2009-08-16 06:35:44 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2009-08-16 06:35:44 +0400
commit88294d7fa2a590674ec006da7fd9e8bd7a733fc3 (patch)
treebcec98791b71af0abbbb29a76a86fa3dbe8d7c40 /source/blender/editors/object
parentb257acfed11e8d98eb7c86e0908acf80fb9e27af (diff)
2.5/Particle edit:
* Made particle edit object-localized.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_edit.c14
-rw-r--r--source/blender/editors/object/object_modifier.c2
2 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 3be277d1cc4..b849d57cc7d 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -178,10 +178,6 @@ void ED_base_object_activate(bContext *C, Base *base)
Scene *scene= CTX_data_scene(C);
Base *tbase;
- /* activating a non-mesh, should end a couple of modes... */
- if(base && base->object->type!=OB_MESH)
- ED_view3d_exit_paint_modes(C);
-
/* sets scene->basact */
BASACT= base;
@@ -273,9 +269,6 @@ static Object *object_add_type(bContext *C, int type)
Scene *scene= CTX_data_scene(C);
Object *ob;
- /* XXX hrms, this is editor level operator, remove? */
- ED_view3d_exit_paint_modes(C);
-
/* for as long scene has editmode... */
if (CTX_data_edit_object(C))
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* freedata, and undo */
@@ -752,8 +745,6 @@ static int object_delete_exec(bContext *C, wmOperator *op)
if(CTX_data_edit_object(C))
return OPERATOR_CANCELLED;
- ED_view3d_exit_paint_modes(C);
-
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
if(base->object->type==OB_LAMP) islamp= 1;
@@ -3776,7 +3767,6 @@ void ED_object_enter_editmode(bContext *C, int flag)
if(flag & EM_WAITCURSOR) waitcursor(1);
ob->restore_mode = ob->mode;
- ED_view3d_exit_paint_modes(C);
ED_object_toggle_modes(C, ob->mode);
if(ob->type==OB_MESH) {
@@ -4188,7 +4178,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
// XXX pose_adds_vgroups(ob, (nr == 2));
}
}
- else if(G.f & G_PARTICLEEDIT) {
+ else if(ob->mode & OB_MODE_PARTICLE_EDIT) {
#if 0
// XXX
ParticleSystem *psys = PE_get_current(ob);
@@ -7048,4 +7038,6 @@ void ED_object_toggle_modes(bContext *C, int mode)
WM_operator_name_call(C, "PAINT_OT_weight_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
if(mode & OB_MODE_TEXTURE_PAINT)
WM_operator_name_call(C, "PAINT_OT_texture_paint_toggle", WM_OP_EXEC_REGION_WIN, NULL);
+ if(mode & OB_MODE_PARTICLE_EDIT)
+ WM_operator_name_call(C, "PARTICLE_OT_particle_edit_toggle", WM_OP_EXEC_REGION_WIN, NULL);
}
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 1742e1d1279..9983e24f2c9 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -226,7 +226,7 @@ int ED_object_modifier_convert(ReportList *reports, Scene *scene, Object *ob, Mo
int totpart=0, totchild=0;
if(md->type != eModifierType_ParticleSystem) return 0;
- if(G.f & G_PARTICLEEDIT) return 0;
+ if(ob && ob->mode & OB_MODE_PARTICLE_EDIT) return 0;
psys=((ParticleSystemModifierData *)md)->psys;
part= psys->part;