diff --git a/release/ui/buttons_data_camera.py b/release/ui/buttons_data_camera.py index 2fac272ada3..24006b5e7cc 100644 --- a/release/ui/buttons_data_camera.py +++ b/release/ui/buttons_data_camera.py @@ -68,11 +68,11 @@ class DATA_PT_cameradisplay(DataButtonsPanel): sub.itemR(cam, "show_mist", text="Mist") sub.itemR(cam, "show_title_safe", text="Title Safe") sub.itemR(cam, "show_name", text="Name") + + sub = split.column() sub.itemR(cam, "show_passepartout", text="Passepartout") if (cam.show_passepartout): sub.itemR(cam, "passepartout_alpha", text="Alpha") - - sub = split.column() sub.itemR(cam, "draw_size", text="Size") bpy.types.register(DATA_PT_cameralens) diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 5e342ba4b73..7bc63c5c676 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -956,7 +956,7 @@ static struct uiWidgetColors wcol_option= { {255, 255, 255, 255}, 1, - 25, -20 + 15, -15 }; /* button that shows popup */ @@ -970,7 +970,7 @@ static struct uiWidgetColors wcol_menu= { {204, 204, 204, 255}, 1, - 25, -20 + 15, -15 }; /* button that starts pulldown */ diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 9cea5959e2f..09f11f9129d 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -172,6 +172,19 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) uiBlockSetEmboss(block, UI_EMBOSS); + // if object selection changed, validate button selection + if(ob && (ob->type == OB_LAMP) && ELEM3(sbuts->mainb, (float)BCONTEXT_MATERIAL, (float)BCONTEXT_PARTICLE, (float)BCONTEXT_PHYSICS)) + sbuts->mainb = (float)BCONTEXT_DATA; + + if(ob && (ob->type == OB_EMPTY) && ELEM3(sbuts->mainb, (float)BCONTEXT_MATERIAL, (float)BCONTEXT_TEXTURE, (float)BCONTEXT_PARTICLE)) + sbuts->mainb = (float)BCONTEXT_DATA; + + if((ob && ELEM(ob->type, OB_CAMERA, OB_ARMATURE)) && ELEM4(sbuts->mainb, (float)BCONTEXT_MATERIAL, (float)BCONTEXT_TEXTURE, (float)BCONTEXT_PARTICLE, (float)BCONTEXT_PHYSICS)) + sbuts->mainb = (float)BCONTEXT_DATA; + + if((ob && (ob->type != OB_ARMATURE)) && (sbuts->mainb == (float)BCONTEXT_BONE)) + sbuts->mainb = (float)BCONTEXT_DATA; + uiBlockBeginAlign(block); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_SCENE, xco, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_SCENE, 0, 0, "Scene"); uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_WORLD, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_WORLD, 0, 0, "World"); @@ -185,7 +198,10 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PARTICLES, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_PARTICLE, 0, 0, "Particles"); if(ob && ELEM6(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT, OB_EMPTY)) - uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PHYSICS, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_PHYSICS, 0, 0, "Physics"); + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PHYSICS, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_PHYSICS, 0, 0, "Physics"); + + if(ob && (ob->type == OB_ARMATURE)) + uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_BONE_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_BONE, 0, 0, "Bone"); xco+= XIC; diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h index 861f341dba9..cc8591f1368 100644 --- a/source/blender/editors/space_buttons/buttons_intern.h +++ b/source/blender/editors/space_buttons/buttons_intern.h @@ -43,6 +43,7 @@ struct bContext; #define BCONTEXT_PARTICLE 6 #define BCONTEXT_PHYSICS 7 #define BCONTEXT_GAME 8 +#define BCONTEXT_BONE 9 /* buts->scaflag */ #define BUTS_SENS_SEL 1 diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 893ef139bad..b0a9fb68ddf 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -185,6 +185,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, vertical, "particle"); else if(sbuts->mainb == BCONTEXT_PHYSICS) ED_region_panels(C, ar, vertical, "physics"); + else if(sbuts->mainb == BCONTEXT_BONE) + ED_region_panels(C, ar, vertical, "bone"); sbuts->re_align= 0; sbuts->mainbo= sbuts->mainb; diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c index c884bad3353..3b1bb3b0785 100644 --- a/source/blender/makesrna/intern/rna_camera.c +++ b/source/blender/makesrna/intern/rna_camera.c @@ -57,7 +57,8 @@ void RNA_def_camera(BlenderRNA *brna) prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_ui_text(prop, "Type", "Camera types."); - + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); + /* Number values */ prop= RNA_def_property(srna, "passepartout_alpha", PROP_FLOAT, PROP_NONE);