[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59741] branches/soc-2013-ui_replay: * Tweaked the layout of the toolbar panels, added a compact representation for brush and texture previews, and slightly tweaked the organisation of regions in the view3d.
Vincent Akkermans
vincent at ack-err.net
Mon Sep 2 18:39:53 CEST 2013
Revision: 59741
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59741
Author: ack-err
Date: 2013-09-02 16:39:52 +0000 (Mon, 02 Sep 2013)
Log Message:
-----------
* Tweaked the layout of the toolbar panels, added a compact representation for brush and texture previews, and slightly tweaked the organisation of regions in the view3d.
Modified Paths:
--------------
branches/soc-2013-ui_replay/release/scripts/startup/bl_ui/properties_paint_common.py
branches/soc-2013-ui_replay/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2013-ui_replay/source/blender/blenloader/intern/readfile.c
branches/soc-2013-ui_replay/source/blender/editors/include/UI_interface.h
branches/soc-2013-ui_replay/source/blender/editors/interface/interface_templates.c
branches/soc-2013-ui_replay/source/blender/editors/space_view3d/space_view3d.c
branches/soc-2013-ui_replay/source/blender/editors/space_view3d/view3d_toolbar.c
branches/soc-2013-ui_replay/source/blender/makesrna/intern/rna_ui_api.c
Modified: branches/soc-2013-ui_replay/release/scripts/startup/bl_ui/properties_paint_common.py
===================================================================
--- branches/soc-2013-ui_replay/release/scripts/startup/bl_ui/properties_paint_common.py 2013-09-02 16:05:51 UTC (rev 59740)
+++ branches/soc-2013-ui_replay/release/scripts/startup/bl_ui/properties_paint_common.py 2013-09-02 16:39:52 UTC (rev 59741)
@@ -73,40 +73,46 @@
def brush_texture_settings(layout, brush, sculpt):
tex_slot = brush.texture_slot
- layout.label(text="Brush Mapping:")
+ col = layout.column(align=True)
+ row = col.row()
+ row.label(text="Mapping:")
# map_mode
if sculpt:
- layout.row().prop(tex_slot, "map_mode", text="")
- layout.separator()
+ row.prop(tex_slot, "map_mode", text="")
else:
- layout.row().prop(tex_slot, "tex_paint_map_mode", text="")
- layout.separator()
+ row.prop(tex_slot, "tex_paint_map_mode", text="")
- if tex_slot.map_mode == 'STENCIL':
- if brush.texture and brush.texture.type == 'IMAGE':
- layout.operator("brush.stencil_fit_image_aspect")
- layout.operator("brush.stencil_reset_transform")
+ col.separator()
# angle and texture_angle_source
- col = layout.column()
- col.active = brush.brush_capabilities.has_texture_angle_source
- col.label(text="Angle:")
+ row = col.row()
+ row.active = brush.brush_capabilities.has_texture_angle_source
+ row.label(text="Angle:")
+ sub = row.column()
if brush.brush_capabilities.has_random_texture_angle:
if sculpt:
if brush.sculpt_capabilities.has_random_texture_angle:
- col.prop(brush, "texture_angle_source_random", text="")
+ sub.prop(brush, "texture_angle_source_random", text="")
else:
- col.prop(brush, "texture_angle_source_no_random", text="")
+ sub.prop(brush, "texture_angle_source_no_random", text="")
else:
- col.prop(brush, "texture_angle_source_random", text="")
+ sub.prop(brush, "texture_angle_source_random", text="")
else:
- col.prop(brush, "texture_angle_source_no_random", text="")
- col = layout.column()
- col.active = brush.brush_capabilities.has_texture_angle
- col.prop(tex_slot, "angle", text="")
+ sub.prop(brush, "texture_angle_source_no_random", text="")
+ # row = layout.column()
+ sub.active = brush.brush_capabilities.has_texture_angle
+ sub.prop(tex_slot, "angle", text="")
+ col = layout.column(align=True)
+ col.separator()
+
+ if tex_slot.map_mode == 'STENCIL':
+ if brush.texture and brush.texture.type == 'IMAGE':
+ col.operator("brush.stencil_fit_image_aspect")
+ col.operator("brush.stencil_reset_transform")
+
# scale and offset
split = layout.split()
split.prop(tex_slot, "offset")
Modified: branches/soc-2013-ui_replay/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2013-ui_replay/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2013-09-02 16:05:51 UTC (rev 59740)
+++ branches/soc-2013-ui_replay/release/scripts/startup/bl_ui/space_view3d_toolbar.py 2013-09-02 16:39:52 UTC (rev 59741)
@@ -98,9 +98,9 @@
VIEW3D_PT_tools_objectmode_history = history_panel("objectmode")
-class VIEW3D_PT_tools_objectmode_keyframes(View3DPanel, Panel):
+class VIEW3D_PT_tools_objectmode_animation(View3DPanel, Panel):
bl_context = "objectmode"
- bl_label = "Keyframes"
+ bl_label = "Animation"
def draw(self, context):
layout = self.layout
@@ -251,6 +251,7 @@
class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
bl_context = "mesh_edit"
bl_label = "Mesh Options"
+ bl_options = {'DEFAULT_CLOSED'}
@classmethod
def poll(cls, context):
@@ -562,7 +563,8 @@
if not context.particle_edit_object:
col = layout.split().column()
- col.template_ID_preview_brush(settings, "brush", new="brush.add", rows=5, cols=8)
+ # col.template_ID_preview_compact(settings, "brush", new="brush.add", rows=5, cols=8)
+ col.template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
# Particle Mode #
if context.particle_edit_object:
@@ -571,7 +573,7 @@
layout.column().prop(settings, "tool", expand=True)
if tool != 'NONE':
- col = layout.column()
+ col = layout.column(align=True)
col.prop(brush, "size", slider=True)
if tool != 'ADD':
col.prop(brush, "strength", slider=True)
@@ -595,7 +597,7 @@
elif context.sculpt_object and brush:
capabilities = brush.sculpt_capabilities
- col = layout.column()
+ col = layout.column(align=True)
col.separator()
@@ -614,7 +616,6 @@
# strength, use_strength_pressure, and use_strength_attenuation
if capabilities.has_strength:
- col.separator()
row = col.row(align=True)
if capabilities.has_space_attenuation:
@@ -628,28 +629,23 @@
# auto_smooth_factor and use_inverse_smooth_pressure
if capabilities.has_auto_smooth:
- col.separator()
-
row = col.row(align=True)
row.prop(brush, "auto_smooth_factor", slider=True)
row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="")
# normal_weight
if capabilities.has_normal_weight:
- col.separator()
row = col.row(align=True)
row.prop(brush, "normal_weight", slider=True)
# crease_pinch_factor
if capabilities.has_pinch_factor:
- col.separator()
row = col.row(align=True)
row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
# use_original_normal and sculpt_plane
if capabilities.has_sculpt_plane:
row = col.row(align=True)
- col.separator()
if brush.use_original_normal:
row.prop(brush, "use_original_normal", toggle=True, text="", icon='LOCKED')
@@ -663,7 +659,6 @@
# plane_offset, use_offset_pressure, use_plane_trim, plane_trim
if capabilities.has_plane_offset:
- row = col.row(align=True)
row.prop(brush, "plane_offset", slider=True)
row.prop(brush, "use_offset_pressure", text="")
@@ -713,14 +708,11 @@
col.operator("sculpt.set_persistent_base")
col = layout.column(align=True)
- col.label(text="Overlay:")
-
+
row = col.row()
- if brush.use_cursor_overlay:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
+ row.prop(brush, "use_cursor_overlay", toggle=True, text="",
+ icon=('RESTRICT_VIEW_OFF' if brush.use_cursor_overlay else 'RESTRICT_VIEW_ON'))
+
sub = row.row()
sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
@@ -734,6 +726,8 @@
col.template_color_picker(brush, "color", value_slider=True)
col.prop(brush, "color", text="")
+ col = layout.column(align=True)
+
row = col.row(align=True)
self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
self.prop_unified_size(row, context, brush, "use_pressure_size")
@@ -744,29 +738,26 @@
row = col.row(align=True)
- col.prop(brush, "blend", text="Blend")
+ col.prop(brush, "blend", text="")
col = layout.column()
col.active = (brush.blend not in {'ERASE_ALPHA', 'ADD_ALPHA'})
- col.prop(brush, "use_alpha")
+ col.prop(brush, "use_alpha", text="Use Alpha")
col = layout.column(align=True)
- col.label(text="Overlay:")
row = col.row()
- if brush.use_cursor_overlay:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
- else:
- row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
-
+ row.prop(brush, "use_cursor_overlay", toggle=True, text="",
+ icon=('RESTRICT_VIEW_OFF' if brush.use_cursor_overlay else 'RESTRICT_VIEW_ON'))
+
sub = row.row()
- sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
+ sub.prop(brush, "cursor_overlay_alpha", text="Overlay")
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
# Weight Paint Mode #
elif context.weight_paint_object and brush:
- col = layout.column()
+ col = layout.column(align=True)
row = col.row(align=True)
self.prop_unified_weight(row, context, brush, "weight", slider=True, text="Weight")
@@ -781,18 +772,19 @@
row = col.row(align=True)
- col.prop(brush, "vertex_tool", text="Blend")
+ col.prop(brush, "vertex_tool", text="")
- col = layout.column()
+ col = layout.column(align=True)
col.prop(toolsettings, "use_auto_normalize", text="Auto Normalize")
col.prop(toolsettings, "use_multipaint", text="Multi-Paint")
# Vertex Paint Mode #
elif context.vertex_paint_object and brush:
col = layout.column()
- # col.template_color_picker(brush, "color", value_slider=False)
+ col.template_color_picker(brush, "color", value_slider=True)
col.prop(brush, "color", text="")
+ col = layout.column(align=True)
row = col.row(align=True)
self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list