diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-05 03:04:43 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-05 03:04:43 +0400 |
commit | eb233d933223a3795f3ff5204c4412f7a0fd6782 (patch) | |
tree | 89b9d04eea0dea46cd2c5c182b4b35c61508cee5 /source/blender/editors/space_view3d/view3d_header.c | |
parent | 577730daad29cc9b4d7c1b5a9a64007fe8f3dc9d (diff) |
syncing some minor formatting edits from bmesh branch.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_header.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index b9513ab0880..0c9ea3c6a2a 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -283,16 +283,16 @@ static char *view3d_modeselect_pup(Scene *scene) BLI_strncpy(str, title, sizeof(string)); str += modeselect_addmode(str, N_("Object Mode"), OB_MODE_OBJECT, ICON_OBJECT_DATA); - + if(ob==NULL || ob->data==NULL) return string; if(ob->id.lib) return string; - + if(!((ID *)ob->data)->lib) { /* if active object is editable */ if ( ((ob->type == OB_MESH) || (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT) || (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) { - + str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT); } else if (ob->type == OB_ARMATURE) { @@ -310,7 +310,7 @@ static char *view3d_modeselect_pup(Scene *scene) str += modeselect_addmode(str, N_("Weight Paint"), OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT); } } - + /* if active object is an armature */ if (ob->type==OB_ARMATURE) { str += modeselect_addmode(str, N_("Pose Mode"), OB_MODE_POSE, ICON_POSE_HLT); @@ -485,10 +485,12 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) uiBlockSetEmboss(block, UI_EMBOSS); /* mode */ - if(ob) + if(ob) { v3d->modeselect = ob->mode; - else + } + else { v3d->modeselect = OB_MODE_OBJECT; + } row= uiLayoutRow(layout, 1); uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) , |