[Bf-blender-cvs] [3d93eb4] master: Minor polishing, add UV layer selection in image projection painting mode.
Antony Riakiotakis
noreply at git.blender.org
Sun Sep 21 00:30:12 CEST 2014
Commit: 3d93eb47f3877375e8318e49e33a81fd31f2dc58
Author: Antony Riakiotakis
Date: Sun Sep 21 00:29:50 2014 +0200
Branches: master
https://developer.blender.org/rB3d93eb47f3877375e8318e49e33a81fd31f2dc58
Minor polishing, add UV layer selection in image projection painting
mode.
===================================================================
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index a483a09..7ed928c 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")
More information about the Bf-blender-cvs
mailing list