[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23195] trunk/blender: *Changed some userpref options to enums.
William Reynish
william at reynish.com
Sun Sep 13 23:36:24 CEST 2009
Revision: 23195
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23195
Author: billrey
Date: 2009-09-13 23:36:24 +0200 (Sun, 13 Sep 2009)
Log Message:
-----------
*Changed some userpref options to enums.
*Tweaked curve UI slightly.
Modified Paths:
--------------
trunk/blender/release/ui/buttons_data_curve.py
trunk/blender/release/ui/buttons_data_text.py
trunk/blender/release/ui/space_userpref.py
trunk/blender/source/blender/makesrna/intern/rna_userdef.c
Modified: trunk/blender/release/ui/buttons_data_curve.py
===================================================================
--- trunk/blender/release/ui/buttons_data_curve.py 2009-09-13 20:59:25 UTC (rev 23194)
+++ trunk/blender/release/ui/buttons_data_curve.py 2009-09-13 21:36:24 UTC (rev 23195)
@@ -96,27 +96,29 @@
# col.itemL(text="NORMALS")
# col.itemR(curve, "vertex_normal_flip")
-class DATA_PT_geometry_curve(DataButtonsPanelCurve):
- __label__ = "Geometry "
+class DATA_PT_geometry_curve(DataButtonsPanel):
+ __label__ = "Geometry"
def draw(self, context):
layout = self.layout
curve = context.curve
-
+
split = layout.split()
col = split.column()
col.itemL(text="Modification:")
col.itemR(curve, "width")
col.itemR(curve, "extrude")
- col.itemR(curve, "taper_object", icon='ICON_OUTLINER_OB_CURVE')
+ col.itemL(text="Taper Object:")
+ col.itemR(curve, "taper_object", text="")
col = split.column()
col.itemL(text="Bevel:")
col.itemR(curve, "bevel_depth", text="Depth")
col.itemR(curve, "bevel_resolution", text="Resolution")
- col.itemR(curve, "bevel_object", icon='ICON_OUTLINER_OB_CURVE')
+ col.itemL(text="Bevel Object:")
+ col.itemR(curve, "bevel_object", text="")
class DATA_PT_pathanim(DataButtonsPanelCurve):
Modified: trunk/blender/release/ui/buttons_data_text.py
===================================================================
--- trunk/blender/release/ui/buttons_data_text.py 2009-09-13 20:59:25 UTC (rev 23194)
+++ trunk/blender/release/ui/buttons_data_text.py 2009-09-13 21:36:24 UTC (rev 23195)
@@ -36,9 +36,7 @@
ob = context.object
curve = context.curve
- space = context.space_data
-
- layout.itemR(curve, "curve_2d")
+ space = context.space_data
split = layout.split()
@@ -55,8 +53,8 @@
col = split.column()
col.itemL(text="Resolution:")
sub = col.column(align=True)
- sub.itemR(curve, "resolution_u", text="Preview U")
- sub.itemR(curve, "render_resolution_u", text="Render U")
+ sub.itemR(curve, "resolution_u", text="Preview")
+ sub.itemR(curve, "render_resolution_u", text="Render")
# resolution_v is not used for text
Modified: trunk/blender/release/ui/space_userpref.py
===================================================================
--- trunk/blender/release/ui/space_userpref.py 2009-09-13 20:59:25 UTC (rev 23194)
+++ trunk/blender/release/ui/space_userpref.py 2009-09-13 21:36:24 UTC (rev 23195)
@@ -156,15 +156,15 @@
sub = col.split(percentage=0.85)
sub1 = sub.column()
- sub1.itemL(text="Materials:")
- sub1.itemR(edit, "material_linked_object", text="Linked to Object")
- sub1.itemR(edit, "material_linked_obdata", text="Linked to ObData")
+ sub1.itemL(text="Link Materials To:")
+ sub1.row().itemR(edit, "material_link", expand=True)
sub1.itemS()
sub1.itemS()
sub1.itemS()
sub1.itemL(text="New Objects:")
sub1.itemR(edit, "enter_edit_mode")
- sub1.itemR(edit, "align_to_view")
+ sub1.itemL(text="Align To:")
+ sub1.row().itemR(edit, "object_align", expand=True)
sub1.itemS()
sub1.itemS()
sub1.itemS()
@@ -185,9 +185,9 @@
sub1.itemL(text="Grease Pencil:")
sub1.itemR(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
sub1.itemR(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
- sub1.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
# sub1.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
sub1.itemR(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
+ sub1.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
col = split.column()
sub = col.split(percentage=0.85)
Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2009-09-13 20:59:25 UTC (rev 23194)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c 2009-09-13 21:36:24 UTC (rev 23195)
@@ -1766,28 +1766,38 @@
{BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""},
{0, NULL, 0, NULL, NULL}};
+ static const EnumPropertyItem material_link_items[]= {
+ {0, "OBDATA", 0, "ObData", "Toggle whether the material is linked to object data or the object block."},
+ {USER_MAT_ON_OB, "OBJECT", 0, "Object", "Toggle whether the material is linked to object data or the object block."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static const EnumPropertyItem object_align_items[]= {
+ {0, "WORLD", 0, "World", "Align newly added objects facing the 3D View direction"},
+ {USER_ADD_VIEWALIGNED, "VIEW", 0, "View", "Align newly added objects to the world coordinates"},
+ {0, NULL, 0, NULL, NULL}};
+
+
srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data.");
/* Edit Methods */
- prop= RNA_def_property(srna, "material_linked_object", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_MAT_ON_OB);
- RNA_def_property_ui_text(prop, "Material Linked Object", "Toggle whether the material is linked to object data or the object block.");
+
+ prop= RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, material_link_items);
+ RNA_def_property_ui_text(prop, "Material Link To", "Toggle whether the material is linked to object data or the object block");
+
+ prop= RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, object_align_items);
+ RNA_def_property_ui_text(prop, "Align Object To", "Align newly added objects facing the 3D View direction or the world coordinates");
- prop= RNA_def_property(srna, "material_linked_obdata", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_MAT_ON_OB);
- RNA_def_property_ui_text(prop, "Material Linked ObData", "Toggle whether the material is linked to object data or the object block.");
-
prop= RNA_def_property(srna, "enter_edit_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE);
RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object.");
- prop= RNA_def_property(srna, "align_to_view", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_VIEWALIGNED);
- RNA_def_property_ui_text(prop, "Align To View", "Align newly added objects facing the 3D View direction.");
-
prop= RNA_def_property(srna, "drag_immediately", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_DRAGIMMEDIATE);
RNA_def_property_ui_text(prop, "Drag Immediately", "Moving things with a mouse drag doesn't require a click to confirm (Best for tablet users).");
More information about the Bf-blender-cvs
mailing list