diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-21 21:35:35 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-21 21:35:35 +0400 |
commit | 5280c2884b3395376eec8c9b6f7521375b88f51c (patch) | |
tree | a59c9ddf86615f79f9d6c25ad5298390c4a4cc9e /source/blender/makesdna/DNA_object_types.h | |
parent | bc41c845f355c0e4fed427bfa3ab7fc5f7e96660 (diff) |
2.5 Object mode:
* Made object mode an enum, shows better in the debugger
* Added a toggle mode to the set object mode operator
* Toggling a mode on and off goes back to the previous mode, not just object mode
* Changed the vertex mode and weight mode shortcuts to call the toggle mode operator
Diffstat (limited to 'source/blender/makesdna/DNA_object_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 5c821b532fb..be43ae7f99d 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -116,8 +116,8 @@ typedef struct Object { ListBase defbase; ListBase modifiers; /* list of ModifierData structures */ - /* For now just a flag for sculpt mode, eventually we make the other modes local too */ - int mode, pad2; + int mode; /* Local object mode */ + int restore_mode; /* Keep track of what mode to return to after toggling a mode */ /* materials */ struct Material **mat; /* material slots */ @@ -234,7 +234,7 @@ typedef struct Object { unsigned int state; /* bit masks of game controllers that are active */ unsigned int init_state; /* bit masks of initial state as recorded by the users */ - int restore_mode; /* Keep track of what mode to return to after edit mode exits */ + int pad2; ListBase gpulamp; /* runtime, for lamps only */ } Object; @@ -511,16 +511,16 @@ extern Object workob; #define OB_LOCK_SCALE 448 /* ob->mode */ -#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 -#define OB_MODE_POSE 64 - -/* ob->softflag in DNA_object_force.h */ +typedef enum ObjectMode { + OB_MODE_OBJECT = 0, + OB_MODE_EDIT = 1, + OB_MODE_SCULPT = 2, + OB_MODE_VERTEX_PAINT = 4, + OB_MODE_WEIGHT_PAINT = 8, + OB_MODE_TEXTURE_PAINT = 16, + OB_MODE_PARTICLE_EDIT = 32, + OB_MODE_POSE = 64 +} ObjectMode; #ifdef __cplusplus } |