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:
authorWilliam Reynish <william@reynish.com>2009-09-15 16:45:05 +0400
committerWilliam Reynish <william@reynish.com>2009-09-15 16:45:05 +0400
commite6b5a2e99ee1e7bb7cb13526ba7e126ebcd0649d (patch)
tree1a0f46800364a74187cfc43b75b1788b20054ba9
parent499e6f0067ff629fcc7705e5552d5d35ff587ab3 (diff)
UI tweaks
*Cleaned up Transform panel in n-key area. It's now single column so that this view can be nice and slim, while you can still access everything. This is especially important in edit mode where you cannot change the transform values numerically from the Properties. Transform properties don't seem to work for Metaball edit yet, so wasn't able to test this *Removed some lingering tools in curve transform and put them in the toolbar instead. *Improved alignment in toolbar *Made Image Properties use regular checkmark toggle buttons *Added Delete as an alternative to X key, as it was in 2.4x
-rw-r--r--release/ui/space_view3d.py15
-rw-r--r--release/ui/space_view3d_toolbar.py120
-rw-r--r--source/blender/editors/metaball/mball_ops.c1
-rw-r--r--source/blender/editors/object/object_ops.c3
-rw-r--r--source/blender/editors/space_image/image_buttons.c14
-rw-r--r--source/blender/editors/space_node/node_ops.c1
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c279
8 files changed, 219 insertions, 216 deletions
diff --git a/release/ui/space_view3d.py b/release/ui/space_view3d.py
index 33f9fbb853d..62b7fa0d91f 100644
--- a/release/ui/space_view3d.py
+++ b/release/ui/space_view3d.py
@@ -1136,16 +1136,17 @@ class VIEW3D_PT_3dview_properties(bpy.types.Panel):
scene = context.scene
col = layout.column()
- col.itemR(view, "camera")
+ col.itemL(text="Camera:")
+ col.itemR(view, "camera", text="")
col.itemR(view, "lens")
- layout.itemL(text="Clip:")
col = layout.column(align=True)
+ col.itemL(text="Clip:")
col.itemR(view, "clip_start", text="Start")
col.itemR(view, "clip_end", text="End")
- layout.itemL(text="Grid:")
col = layout.column(align=True)
+ col.itemL(text="Grid:")
col.itemR(view, "grid_lines", text="Lines")
col.itemR(view, "grid_spacing", text="Spacing")
col.itemR(view, "grid_subdivisions", text="Subdivisions")
@@ -1156,7 +1157,8 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel):
__space_type__ = 'VIEW_3D'
__region_type__ = 'UI'
__label__ = "Display"
-
+ __default_closed__ = True
+
def poll(self, context):
view = context.space_data
return (view)
@@ -1177,7 +1179,7 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel):
layout.itemS()
- layout.itemO("screen.region_foursplit")
+ layout.itemO("screen.region_foursplit", text="Toggle Quad View")
col = layout.column()
col.itemR(view, "lock_rotation")
@@ -1272,9 +1274,10 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
#col.itemR(bg, "image_user")
col.itemR(bg, "size")
col.itemR(bg, "transparency", slider=True)
- col.itemL(text="Offset:")
+
col = layout.column(align=True)
+ col.itemL(text="Offset:")
col.itemR(bg, "offset_x", text="X")
col.itemR(bg, "offset_y", text="Y")
diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py
index 40ebb6883f0..fe0f4ca5a21 100644
--- a/release/ui/space_view3d_toolbar.py
+++ b/release/ui/space_view3d_toolbar.py
@@ -14,36 +14,32 @@ class VIEW3D_PT_tools_objectmode(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Transform:")
-
col = layout.column(align=True)
+ col.itemL(text="Transform:")
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
- layout.itemL(text="Object:")
-
col = layout.column(align=True)
+ col.itemL(text="Object:")
col.itemO("object.duplicate")
col.itemO("object.delete")
active_object= context.active_object
if active_object and active_object.type == 'MESH':
- layout.itemL(text="Shading:")
-
+
col = layout.column(align=True)
+ col.itemL(text="Shading:")
col.itemO("object.shade_smooth", text="Smooth")
col.itemO("object.shade_flat", text="Flat")
- layout.itemL(text="Keyframes:")
-
col = layout.column(align=True)
+ col.itemL(text="Keyframes:")
col.itemO("anim.insert_keyframe_menu", text="Insert")
col.itemO("anim.delete_keyframe_v3d", text="Remove")
- layout.itemL(text="Repeat:")
-
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
@@ -57,43 +53,37 @@ class VIEW3D_PT_tools_meshedit(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Transform:")
-
col = layout.column(align=True)
+ col.itemL(text="Transform:")
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
- layout.itemL(text="Mesh:")
-
col = layout.column(align=True)
+ col.itemL(text="Mesh:")
col.itemO("mesh.duplicate")
col.itemO("mesh.delete")
- layout.itemL(text="Modeling:")
-
col = layout.column(align=True)
+ col.itemL(text="Modeling:")
col.itemO("mesh.extrude")
col.itemO("mesh.subdivide")
col.itemO("mesh.spin")
col.itemO("mesh.screw")
- layout.itemL(text="Shading:")
-
col = layout.column(align=True)
+ col.itemL(text="Shading:")
col.itemO("mesh.faces_shade_smooth", text="Smooth")
col.itemO("mesh.faces_shade_flat", text="Flat")
- layout.itemL(text="UV Mapping:")
-
col = layout.column(align=True)
+ col.itemL(text="UV Mapping:")
col.itemO("uv.mapping_menu", text="Unwrap")
col.itemO("mesh.uvs_rotate")
col.itemO("mesh.uvs_mirror")
- layout.itemL(text="Repeat:")
-
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
@@ -107,31 +97,34 @@ class VIEW3D_PT_tools_curveedit(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Transform:")
-
col = layout.column(align=True)
+ col.itemL(text="Transform:")
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
-
- layout.itemL(text="Curve:")
col = layout.column(align=True)
+ col.itemL(text="Curve:")
col.itemO("curve.duplicate")
col.itemO("curve.delete")
col.itemO("curve.cyclic_toggle")
col.itemO("curve.switch_direction")
col.itemO("curve.spline_type_set")
- layout.itemL(text="Modeling:")
-
col = layout.column(align=True)
+ col.itemL(text="Handles:")
+ col.item_enumO("curve.handle_type_set", "type", 'AUTOMATIC')
+ col.item_enumO("curve.handle_type_set", "type", 'VECTOR')
+ col.item_enumO("curve.handle_type_set", "type", 'ALIGN')
+ col.item_enumO("curve.handle_type_set", "type", 'FREE_ALIGN')
+
+ col = layout.column(align=True)
+ col.itemL(text="Modeling:")
col.itemO("curve.extrude")
col.itemO("curve.subdivide")
- layout.itemL(text="Repeat:")
-
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
@@ -145,30 +138,26 @@ class VIEW3D_PT_tools_surfaceedit(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Transform:")
-
col = layout.column(align=True)
+ col.itemL(text="Transform:")
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
- layout.itemL(text="Curve:")
-
col = layout.column(align=True)
+ col.itemL(text="Curve:")
col.itemO("curve.duplicate")
col.itemO("curve.delete")
col.itemO("curve.cyclic_toggle")
col.itemO("curve.switch_direction")
- layout.itemL(text="Modeling:")
-
col = layout.column(align=True)
+ col.itemL(text="Modeling:")
col.itemO("curve.extrude")
col.itemO("curve.subdivide")
- layout.itemL(text="Repeat:")
-
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
@@ -182,22 +171,21 @@ class VIEW3D_PT_tools_textedit(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Text Edit:")
+
col = layout.column(align=True)
+ col.itemL(text="Text Edit:")
col.itemO("font.text_copy", text="Copy")
col.itemO("font.text_cut", text="Cut")
col.itemO("font.text_paste", text="Paste")
- layout.itemL(text="Style:")
-
col = layout.column(align=True)
+ col.itemL(text="Style:")
col.itemO("font.case_set")
col.itemO("font.style_toggle")
-
- layout.itemL(text="Repeat:")
-
+
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
@@ -211,26 +199,26 @@ class VIEW3D_PT_tools_armatureedit(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Transform:")
+
col = layout.column(align=True)
+ col.itemL(text="Transform:")
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
-
- layout.itemL(text="Bones:")
col = layout.column(align=True)
+ col.itemL(text="Bones:")
col.itemO("armature.bone_primitive_add", text="Add")
col.itemO("armature.duplicate", text="Duplicate")
col.itemO("armature.delete", text="Delete")
- layout.itemL(text="Modeling:")
- layout.itemO("armature.extrude")
-
- layout.itemL(text="Repeat:")
+ col = layout.column(align=True)
+ col.itemL(text="Modeling:")
+ col.itemO("armature.extrude")
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
@@ -244,16 +232,14 @@ class VIEW3D_PT_tools_mballedit(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Transform:")
-
col = layout.column(align=True)
+ col.itemL(text="Transform:")
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
- layout.itemL(text="Repeat:")
-
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
@@ -267,16 +253,14 @@ class VIEW3D_PT_tools_latticeedit(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Transform:")
-
col = layout.column(align=True)
+ col.itemL(text="Transform:")
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
- layout.itemL(text="Repeat:")
-
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
@@ -290,40 +274,36 @@ class VIEW3D_PT_tools_posemode(View3DPanel):
def draw(self, context):
layout = self.layout
- layout.itemL(text="Transform:")
+
col = layout.column(align=True)
+ col.itemL(text="Transform:")
col.itemO("tfm.translate")
col.itemO("tfm.rotate")
col.itemO("tfm.resize", text="Scale")
- layout.itemL(text="Bones:")
-
col = layout.column(align=True)
+ col.itemL(text="Bones:")
col.itemO("pose.hide", text="Hide")
col.itemO("pose.reveal", text="Reveal")
- layout.itemL(text="Keyframes:")
-
col = layout.column(align=True)
+ layout.itemL(text="Keyframes:")
col.itemO("anim.insert_keyframe_menu", text="Insert")
col.itemO("anim.delete_keyframe_v3d", text="Remove")
- layout.itemL(text="Pose:")
-
col = layout.column(align=True)
+ col.itemL(text="Pose:")
col.itemO("pose.copy", text="Copy")
col.itemO("pose.paste", text="Paste")
- layout.itemL(text="Library:")
-
col = layout.column(align=True)
+ col.itemL(text="Library:")
col.itemO("poselib.pose_add", text="Add")
col.itemO("poselib.pose_remove", text="Remove")
- layout.itemL(text="Repeat:")
-
col = layout.column(align=True)
+ col.itemL(text="Repeat:")
col.itemO("screen.repeat_last")
col.itemO("screen.repeat_history", text="History...")
col.itemO("screen.redo_last", text="Tweak...")
diff --git a/source/blender/editors/metaball/mball_ops.c b/source/blender/editors/metaball/mball_ops.c
index 38593af372f..b469bb3e400 100644
--- a/source/blender/editors/metaball/mball_ops.c
+++ b/source/blender/editors/metaball/mball_ops.c
@@ -60,6 +60,7 @@ void ED_keymap_metaball(wmWindowManager *wm)
RNA_enum_set(WM_keymap_add_item(keymap, "MBALL_OT_hide_metaelems", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "MBALL_OT_delete_metaelems", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "MBALL_OT_duplicate_metaelems", DKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "MBALL_OT_select_deselect_all_metaelems", AKEY, KM_PRESS, 0, 0);
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index ddcecdeb1f1..6ee43765475 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -227,7 +227,8 @@ void ED_keymap_object(wmWindowManager *wm)
WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, 0, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_restrictview_set", HKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "unselected", 1);
- WM_keymap_verify_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "OBJECT_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_verify_item(keymap, "OBJECT_OT_primitive_add", AKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "OBJECT_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "OBJECT_OT_duplicate", DKEY, KM_PRESS, KM_ALT, 0)->ptr, "linked", 1);
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 647b9a4b51f..456e802194e 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -1326,14 +1326,14 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I
/* fields */
- but= uiDefButBitS(block, TOGBUT, IMA_FIELDS, imagechanged, "Fields", 0, 80, 200, 20, &ima->flag, 0, 0, 0, 0, "Click to enable use of fields in Image");
+ but= uiDefButBitS(block, OPTION, IMA_FIELDS, imagechanged, "Fields", 0, 80, 200, 20, &ima->flag, 0, 0, 0, 0, "Click to enable use of fields in Image");
uiButSetFunc(but, image_field_test, ima, iuser);
- uiDefButBitS(block, TOGBUT, IMA_STD_FIELD, B_NOP, "Odd", 0, 55, 200, 20, &ima->flag, 0, 0, 0, 0, "Standard Field Toggle");
+ uiDefButBitS(block, OPTION, IMA_STD_FIELD, B_NOP, "Odd", 0, 55, 200, 20, &ima->flag, 0, 0, 0, 0, "Standard Field Toggle");
uiBlockSetFunc(block, image_reload_cb, ima, iuser);
- uiDefButBitS(block, TOGBUT, IMA_ANTIALI, B_NOP, "Anti", 0, 5, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors");
- uiDefButBitS(block, TOGBUT, IMA_DO_PREMUL, imagechanged, "Premul", 0, -20, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha");
+ uiDefButBitS(block, OPTION, IMA_ANTIALI, B_NOP, "Anti-Aliasing", 0, 5, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles Image anti-aliasing, only works with solid colors");
+ uiDefButBitS(block, OPTION, IMA_DO_PREMUL, imagechanged, "Premultiply", 0, -20, 200, 20, &ima->flag, 0, 0, 0, 0, "Toggles premultiplying alpha");
if( ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
@@ -1356,9 +1356,9 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I
uiDefButI(block, NUM, imagechanged, "Offset:", 220, 30, 200, 20, &iuser->offset, -MAXFRAMEF, MAXFRAMEF, 0, 0, "Offsets the number of the frame to use in the animation");
uiDefButS(block, NUM, imagechanged, "Fields:", 0, 30, 200, 20, &iuser->fie_ima, 1.0, 200.0, 0, 0, "The number of fields per rendered frame (2 fields is 1 image)");
- uiDefButBitS(block, TOG, IMA_ANIM_ALWAYS, B_NOP, "Auto Refresh", 220, 5, 200, 20, &iuser->flag, 0, 0, 0, 0, "Always refresh Image on frame changes");
+ uiDefButBitS(block, OPTION, IMA_ANIM_ALWAYS, B_NOP, "Auto Refresh", 220, 5, 200, 20, &iuser->flag, 0, 0, 0, 0, "Always refresh Image on frame changes");
- uiDefButS(block, TOG, imagechanged, "Cyclic", 220, -20, 200, 20, &iuser->cycl, 0.0, 1.0, 0, 0, "Cycle the images in the movie");
+ uiDefButS(block, OPTION, imagechanged, "Cyclic", 220, -20, 200, 20, &iuser->cycl, 0.0, 1.0, 0, 0, "Cycle the images in the movie");
uiBlockSetFunc(block, NULL, iuser, NULL);
}
@@ -1372,7 +1372,7 @@ void ED_image_uiblock_panel(const bContext *C, uiBlock *block, Image **ima_pp, I
uiDefButS(block, NUM, imagechanged, "Y:", 220, 35,200,20, &ima->gen_y, 1.0, 5000.0, 0, 0, "Image size y");
uiBlockEndAlign(block);
- uiDefButS(block, TOGBUT, imagechanged, "UV Test grid", 220,10,200,20, &ima->gen_type, 0.0, 1.0, 0, 0, "");
+ uiDefButS(block, OPTION, imagechanged, "UV Test grid", 220,10,200,20, &ima->gen_type, 0.0, 1.0, 0, 0, "");
uiBlockSetFunc(block, NULL, NULL, NULL);
}
}
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index a10cabfa983..4c2fbf7b9dc 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -87,6 +87,7 @@ void node_keymap(struct wmWindowManager *wm)
WM_keymap_add_item(keymap, "NODE_OT_view_all", HOMEKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_select_border", BKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_delete", XKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "NODE_OT_delete", DELKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_select_all", AKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "NODE_OT_select_linked_to", LKEY, KM_PRESS, KM_SHIFT, 0);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 05bf1c80b43..b5e5de928b5 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -912,7 +912,7 @@ void ED_spacetype_view3d(void)
/* regions: listview/buttons */
art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
art->regionid = RGN_TYPE_UI;
- art->minsizex= 220; // XXX
+ art->minsizex= 180; // XXX
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES;
art->listener= view3d_buttons_area_listener;
art->init= view3d_buttons_area_init;
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 1ff5dca7307..7d4e3337fe3 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -302,60 +302,68 @@ static void v3d_editvertex_buts(const bContext *C, uiBlock *block, View3D *v3d,
if((ob->parent) && (ob->partype == PARBONE)) but_y = 135;
else but_y = 150;
- uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 20, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values");
- uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 20, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values");
- uiBlockEndAlign(block);
+
memcpy(tfp->ve_median, median, sizeof(tfp->ve_median));
uiBlockBeginAlign(block);
if(tot==1) {
uiDefBut(block, LABEL, 0, "Vertex:", 0, 130, 200, 20, 0, 0, 0, 0, 0, "");
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, "");
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, "");
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, "");
- if(totw==1)
- uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Vertex W:", 0, 50, 200, 19, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, "");
- uiBlockEndAlign(block);
-
- if(defstr[0]) {
- uiDefBut(block, LABEL, 1, "Vertex Deform Groups", 0, 40, 200, 20, NULL, 0.0, 0.0, 0, 0, "");
-
+
+ if(totw==1) {
+ uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "W:", 0, 50, 200, 20, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, "");
uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_NOP, "Weight:", 10, 20, 150, 20, tfp->defweightp, 0.0f, 1.0f, 10, 3, "Weight value");
- uiDefButI(block, MENU, B_REDR, defstr, 160, 20, 140, 20, &tfp->curdef, 0.0, 0.0, 0, 0, "Current Vertex Group");
+ uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 25, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values");
+ uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 25, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values");
uiBlockEndAlign(block);
+ if(totweight)
+ uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 0, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "");
+ }
+ else {
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 45, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values");
+ uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 45, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values");
+ uiBlockEndAlign(block);
+ if(totweight)
+ uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "");
}
- else if(totweight)
- uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "");
-
}
else {
- uiDefBut(block, LABEL, 0, "Median:", 0, 130, 200, 20, 0, 0, 0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Median:", 0, 130, 200, 20, 0, 0, 0, 0, 0, "");
+ uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "X:", 0, 110, 200, 20, &(tfp->ve_median[0]), -lim, lim, 10, 3, "");
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Y:", 0, 90, 200, 20, &(tfp->ve_median[1]), -lim, lim, 10, 3, "");
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Z:", 0, 70, 200, 20, &(tfp->ve_median[2]), -lim, lim, 10, 3, "");
- if(totw==tot)
+ if(totw==tot) {
uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "W:", 0, 50, 200, 20, &(tfp->ve_median[3]), 0.01, 100.0, 10, 3, "");
- uiBlockEndAlign(block);
- if(totweight)
- uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "Weight is used for SoftBody Goal");
- }
-
- if(ob->type==OB_CURVE && (totw==0)) { /* bez curves have no w */
- uiBlockBeginAlign(block);
- uiDefBut(block, BUT,B_SETPT_AUTO,"Auto", 10, 44, 72, 19, 0, 0, 0, 0, 0, "Auto handles (Shift H)");
- uiDefBut(block, BUT,B_SETPT_VECTOR,"Vector",82, 44, 73, 19, 0, 0, 0, 0, 0, "Vector handles (V)");
- uiDefBut(block, BUT,B_SETPT_ALIGN,"Align",155, 44, 73, 19, 0, 0, 0, 0, 0, "Align handles (H Toggles)");
- uiDefBut(block, BUT,B_SETPT_FREE,"Free", 227, 44, 72, 19, 0, 0, 0, 0, 0, "Align handles (H Toggles)");
- uiBlockEndAlign(block);
+ uiBlockEndAlign(block);
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 25, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values");
+ uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 25, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values");
+ uiBlockEndAlign(block);
+ if(totweight)
+ uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 0, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "Weight is used for SoftBody Goal");
+ uiBlockEndAlign(block);
+ }
+ else {
+ uiBlockBeginAlign(block);
+ uiDefButBitS(block, TOG, V3D_GLOBAL_STATS, B_REDR, "Global", 0, 45, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays global values");
+ uiDefButBitS(block, TOGN, V3D_GLOBAL_STATS, B_REDR, "Local", 100, 45, 100, 20, &v3d->flag, 0, 0, 0, 0, "Displays local values");
+ uiBlockEndAlign(block);
+ if(totweight)
+ uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Weight:", 0, 20, 200, 20, &(tfp->ve_median[4]), 0.0, 1.0, 10, 3, "Weight is used for SoftBody Goal");
+ uiBlockEndAlign(block);
+ }
}
-
+
if(totedge==1)
- uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Crease W:", 0, 45, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Crease:", 0, 20, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, "");
else if(totedge>1)
- uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median Crease W:", 0, 45, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELMEDIAN, "Median Crease:", 0, 20, 200, 20, &(tfp->ve_median[3]), 0.0, 1.0, 10, 3, "");
}
else { // apply
@@ -503,14 +511,6 @@ static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float
if(bone && (bone->flag & BONE_ACTIVE) && (bone->layer & arm->layer))
break;
}
- if (!pchan || !bone) return;
-
- if((ob->parent) && (ob->partype == PARBONE))
- but= uiDefBut (block, TEX, B_NOP, "Bone:", 160, 130, 140, 19, bone->name, 1, 31, 0, 0, "");
- else
- but= uiDefBut(block, TEX, B_NOP, "Bone:", 160, 140, 140, 19, bone->name, 1, 31, 0, 0, "");
- uiButSetFunc(but, validate_bonebutton_cb, bone, NULL);
- uiButSetCompleteFunc(but, autocomplete_bone, (void *)ob);
if (pchan->rotmode == PCHAN_ROT_AXISANGLE) {
float quat[4];
@@ -526,29 +526,43 @@ static void v3d_posearmature_buts(uiBlock *block, View3D *v3d, Object *ob, float
tfp->ob_eul[1]*= 180.0/M_PI;
tfp->ob_eul[2]*= 180.0/M_PI;
+ uiDefBut(block, LABEL, 0, "Location:", 0, 240, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 10,140,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocX:", 30, 140, 120, 19, pchan->loc, -lim, lim, 100, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 10,120,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocY:", 30, 120, 120, 19, pchan->loc+1, -lim, lim, 100, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 10,100,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL2, "LocZ:", 30, 100, 120, 19, pchan->loc+2, -lim, lim, 100, 3, "");
-
+ uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 220, 120, 19, pchan->loc, -lim, lim, 100, 3, "");
+ uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 200, 120, 19, pchan->loc+1, -lim, lim, 100, 3, "");
+ uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 180, 120, 19, pchan->loc+2, -lim, lim, 100, 3, "");
+ uiBlockEndAlign(block);
+
uiBlockBeginAlign(block);
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 10,70,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL3, "RotX:", 30, 70, 120, 19, tfp->ob_eul, -1000.0, 1000.0, 100, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 10,50,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL3, "RotY:", 30, 50, 120, 19, tfp->ob_eul+1, -1000.0, 1000.0, 100, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 10,30,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL3, "RotZ:", 30, 30, 120, 19, tfp->ob_eul+2, -1000.0, 1000.0, 100, 3, "");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 125, 220, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Location value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 125, 200, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Location value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 125, 180, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Z Location value from being Transformed");
+ uiBlockEndAlign(block);
+
+ uiDefBut(block, LABEL, 0, "Rotation:", 0, 160, 100, 20, 0, 0, 0, 0, 0, "");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_ARMATUREPANEL3, "X:", 0, 140, 120, 19, tfp->ob_eul, -1000.0, 1000.0, 100, 3, "");
+ uiDefButF(block, NUM, B_ARMATUREPANEL3, "Y:", 0, 120, 120, 19, tfp->ob_eul+1, -1000.0, 1000.0, 100, 3, "");
+ uiDefButF(block, NUM, B_ARMATUREPANEL3, "Z:", 0, 100, 120, 19, tfp->ob_eul+2, -1000.0, 1000.0, 100, 3, "");
+ uiBlockEndAlign(block);
uiBlockBeginAlign(block);
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 160,70,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL2, "ScaleX:", 180, 70, 120, 19, pchan->size, -lim, lim, 10, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 160,50,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL2, "ScaleY:", 180, 50, 120, 19, pchan->size+1, -lim, lim, 10, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 160,30,20,19, &(pchan->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_ARMATUREPANEL2, "ScaleZ:", 180, 30, 120, 19, pchan->size+2, -lim, lim, 10, 3, "");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 125, 140, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Rotation value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 125, 120, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Rotation value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 125, 100, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Z Rotation value from being Transformed");
+ uiBlockEndAlign(block);
+
+ uiDefBut(block, LABEL, 0, "Scale:", 0, 80, 100, 20, 0, 0, 0, 0, 0, "");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_ARMATUREPANEL2, "X:", 0, 60, 120, 19, pchan->size, -lim, lim, 10, 3, "");
+ uiDefButF(block, NUM, B_ARMATUREPANEL2, "Y:", 0, 40, 120, 19, pchan->size+1, -lim, lim, 10, 3, "");
+ uiDefButF(block, NUM, B_ARMATUREPANEL2, "Z:", 0, 20, 120, 19, pchan->size+2, -lim, lim, 10, 3, "");
+ uiBlockEndAlign(block);
+
+ uiBlockBeginAlign(block);
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 125, 60, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects X Scale value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 125, 40, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects Y Scale value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 125, 20, 25, 19, &(pchan->protectflag), 0, 0, 0, 0, "Protects z Scale value from being Transformed");
uiBlockEndAlign(block);
}
@@ -585,34 +599,31 @@ static void v3d_editarmature_buts(uiBlock *block, View3D *v3d, Object *ob, float
if (!ebone)
return;
- if((ob->parent) && (ob->partype == PARBONE))
- but= uiDefBut(block, TEX, B_NOP, "Bone:", 160, 130, 140, 19, ebone->name, 1, 31, 0, 0, "");
- else
- but= uiDefBut(block, TEX, B_NOP, "Bone:", 160, 150, 140, 19, ebone->name, 1, 31, 0, 0, "");
- uiButSetFunc(but, validate_editbonebutton_cb, ebone, NULL);
-
+ uiDefBut(block, LABEL, 0, "Head:", 0, 210, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadX:", 10, 70, 140, 19, ebone->head, -lim, lim, 10, 3, "");
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadY:", 10, 50, 140, 19, ebone->head+1, -lim, lim, 10, 3, "");
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadZ:", 10, 30, 140, 19, ebone->head+2, -lim, lim, 10, 3, "");
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "X:", 0, 190, 100, 19, ebone->head, -lim, lim, 10, 3, "X Location of the head end of the bone");
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "Y:", 0, 170, 100, 19, ebone->head+1, -lim, lim, 10, 3, "Y Location of the head end of the bone");
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "Z:", 0, 150, 100, 19, ebone->head+2, -lim, lim, 10, 3, "Z Location of the head end of the bone");
+ if (ebone->parent && ebone->flag & BONE_CONNECTED )
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "Radius:", 0, 130, 100, 19, &ebone->parent->rad_tail, 0, lim, 10, 3, "Head radius. Visualize with the Envelope display option");
+ else
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "Radius:", 0, 130, 100, 19, &ebone->rad_head, 0, lim, 10, 3, "Head radius. Visualize with the Envelope display option");
+ uiBlockEndAlign(block);
+
+ uiBlockEndAlign(block);
+ uiDefBut(block, LABEL, 0, "Tail:", 0, 110, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "TailX:", 160, 70, 140, 19, ebone->tail, -lim, lim, 10, 3, "");
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "TailY:", 160, 50, 140, 19, ebone->tail+1, -lim, lim, 10, 3, "");
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "TailZ:", 160, 30, 140, 19, ebone->tail+2, -lim, lim, 10, 3, "");
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "X:", 0, 90, 100, 19, ebone->tail, -lim, lim, 10, 3, "X Location of the tail end of the bone");
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "Y:", 0, 70, 100, 19, ebone->tail+1, -lim, lim, 10, 3, "Y Location of the tail end of the bone");
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "Z:", 0, 50, 100, 19, ebone->tail+2, -lim, lim, 10, 3, "Z Location of the tail end of the bone");
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "Radius:", 0, 30, 100, 19, &ebone->rad_tail, 0, lim, 10, 3, "Tail radius. Visualize with the Envelope display option");
uiBlockEndAlign(block);
tfp->ob_eul[0]= 180.0*ebone->roll/M_PI;
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "Roll:", 10, 100, 140, 19, tfp->ob_eul, -lim, lim, 1000, 3, "");
-
- uiDefButBitI(block, TOG, BONE_EDITMODE_LOCKED, B_REDR, "Lock", 160, 100, 140, 19, &(ebone->flag), 0, 0, 0, 0, "Prevents bone from being transformed in edit mode");
-
+ uiDefButF(block, NUM, B_ARMATUREPANEL1, "Roll:", 0, 0, 100, 19, tfp->ob_eul, -lim, lim, 1000, 3, "Bone rotation around head-tail axis");
uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "TailRadius:", 10, 150, 140, 19, &ebone->rad_tail, 0, lim, 10, 3, "");
- if (ebone->parent && ebone->flag & BONE_CONNECTED )
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadRadius:", 10, 130, 140, 19, &ebone->parent->rad_tail, 0, lim, 10, 3, "");
- else
- uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadRadius:", 10, 130, 140, 19, &ebone->rad_head, 0, lim, 10, 3, "");
- uiBlockEndAlign(block);
+
+
}
static void v3d_editmetaball_buts(uiBlock *block, Object *ob, float lim)
@@ -1083,19 +1094,8 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
if(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)) {
}
else {
- //bt= uiDefBut(block, TEX, B_IDNAME, "OB: ", 10,180,140,20, ob->id.name+2, 0.0, 21.0, 0, 0, "");
- //uiButSetFunc(bt, test_idbutton_cb, ob->id.name, NULL);
-
if((ob->mode & OB_MODE_PARTICLE_EDIT)==0) {
- // uiBlockBeginAlign(block);
- // uiDefIDPoinBut(block, test_obpoin_but, ID_OB, B_OBJECTPANELPARENT, "Par:", 160, 180, 140, 20, &ob->parent, "Parent Object");
- if((ob->parent) && (ob->partype == PARBONE)) {
- // bt= uiDefBut(block, TEX, B_OBJECTPANELPARENT, "ParBone:", 160, 160, 140, 20, ob->parsubstr, 0, 30, 0, 0, "");
- // uiButSetCompleteFunc(bt, autocomplete_bone, (void *)ob->parent);
- }
- else {
- strcpy(ob->parsubstr, "");
- }
+ strcpy(ob->parsubstr, "");
uiBlockEndAlign(block);
}
}
@@ -1113,14 +1113,18 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
else {
BoundBox *bb = NULL;
- uiDefBut(block, LABEL, 0, "Location:", 10, 170, 100, 20, 0, 0, 0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Location:", 0, 300, 100, 20, 0, 0, 0, 0, 0, "");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_OBJECTPANEL, "X:", 0, 280, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANEL, "Y:", 0, 260, 120, 19, &(ob->loc[1]), -lim, lim, 100, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANEL, "Z:", 0, 240, 120, 19, &(ob->loc[2]), -lim, lim, 100, 3, "");
+ uiBlockEndAlign(block);
+
uiBlockBeginAlign(block);
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 10,150,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANEL, "X:", 30, 150, 120, 19, &(ob->loc[0]), -lim, lim, 100, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 10,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANEL, "Y:", 30, 130, 120, 19, &(ob->loc[1]), -lim, lim, 100, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 10,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANEL, "Z:", 30, 110, 120, 19, &(ob->loc[2]), -lim, lim, 100, 3, "");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCX, B_REDR, ICON_UNLOCKED, 125, 280, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects X Location value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCY, B_REDR, ICON_UNLOCKED, 125, 260, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Y Location value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_LOCZ, B_REDR, ICON_UNLOCKED, 125, 240, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Location value from being Transformed");
+ uiBlockEndAlign(block);
tfp->ob_eul[0]= 180.0*ob->rot[0]/M_PI;
tfp->ob_eul[1]= 180.0*ob->rot[1]/M_PI;
@@ -1128,40 +1132,53 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
uiBlockBeginAlign(block);
if ((ob->parent) && (ob->partype == PARBONE)) {
- uiDefBut(block, LABEL, 0, "Rotation:", 160, 170, 100, 20, 0, 0, 0, 0, 0, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 160,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELROT, "X:", 180, 130, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 160,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:", 180, 110, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 160,90,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:", 180, 90, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, "");
+ uiDefBut(block, LABEL, 0, "Rotation:", 0, 220, 100, 20, 0, 0, 0, 0, 0, "");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_OBJECTPANELROT, "X:", 0, 200, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:", 0, 180, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:", 0, 160, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, "");
+ uiBlockEndAlign(block);
+
+ uiBlockBeginAlign(block);
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 125, 200, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects X Rotation from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 125, 180, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Y Rotation value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 125, 160, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Rotation value from being Transformed");
+ uiBlockEndAlign(block);
}
else {
- uiDefBut(block, LABEL, 0, "Rotation:", 160, 170, 100, 20, 0, 0, 0, 0, 0, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 160,150,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELROT, "X:", 180, 150, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 160,130,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:", 180, 130, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 160,110,20,19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:", 180, 110, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, "");
+ uiDefBut(block, LABEL, 0, "Rotation:", 0, 220, 100, 20, 0, 0, 0, 0, 0, "");
+ uiBlockBeginAlign(block);
+ uiDefButF(block, NUM, B_OBJECTPANELROT, "X:", 0, 200, 120, 19, &(tfp->ob_eul[0]), -lim, lim, 1000, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELROT, "Y:", 0, 180, 120, 19, &(tfp->ob_eul[1]), -lim, lim, 1000, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELROT, "Z:", 0, 160, 120, 19, &(tfp->ob_eul[2]), -lim, lim, 1000, 3, "");
+ uiBlockEndAlign(block);
+
+ uiBlockBeginAlign(block);
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTX, B_REDR, ICON_UNLOCKED, 125, 200, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects X Rotation value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTY, B_REDR, ICON_UNLOCKED, 125, 180, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Y Rotation value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_ROTZ, B_REDR, ICON_UNLOCKED, 125, 160, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Rotation value from being Transformed");
+ uiBlockEndAlign(block);
}
tfp->ob_scale[0]= ob->size[0];
tfp->ob_scale[1]= ob->size[1];
tfp->ob_scale[2]= ob->size[2];
- uiDefBut(block, LABEL, 0, "Scale:", 10, 90, 100, 20, 0, 0, 0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Scale:", 0, 140, 100, 20, 0, 0, 0, 0, 0, "");
+ uiDefButS(block, OPTION, B_REDR, "Link", 60, 140, 50, 19, &(tfp->link_scale), 0, 1, 0, 0, "Scale values vary proportionally in all directions");
uiBlockBeginAlign(block);
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 10, 70, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELSCALE, "X:", 30, 70, 120, 19, &(tfp->ob_scale[0]), -lim, lim, 10, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 10, 50, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Y:", 30, 50, 120, 19, &(tfp->ob_scale[1]), -lim, lim, 10, 3, "");
- uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 10, 30, 20, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects this value from being Transformed");
- uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Z:", 30, 30, 120, 19, &(tfp->ob_scale[2]), -lim, lim, 10, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELSCALE, "X:", 0, 120, 120, 19, &(tfp->ob_scale[0]), -lim, lim, 10, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Y:", 0, 100, 120, 19, &(tfp->ob_scale[1]), -lim, lim, 10, 3, "");
+ uiDefButF(block, NUM, B_OBJECTPANELSCALE, "Z:", 0, 80, 120, 19, &(tfp->ob_scale[2]), -lim, lim, 10, 3, "");
uiBlockEndAlign(block);
- uiDefButS(block, TOG, B_REDR, "Link Scale", 10, 0, 140, 19, &(tfp->link_scale), 0, 1, 0, 0, "Scale values vary proportionally in all directions");
+ uiBlockBeginAlign(block);
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEX, B_REDR, ICON_UNLOCKED, 125, 120, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects X Scale value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEY, B_REDR, ICON_UNLOCKED, 125, 100, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Y Scale value from being Transformed");
+ uiDefIconButBitS(block, ICONTOG, OB_LOCK_SCALEZ, B_REDR, ICON_UNLOCKED, 125, 80, 25, 19, &(ob->protectflag), 0, 0, 0, 0, "Protects Z Scale value from being Transformed");
+
+
bb= object_get_boundbox(ob);
if (bb) {
@@ -1175,19 +1192,19 @@ static void view3d_panel_object(const bContext *C, Panel *pa)
if ((ob->parent) && (ob->partype == PARBONE)) {
- uiDefBut(block, LABEL, 0, "Dimensions:", 160, 90, 100, 20, 0, 0, 0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Dimensions:", 0, 60, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:", 160, 70, 140, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size");
- uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:", 160, 50, 140, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size");
- uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:", 160, 30, 140, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size");
+ uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:", 0, 40, 150, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate X bounding box size");
+ uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:", 0, 20, 150, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate Y bounding box size");
+ uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:", 0, 0, 150, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate Z bounding box size");
}
else {
- uiDefBut(block, LABEL, 0, "Dimensions:", 160, 90, 100, 20, 0, 0, 0, 0, 0, "");
+ uiDefBut(block, LABEL, 0, "Dimensions:", 0, 60, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
- uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:", 160, 70, 140, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate bounding box size");
- uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:", 160, 50, 140, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate bounding box size");
- uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:", 160, 30, 140, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate bounding box size");
+ uiDefButF(block, NUM, B_OBJECTPANELDIMS, "X:", 0, 40, 150, 19, &(tfp->ob_dims[0]), 0.0, lim, 10, 3, "Manipulate X bounding box size");
+ uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Y:", 0, 20, 150, 19, &(tfp->ob_dims[1]), 0.0, lim, 10, 3, "Manipulate Y bounding box size");
+ uiDefButF(block, NUM, B_OBJECTPANELDIMS, "Z:", 0, 0, 150, 19, &(tfp->ob_dims[2]), 0.0, lim, 10, 3, "Manipulate Z bounding box size");
}
uiBlockEndAlign(block);