Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2014-07-24 14:41:39 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-07-24 14:41:39 +0400
commit6a933c858cae82f3e7cda74ab8afb9ceb26977f6 (patch)
tree669112029823c2b0cbdeb643b071c23f0b2dbe59 /release
parenta93ec34ac836184cb660c620b1bddde54e240afb (diff)
Move stencil options to own panel under layer tab.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py59
1 files changed, 42 insertions, 17 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 39e6e2d368b..e050c8fcdec 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1088,6 +1088,48 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="")
+
+class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
+ bl_context = "imagepaint"
+ bl_label = "Stencil"
+ bl_category = "Layers"
+
+ @classmethod
+ def poll(cls, context):
+ brush = context.tool_settings.image_paint.brush
+ ob = context.active_object
+ return (brush is not None and ob is not None)
+
+ def draw_header(self, context):
+ ipaint = context.tool_settings.image_paint
+ self.layout.prop(ipaint, "use_stencil_layer", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ toolsettings = context.tool_settings
+ ipaint = toolsettings.image_paint
+ ob = context.active_object
+ mesh = ob.data
+
+ col = layout.column()
+ col.active = ipaint.use_stencil_layer
+
+ stencil_text = mesh.uv_texture_stencil.name if mesh.uv_texture_stencil else ""
+ col.label("UV Map")
+ col.menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
+
+ col.label("Image")
+ row = col.row(align=True)
+ row.operator("image.new", icon='ZOOMIN', text="Add New").texstencil = True;
+ row.template_ID(ipaint, "stencil_image")
+
+ col.label("Visualization")
+ row = col.row(align=True)
+ row.prop(ipaint, "stencil_color", text="")
+ row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
+
+
class VIEW3D_PT_tools_brush_overlay(Panel, View3DPaintPanel):
bl_category = "Options"
bl_label = "Overlay"
@@ -1600,11 +1642,8 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
def draw(self, context):
layout = self.layout
- ob = context.active_object
- mesh = ob.data
toolsettings = context.tool_settings
ipaint = toolsettings.image_paint
- # settings = toolsettings.image_paint
col = layout.column()
@@ -1618,20 +1657,6 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
sub.active = (ipaint.use_normal_falloff)
sub.prop(ipaint, "normal_angle", text="")
- split = layout.split()
-
- split.prop(ipaint, "use_stencil_layer", text="Stencil")
-
- col = split.column()
- col.active = (ipaint.use_stencil_layer)
- row = col.row()
- stencil_text = mesh.uv_texture_stencil.name if mesh.uv_texture_stencil else ""
- row.menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
- row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
- col.template_ID(ipaint, "stencil_image")
- col.operator("image.new").texstencil = True;
- col.prop(ipaint, "stencil_color")
-
layout.prop(ipaint, "seam_bleed")
self.unified_paint_settings(layout, context)