diff options
author | Matt Ebb <matt@mke3.net> | 2009-08-28 06:24:14 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-08-28 06:24:14 +0400 |
commit | 208f6daa1d2631e0643a97e6d0f456255a0dcde4 (patch) | |
tree | f021b6c4f8cf0c3d8e9ee35d77d9f002d63cc0fc /release | |
parent | 9c66deb47a1c2c7330d483090ec715a4c35e3e07 (diff) |
* Tweak texture paint view3d settings, make projection paint options dependent on the tool, rather than (weirdly) the tool's availability dependent on projection paint settings.
Diffstat (limited to 'release')
-rw-r--r-- | release/ui/space_view3d_toolbar.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/release/ui/space_view3d_toolbar.py b/release/ui/space_view3d_toolbar.py index bbca43279a7..0e6dc76d49d 100644 --- a/release/ui/space_view3d_toolbar.py +++ b/release/ui/space_view3d_toolbar.py @@ -362,10 +362,8 @@ class VIEW3D_PT_tools_brush(PaintPanel): col = layout.column(align=True) col.item_enumR(settings, "tool", 'DRAW') col.item_enumR(settings, "tool", 'SOFTEN') - if settings.use_projection: - col.item_enumR(settings, "tool", 'CLONE') - else: - col.item_enumR(settings, "tool", 'SMEAR') + col.item_enumR(settings, "tool", 'CLONE') + col.item_enumR(settings, "tool", 'SMEAR') col = layout.column() col.itemR(brush, "color", text="") @@ -540,12 +538,22 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel): # col.itemR(vpaint, "mul", text="") -# ********** default tools for texturepaint **************** +# ********** options for projection paint **************** -class VIEW3D_PT_tools_texturepaint(View3DPanel): +class VIEW3D_PT_tools_projectpaint(View3DPanel): __context__ = "texturepaint" - __label__ = "Options" + __label__ = "Project Paint" + + def poll(self, context): + return context.tool_settings.image_paint.tool != 'SMEAR' + + def draw_header(self, context): + layout = self.layout + + ipaint = context.tool_settings.image_paint + layout.itemR(ipaint, "use_projection", text="") + def draw(self, context): layout = self.layout @@ -554,7 +562,6 @@ class VIEW3D_PT_tools_texturepaint(View3DPanel): use_projection= ipaint.use_projection col = layout.column() - col.itemR(ipaint, "use_projection") sub = col.column() sub.active = use_projection sub.itemR(ipaint, "use_occlude") @@ -631,5 +638,5 @@ bpy.types.register(VIEW3D_PT_tools_brush_curve) bpy.types.register(VIEW3D_PT_sculpt_options) bpy.types.register(VIEW3D_PT_tools_vertexpaint) bpy.types.register(VIEW3D_PT_tools_weightpaint) -bpy.types.register(VIEW3D_PT_tools_texturepaint) +bpy.types.register(VIEW3D_PT_tools_projectpaint) bpy.types.register(VIEW3D_PT_tools_particlemode) |