diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-07-21 21:24:03 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-07-21 21:24:22 +0400 |
commit | 86059f03eb60bf3d37e8501ef278d4b090a86ae6 (patch) | |
tree | e5ed6b690d154c5f6d916d66ddc2b88428397b91 /release/scripts/startup/bl_ui/properties_paint_common.py | |
parent | 6a2cefc061ec3805ce3f47bf76b728943fb2e4a7 (diff) |
Make clone tool UI slightly less horrible.
Move clone tool options as well as layer selection to the brush panel.
That should make its use more apparent and, most importantly, easy.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_paint_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index 8359ae651ff..80f7db37faa 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -86,7 +86,7 @@ class UnifiedPaintPanel(): parent.template_color_picker(ptr, prop_name, value_slider=value_slider) -def brush_texpaint_common(panel, context, layout, brush, settings): +def brush_texpaint_common(panel, context, layout, brush, settings, projpaint=False): capabilities = brush.image_paint_capabilities col = layout.column() @@ -137,8 +137,31 @@ def brush_texpaint_common(panel, context, layout, brush, settings): elif brush.image_tool == 'CLONE': col.separator() - col.prop(brush, "clone_image", text="Image") - col.prop(brush, "clone_alpha", text="Alpha") + if projpaint: + col.prop(settings, "use_clone_layer", text="Clone from paint slot") + + if settings.use_clone_layer: + ob = context.active_object + col = layout.column() + + if len(ob.material_slots) > 1: + col.label("Materials") + col.template_list("MATERIAL_UL_matslots", "", + ob, "material_slots", + ob, "active_material_index", rows=2) + + mat = ob.active_material + if mat: + col.label("Clone Slot") + col.template_list("TEXTURE_UL_texpaintslots", "", + mat, "texture_paint_slots", + mat, "paint_clone_slot", rows=2) + + else: + col.prop(brush, "clone_image", text="Image") + col.prop(brush, "clone_alpha", text="Alpha") + + col.separator() |