[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21663] branches/blender2.5/blender: patch from William, adds some rna user prefs and adjusts prefs UI.
Campbell Barton
ideasman42 at gmail.com
Fri Jul 17 14:36:00 CEST 2009
Revision: 21663
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21663
Author: campbellbarton
Date: 2009-07-17 14:35:57 +0200 (Fri, 17 Jul 2009)
Log Message:
-----------
patch from William, adds some rna user prefs and adjusts prefs UI.
Modified Paths:
--------------
branches/blender2.5/blender/release/ui/buttons_material.py
branches/blender2.5/blender/release/ui/space_info.py
branches/blender2.5/blender/source/blender/editors/space_console/space_console.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_userdef.c
Modified: branches/blender2.5/blender/release/ui/buttons_material.py
===================================================================
--- branches/blender2.5/blender/release/ui/buttons_material.py 2009-07-17 12:26:40 UTC (rev 21662)
+++ branches/blender2.5/blender/release/ui/buttons_material.py 2009-07-17 12:35:57 UTC (rev 21663)
@@ -55,7 +55,7 @@
class MATERIAL_PT_material(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_material"
- __label__ = "Material"
+ __label__ = "Shading"
def draw(self, context):
layout = self.layout
@@ -68,15 +68,41 @@
if mat:
layout.itemR(mat, "type", expand=True)
- layout.itemR(mat, "alpha", slider=True)
- row = layout.row()
- row.active = mat.type in ('SURFACE', 'VOLUME')
- row.itemR(mat, "shadeless")
- row.itemR(mat, "wireframe")
- rowsub = row.row()
- rowsub.active = mat.shadeless== False
- rowsub.itemR(mat, "tangent_shading")
+
+# row = layout.row()
+
+ if mat.type == 'SURFACE':
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(mat, "alpha", slider=True)
+ sub.itemR(mat, "ambient", slider=True)
+ sub.itemR(mat, "emit")
+ sub.itemR(mat, "translucency", slider=True)
+
+ sub = split.column()
+ sub.itemR(mat, "shadeless")
+ sub.itemR(mat, "wireframe")
+ sub.itemR(mat, "tangent_shading")
+ sub.itemR(mat, "cubic", slider=True)
+ elif mat.type == 'VOLUME':
+ split = layout.split()
+
+ sub = split.column()
+ sub.itemR(mat, "alpha", slider=True)
+ sub.itemR(mat, "ambient", slider=True)
+ sub.itemR(mat, "emit")
+ sub.itemR(mat, "translucency", slider=True)
+
+ sub = split.column()
+ sub.itemR(mat, "shadeless")
+ sub.itemR(mat, "wireframe")
+ sub.itemR(mat, "tangent_shading")
+ sub.itemR(mat, "cubic", slider=True)
+ elif mat.type == 'HALO':
+ layout.itemR(mat, "alpha", slider=True)
+
class MATERIAL_PT_strand(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_strand"
@@ -126,6 +152,7 @@
sub.itemR(mat, "full_oversampling")
sub.itemR(mat, "sky")
sub.itemR(mat, "exclude_mist")
+ sub = split.column()
sub.itemR(mat, "face_texture")
colsub = sub.column()
colsub.active = mat.face_texture
@@ -134,14 +161,26 @@
sub.itemR(mat, "light_group")
sub.itemR(mat, "light_group_exclusive")
+
+
+
+class MATERIAL_PT_shadows(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_shadows"
+ __label__ = "Shadows"
+
+ def draw(self, context):
+ layout = self.layout
+ mat = context.material
+
+ split = layout.split()
+
sub = split.column()
- sub.itemL(text="Shadows:")
sub.itemR(mat, "shadows", text="Recieve")
sub.itemR(mat, "transparent_shadows", text="Recieve Transparent")
sub.itemR(mat, "only_shadow", text="Shadows Only")
sub.itemR(mat, "cast_shadows_only", text="Cast Only")
sub.itemR(mat, "shadow_casting_alpha", text="Casting Alpha", slider=True)
-
+ sub = split.column()
sub.itemR(mat, "ray_shadow_bias", text="Auto Ray Bias")
colsub = sub.column()
colsub.active = not mat.ray_shadow_bias
@@ -149,6 +188,7 @@
sub.itemR(mat, "cast_buffer_shadows")
sub.itemR(mat, "shadow_buffer_bias", text="Buffer Bias")
+
class MATERIAL_PT_diffuse(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_diffuse"
__label__ = "Diffuse"
@@ -165,20 +205,16 @@
sub = split.column()
sub.itemR(mat, "diffuse_color", text="")
- sub.itemR(mat, "object_color")
- colsub = sub.column()
- colsub.active = mat.shadeless== False
- colsub.itemR(mat, "ambient", slider=True)
- colsub.itemR(mat, "emit")
- sub.itemR(mat, "translucency", slider=True)
+ sub.itemR(mat, "vertex_color_paint")
+ sub.itemR(mat, "vertex_color_light")
sub = split.column()
sub.active = mat.shadeless== False
sub.itemR(mat, "diffuse_reflection", text="Intensity", slider=True)
- sub.itemR(mat, "vertex_color_light")
- sub.itemR(mat, "vertex_color_paint")
- sub.itemR(mat, "cubic")
+ sub.itemR(mat, "object_color")
+
+
row = layout.row()
row.active = mat.shadeless== False
row.itemR(mat, "diffuse_shader", text="Shader")
@@ -235,8 +271,6 @@
sub.itemR(mat, "specular_ior", text="IOR")
if mat.spec_shader == 'WARDISO':
sub.itemR(mat, "specular_slope", text="Slope")
- sub = split.column()
- sub.itemR(mat, "specular_hardness", text="Hardness")
if mat.spec_shader == 'TOON':
sub.itemR(mat, "specular_toon_size", text="Size")
sub = split.column()
@@ -438,3 +472,4 @@
bpy.types.register(MATERIAL_PT_halo)
bpy.types.register(MATERIAL_PT_strand)
bpy.types.register(MATERIAL_PT_options)
+bpy.types.register(MATERIAL_PT_shadows)
Modified: branches/blender2.5/blender/release/ui/space_info.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_info.py 2009-07-17 12:26:40 UTC (rev 21662)
+++ branches/blender2.5/blender/release/ui/space_info.py 2009-07-17 12:35:57 UTC (rev 21663)
@@ -134,89 +134,92 @@
split = layout.split()
col = split.column()
- col.itemL(text="Display:")
- col.itemR(view, "tooltips")
- col.itemR(view, "display_object_info", text="Object Info")
- col.itemR(view, "use_large_cursors")
- col.itemR(view, "show_view_name", text="View Name")
- col.itemR(view, "show_playback_fps", text="Playback FPS")
- col.itemR(view, "global_scene")
- col.itemR(view, "pin_floating_panels")
- col.itemR(view, "object_center_size")
- col.itemS()
- col.itemS()
+ colsplit = col.split(percentage=0.8)
+ colsplitcol = colsplit.column()
+ colsplitcol.itemL(text="Display:")
+ colsplitcol.itemR(view, "tooltips")
+ colsplitcol.itemR(view, "display_object_info", text="Object Info")
+ colsplitcol.itemR(view, "use_large_cursors")
+ colsplitcol.itemR(view, "show_view_name", text="View Name")
+ colsplitcol.itemR(view, "show_playback_fps", text="Playback FPS")
+ colsplitcol.itemR(view, "global_scene")
+ colsplitcol.itemR(view, "pin_floating_panels")
+ colsplitcol.itemR(view, "object_center_size")
+ colsplitcol.itemS()
+ colsplitcol.itemS()
+ colsplitcol.itemS()
- col.itemL(text="Menus:")
- col.itemR(view, "open_mouse_over")
- col.itemL(text="Menu Open Delay:")
- col.itemR(view, "open_toplevel_delay", text="Top Level")
- col.itemR(view, "open_sublevel_delay", text="Sub Level")
+ colsplitcol.itemR(view, "show_mini_axis")
+ colsub = colsplitcol.column()
+ colsub.enabled = view.show_mini_axis
+ colsub.itemR(view, "mini_axis_size")
+ colsub.itemR(view, "mini_axis_brightness")
+
+
col = split.column()
-
- col.itemL(text="View Manipulation:")
- col.itemR(view, "auto_depth")
- col.itemR(view, "global_pivot")
- col.itemR(view, "zoom_to_mouse")
- col.itemL(text="Zoom Style:")
- row = col.row()
+ colsplit = col.split(percentage=0.8)
+ colsplitcol = colsplit.column()
+ colsplitcol.itemL(text="View Manipulation:")
+ colsplitcol.itemR(view, "auto_depth")
+ colsplitcol.itemR(view, "global_pivot")
+ colsplitcol.itemR(view, "zoom_to_mouse")
+ colsplitcol.itemL(text="Zoom Style:")
+ row = colsplitcol.row()
row.itemR(view, "viewport_zoom_style", expand=True)
- col.itemL(text="Orbit Style:")
- row = col.row()
+ colsplitcol.itemL(text="Orbit Style:")
+ row = colsplitcol.row()
row.itemR(view, "view_rotation", expand=True)
- col.itemR(view, "perspective_orthographic_switch")
- col.itemR(view, "smooth_view")
- col.itemR(view, "rotation_angle")
- col.itemL(text="NDOF Device:")
- col.itemR(view, "ndof_pan_speed", text="Pan Speed")
- col.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
+ colsplitcol.itemR(view, "perspective_orthographic_switch")
+ colsplitcol.itemR(view, "smooth_view")
+ colsplitcol.itemR(view, "rotation_angle")
+ colsplitcol.itemL(text="NDOF Device:")
+ colsplitcol.itemR(view, "ndof_pan_speed", text="Pan Speed")
+ colsplitcol.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
col = split.column()
- col.itemL(text="Snap:")
- col.itemR(view, "snap_translate", text="Translate")
- col.itemR(view, "snap_rotate", text="Rotate")
- col.itemR(view, "snap_scale", text="Scale")
- col.itemS()
- col.itemS()
+ colsplit = col.split(percentage=0.8)
+ colsplitcol = colsplit.column()
+ colsplitcol.itemL(text="Mouse Buttons:")
+ colsplitcol.itemR(view, "left_mouse_button_select")
+ colsplitcol.itemR(view, "right_mouse_button_select")
+ colsplitcol.itemR(view, "emulate_3_button_mouse")
+ colsplitcol.itemR(view, "use_middle_mouse_paste")
+ colsplitcol.itemR(view, "middle_mouse_rotate")
+ colsplitcol.itemR(view, "middle_mouse_pan")
+ colsplitcol.itemR(view, "wheel_invert_zoom")
+ colsplitcol.itemR(view, "wheel_scroll_lines")
+ colsplitcol.itemS()
+ colsplitcol.itemS()
+ colsplitcol.itemS()
- col.itemL(text="Mouse Buttons:")
- col.itemR(view, "left_mouse_button_select")
- col.itemR(view, "right_mouse_button_select")
- col.itemR(view, "emulate_3_button_mouse")
- col.itemR(view, "use_middle_mouse_paste")
- col.itemR(view, "middle_mouse_rotate")
- col.itemR(view, "middle_mouse_pan")
- col.itemR(view, "wheel_invert_zoom")
- col.itemR(view, "wheel_scroll_lines")
+ colsplitcol.itemL(text="Menus:")
+ colsplitcol.itemR(view, "open_mouse_over")
+ colsplitcol.itemL(text="Menu Open Delay:")
+ colsplitcol.itemR(view, "open_toplevel_delay", text="Top Level")
+ colsplitcol.itemR(view, "open_sublevel_delay", text="Sub Level")
+
-
col = split.column()
- #Axis
- col.itemL(text="Mini Axis:")
- col.itemR(view, "show_mini_axis")
- colsub = col.column()
- colsub.enabled = view.show_mini_axis
- colsub.itemR(view, "mini_axis_size")
- colsub.itemR(view, "mini_axis_brightness")
- col.itemS()
- col.itemS()
+ colsplit = col.split(percentage=0.8)
+ colsplitcol = colsplit.column()
#manipulator
- col.itemL(text="Manipulator:")
- col.itemR(view, "use_manipulator")
- colsub = col.column()
+ colsplitcol.itemR(view, "use_manipulator")
+ colsub = colsplitcol.column()
colsub.enabled = view.use_manipulator
colsub.itemR(view, "manipulator_size", text="Size")
colsub.itemR(view, "manipulator_handle_size", text="Handle Size")
colsub.itemR(view, "manipulator_hotspot", text="Hotspot")
- col.itemS()
- col.itemS()
+ colsplitcol.itemS()
+ colsplitcol.itemS()
+ colsplitcol.itemS()
- col.itemL(text="Toolbox:")
- col.itemR(view, "use_column_layout")
- col.itemL(text="Open Toolbox Delay:")
- col.itemR(view, "open_left_mouse_delay", text="Hold LMB")
- col.itemR(view, "open_right_mouse_delay", text="Hold RMB")
+ colsplitcol.itemL(text="Toolbox:")
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list