diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-04-23 00:46:18 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-04-23 00:46:18 +0400 |
commit | 36e476ede6dae4cc21e1d9a05b7e9b93d52f70d1 (patch) | |
tree | 2275ccfce9f899f26243915e7d602caf40b36ca4 /release/scripts/startup/bl_ui/space_view3d_toolbar.py | |
parent | 3c67cf9594264d8c4fc44f8f15e4033aa9b0e92d (diff) |
Overlay refactor:
Allow separate control for tex/mask/cursor overlay. This commit implements
separate overlays for mask textures and cursor curves. The user can turn on
and off separate parts of the overlay by using the appropriate widgets.
The cursor overlay widgets are located at the tool selection panel
Also fixed alpha masks not getting correctly masked and mask texture mapping
not having the correct update callback
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d_toolbar.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 847d1fa43e4..c0c84c4449f 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -670,6 +670,19 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel): col.prop(brush, "use_persistent") 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') + + sub = row.row() + sub.prop(brush, "cursor_overlay_alpha", text="Alpha") + sub.prop(brush, "cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA') + # Texture Paint Mode # elif context.image_paint_object and brush: @@ -693,6 +706,20 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel): col.active = (brush.blend not in {'ERASE_ALPHA', 'ADD_ALPHA'}) col.prop(brush, "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') + + sub = row.row() + sub.prop(brush, "cursor_overlay_alpha", text="Alpha") + sub.prop(brush, "cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA') + + # Weight Paint Mode # elif context.weight_paint_object and brush: layout.prop(toolsettings, "use_auto_normalize", text="Auto Normalize") @@ -736,6 +763,19 @@ class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel): col.prop(brush, "vertex_tool", text="Blend") + 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') + + sub = row.row() + sub.prop(brush, "cursor_overlay_alpha", text="Alpha") + sub.prop(brush, "cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA') + class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel): bl_label = "Texture" @@ -811,7 +851,7 @@ class VIEW3D_PT_tools_mask_texture(View3DPanel, Panel): row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON') sub = row.row() - sub.prop(brush, "texture_overlay_alpha", text="Alpha") + sub.prop(brush, "mask_overlay_alpha", text="Alpha") sub.prop(brush, "cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA') |