diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-22 13:48:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-22 13:48:13 +0300 |
commit | 3221dea46eeb6c5441c4617d704ffb3e8caeeca3 (patch) | |
tree | ea8127162d05477981cffa63bbf72949df2d865e /release | |
parent | 5a3ac3ceeb0d3550c14987f5cfd607e1ad126e64 (diff) |
clone and stencil layer access added, renamed mask to stencil layer internally
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/space_view3d_toolbar.py | 47 |
1 files changed, 37 insertions, 10 deletions
diff --git a/release/scripts/ui/space_view3d_toolbar.py b/release/scripts/ui/space_view3d_toolbar.py index 2c959e640ea..ca8978eecf8 100644 --- a/release/scripts/ui/space_view3d_toolbar.py +++ b/release/scripts/ui/space_view3d_toolbar.py @@ -826,24 +826,51 @@ class VIEW3D_PT_tools_projectpaint(View3DPanel): col.active = (ipaint.use_normal_falloff and use_projection) col.prop(ipaint, "normal_angle", text="") - split = layout.split(percentage=0.7) - - col = split.column(align=False) - col.active = (use_projection) - col.prop(ipaint, "use_stencil_layer") + col = layout.column(align=False) + row = col.row() + row.active = (use_projection) + row.prop(ipaint, "use_stencil_layer", text="Stencil") - col = split.column(align=False) - col.active = (use_projection and ipaint.use_stencil_layer) - col.prop(ipaint, "invert_stencil", text="Inv") + row2 = row.row(align=False) + row2.active = (use_projection and ipaint.use_stencil_layer) + row2.menu("VIEW3D_MT_tools_projectpaint_stencil", text=context.active_object.data.uv_texture_stencil.name) + row2.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA') col = layout.column() sub = col.column() - sub.active = (settings.tool == 'CLONE') - sub.prop(ipaint, "use_clone_layer") + row = sub.row() + row.active = (settings.tool == 'CLONE') + + row.prop(ipaint, "use_clone_layer", text="Clone") + row.menu("VIEW3D_MT_tools_projectpaint_clone", text=context.active_object.data.uv_texture_clone.name) sub = col.column() sub.prop(ipaint, "seam_bleed") + class VIEW3D_MT_tools_projectpaint_clone(bpy.types.Menu): + bl_label = "Clone Layer" + + def draw(self, context): + layout = self.layout + for i, tex in enumerate(context.active_object.data.uv_textures): + prop = layout.operator("wm.context_set_int", text=tex.name) + prop.path = "active_object.data.uv_texture_clone_index" + prop.value = i + + + class VIEW3D_MT_tools_projectpaint_stencil(bpy.types.Menu): + bl_label = "Mask Layer" + + def draw(self, context): + layout = self.layout + for i, tex in enumerate(context.active_object.data.uv_textures): + prop = layout.operator("wm.context_set_int", text=tex.name) + prop.path = "active_object.data.uv_texture_stencil_index" + prop.value = i + + bpy.types.register(VIEW3D_MT_tools_projectpaint_clone) + bpy.types.register(VIEW3D_MT_tools_projectpaint_stencil) + class VIEW3D_PT_tools_particlemode(View3DPanel): '''default tools for particle mode''' |