diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 06:49:37 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 06:49:37 +0400 |
commit | c0718d2d4ab6a5ee51ca6164cfc44256867d8701 (patch) | |
tree | b7bce15ddc6b0805d0c582bd7289791a48d1b8dc | |
parent | abcdc909ebe64703da50bf9388d36812625d9d39 (diff) |
2.5:
* Updated object mode flags with Object and Edit.
* Updated RNA for that property
-rw-r--r-- | source/blender/editors/object/object_edit.c | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 13 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 4 |
3 files changed, 14 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index b849d57cc7d..eb4150feb0c 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -3732,6 +3732,7 @@ void ED_object_exit_editmode(bContext *C, int flag) WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, scene); } + obedit->mode &= ~OB_MODE_EDIT; ED_object_toggle_modes(C, obedit->restore_mode); } @@ -3768,6 +3769,8 @@ void ED_object_enter_editmode(bContext *C, int flag) ob->restore_mode = ob->mode; ED_object_toggle_modes(C, ob->mode); + + ob->mode |= OB_MODE_EDIT; if(ob->type==OB_MESH) { Mesh *me= ob->data; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 6e6f53da882..b4d299a7aa1 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -512,12 +512,13 @@ extern Object workob; #define OB_LOCK_SCALE 448 /* ob->mode */ -#define OB_MODE_NONE 0 -#define OB_MODE_SCULPT 1 -#define OB_MODE_VERTEX_PAINT 2 -#define OB_MODE_WEIGHT_PAINT 4 -#define OB_MODE_TEXTURE_PAINT 8 -#define OB_MODE_PARTICLE_EDIT 16 +#define OB_MODE_OBJECT 0 +#define OB_MODE_EDIT 1 +#define OB_MODE_SCULPT 2 +#define OB_MODE_VERTEX_PAINT 4 +#define OB_MODE_WEIGHT_PAINT 8 +#define OB_MODE_TEXTURE_PAINT 16 +#define OB_MODE_PARTICLE_EDIT 32 /* ob->softflag in DNA_object_force.h */ diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 5ad59661eaa..01cf7a77e19 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -969,9 +969,13 @@ static void rna_def_object(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem mode_items[] = { + {OB_MODE_OBJECT, "OBJECT", 0, "Object", ""}, + {OB_MODE_EDIT, "EDIT", 0, "Edit", ""}, {OB_MODE_SCULPT, "SCULPT", 0, "Sculpt", ""}, {OB_MODE_VERTEX_PAINT, "VERTEX_PAINT", 0, "Vertex Paint", ""}, {OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", 0, "Weight Paint", ""}, + {OB_MODE_WEIGHT_PAINT, "TEXTURE_PAINT", 0, "Texture Paint", ""}, + {OB_MODE_PARTICLE_EDIT, "PARTICLE_EDIT", 0, "Particle Edit", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem empty_drawtype_items[] = { |