diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-09-21 02:29:50 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-09-21 02:29:50 +0400 |
commit | 3d93eb47f3877375e8318e49e33a81fd31f2dc58 (patch) | |
tree | 66ebdaa538fc8355b71b97a7ad4ad2e368a6a813 /release | |
parent | 6e56db8ce26ce107a4123e21ba222fb897ba340c (diff) |
Minor polishing, add UV layer selection in image projection painting
mode.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index a483a097e8f..7ed928c8d5f 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -1005,6 +1005,17 @@ class TEXTURE_UL_texpaintslots(UIList): layout.alignment = 'CENTER' layout.label(text="") +class VIEW3D_MT_tools_projectpaint_uvlayer(Menu): + bl_label = "Clone Layer" + + def draw(self, context): + layout = self.layout + + for i, tex in enumerate(context.active_object.data.uv_textures): + props = layout.operator("wm.context_set_int", text=tex.name, translate=False) + props.data_path = "active_object.data.uv_textures.active_index" + props.value = i + class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): bl_context = "imagepaint" @@ -1058,7 +1069,12 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel): col.prop_search(slot, "uv_layer", ob.data, "uv_textures", text="") elif settings.mode == 'IMAGE': + mesh = ob.data + uv_text = mesh.uv_textures.active.name if mesh.uv_textures.active else "" + col.label("Image") col.template_ID(settings, "canvas") + col.label("UV Map") + col.menu("VIEW3D_MT_tools_projectpaint_uvlayer", text=uv_text, translate=False) col.separator() col.operator("image.save_dirty", text="Save All Images") |