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
path: root/source
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2009-05-19 19:38:36 +0400
committerThomas Dinges <blender@dingto.org>2009-05-19 19:38:36 +0400
commit2a055ca728820146355a79c49f18c3a4d681faac (patch)
treeffb15c3782e87c1ca883a1db3490e6bf497c17ae /source
parent1b6bfa6b8a6d7af8819adefa646364b91a81961b (diff)
2.5:
* Added new modifier tab. * Fixed problems when no object was selected after delete. * Added initial Armature, Bone, Curve and Font panels, by William Reynish (Billrey). Thanks! * Small RNA changes * Commit revision 20240 and 20268 from trunk. ("Mouse wheel zoom lost after rendering.")
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c38
-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/editors/space_view3d/view3d_header.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c6
-rw-r--r--source/blender/makesrna/intern/rna_curve.c6
6 files changed, 32 insertions, 23 deletions
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index 09f11f9129d..91b88ad5b1b 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -153,7 +153,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
xco+=XIC+xmax;
}
-
+ // DATA Icons
if(ob) {
switch(ob->type) {
case OB_EMPTY: dataicon= ICON_EMPTY_DATA; break;
@@ -185,24 +185,30 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
if((ob && (ob->type != OB_ARMATURE)) && (sbuts->mainb == (float)BCONTEXT_BONE))
sbuts->mainb = (float)BCONTEXT_DATA;
+ if(!ob && !ELEM(sbuts->mainb, (float)BCONTEXT_SCENE, (float)BCONTEXT_WORLD))
+ sbuts->mainb = (float)BCONTEXT_WORLD;
+
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");
- uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object");
- uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, dataicon, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, "Object Data");
- if(ob && ELEM5(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT))
- uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MATERIAL, 0, 0, "Material");
- if(ob && ELEM6(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT, OB_LAMP))
- uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_TEXTURE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_TEXTURE, 0, 0, "Texture");
- if(ob && ELEM5(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT))
- 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");
-
- 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");
-
+ if(ob) {
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_OBJECT_DATA, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_OBJECT, 0, 0, "Object");
+
+ if(ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_LATTICE))
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_MODIFIER, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MODIFIER, 0, 0, "Modifier");
+
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, dataicon, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_DATA, 0, 0, "Object Data");
+ if((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");
+ if(ELEM5(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT))
+ uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_MATERIAL, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_MATERIAL, 0, 0, "Material");
+ if(ELEM6(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT, OB_LAMP))
+ uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_TEXTURE, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_TEXTURE, 0, 0, "Texture");
+ if(ELEM5(ob->type, OB_MESH, OB_SURF, OB_MBALL, OB_CURVE, OB_FONT))
+ uiDefIconButS(block, ROW, B_CONTEXT_SWITCH, ICON_PARTICLES, xco+=XIC, yco, XIC, YIC, &(sbuts->mainb), 0.0, (float)BCONTEXT_PARTICLE, 0, 0, "Particles");
+ if(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");
+ }
xco+= XIC;
uiBlockEndAlign(block);
diff --git a/source/blender/editors/space_buttons/buttons_intern.h b/source/blender/editors/space_buttons/buttons_intern.h
index cc8591f1368..6050b4f0562 100644
--- a/source/blender/editors/space_buttons/buttons_intern.h
+++ b/source/blender/editors/space_buttons/buttons_intern.h
@@ -44,6 +44,7 @@ struct bContext;
#define BCONTEXT_PHYSICS 7
#define BCONTEXT_GAME 8
#define BCONTEXT_BONE 9
+#define BCONTEXT_MODIFIER 10
/* 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 b0a9fb68ddf..785f0d0b89b 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -187,6 +187,8 @@ static void buttons_main_area_draw(const bContext *C, ARegion *ar)
ED_region_panels(C, ar, vertical, "physics");
else if(sbuts->mainb == BCONTEXT_BONE)
ED_region_panels(C, ar, vertical, "bone");
+ else if(sbuts->mainb == BCONTEXT_MODIFIER)
+ ED_region_panels(C, ar, vertical, "modifier");
sbuts->re_align= 0;
sbuts->mainbo= sbuts->mainb;
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 9c0cffb547a..2fd453c9ff7 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -4760,7 +4760,7 @@ static char *view3d_modeselect_pup(Scene *scene)
if(ob)
str += sprintf(str, formatstr, "Object Mode", V3D_OBJECTMODE_SEL, ICON_OBJECT_DATA);
else
- str += sprintf(str, formatstr, " ", V3D_OBJECTMODE_SEL, ICON_OBJECT_DATA);
+ str += sprintf(str, formatstr, "Object Mode", V3D_OBJECTMODE_SEL, ICON_OBJECT_DATA);
if(ob==NULL) return string;
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 284f966bedd..c7f7b8cfebc 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -165,8 +165,8 @@ static void rna_def_bone(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Active", "Bone was the last bone clicked on (most operations are applied to only this bone)");
prop= RNA_def_property(srna, "hinge", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HINGE);
- RNA_def_property_ui_text(prop, "Hinge", "Bone doesn't inherit rotation or scale from parent bone.");
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_HINGE);
+ RNA_def_property_ui_text(prop, "Inherit Rotation", "Bone doesn't inherit rotation or scale from parent bone.");
prop= RNA_def_property(srna, "editmode_hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_HIDDEN_A);
@@ -182,7 +182,7 @@ static void rna_def_bone(BlenderRNA *brna)
prop= RNA_def_property(srna, "inherit_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", BONE_NO_SCALE);
- RNA_def_property_ui_text(prop, "Inherit scale", "Bone inherits scaling from parent bone.");
+ RNA_def_property_ui_text(prop, "Inherit Scale", "Bone inherits scaling from parent bone.");
prop= RNA_def_property(srna, "draw_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_DRAWWIRE);
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 275a11377e2..718f7d935f9 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -292,9 +292,9 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem prop_align_items[] = {
- {CU_LEFT, "LEFT", "Left Align", "Align text to the left"},
- {CU_MIDDLE, "CENTRAL", "Central Align", "Center text"},
- {CU_RIGHT, "RIGHT", "Right Align", "Align text to the right"},
+ {CU_LEFT, "LEFT", "Left", "Align text to the left"},
+ {CU_MIDDLE, "CENTRAL", "Center", "Center text"},
+ {CU_RIGHT, "RIGHT", "Right", "Align text to the right"},
{CU_JUSTIFY, "JUSTIFY", "Justify", "Align to the left and the right"},
{CU_FLUSH, "FLUSH", "Flush", "Align to the left and the right, with equal character spacing"},
{0, NULL, NULL, NULL}};