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:
authorThomas Dinges <blender@dingto.org>2009-05-18 22:20:29 +0400
committerThomas Dinges <blender@dingto.org>2009-05-18 22:20:29 +0400
commit4022380dc6a70b5123282e912743e568a92adde2 (patch)
treeced8d0d88e1f8426a5fa20b92cb12f39cfef2374 /source/blender
parent0cd511eee8039f9c0f59004329cff911693ac761 (diff)
2.5 UI:
* Added new Buttons Tab "Bone" for Armature objects. * Validation of buttons selection, when object selection is changed. * added missing notifier for camera type and small layout change to the panel. * more shading color changes for menu and checkbox.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/interface/interface_widgets.c4
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c18
-rw-r--r--source/blender/editors/space_buttons/buttons_intern.h1
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c2
-rw-r--r--source/blender/makesrna/intern/rna_camera.c3
5 files changed, 24 insertions, 4 deletions
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);