mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Minor polishing, add UV layer selection in image projection painting
mode.
This commit is contained in:
parent
6e56db8ce2
commit
3d93eb47f3
1 changed files with 16 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue