Fix: Node Wrangler: new reroutes offset when output hidden
[blender-addons.git] / magic_uv / ui / uvedit_copy_paste_uv.py
blob2c2c85751f61de45ec60226c1d1c2c1318fc0972
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 __author__ = "Nutti <nutti.metro@gmail.com>"
4 __status__ = "production"
5 __version__ = "6.6"
6 __date__ = "22 Apr 2022"
8 import bpy
10 from ..op.copy_paste_uv_uvedit import (
11 MUV_OT_CopyPasteUVUVEdit_CopyUV,
12 MUV_OT_CopyPasteUVUVEdit_PasteUV,
13 MUV_OT_CopyPasteUVUVEdit_CopyUVIsland,
14 MUV_OT_CopyPasteUVUVEdit_PasteUVIsland,
16 from ..utils.bl_class_registry import BlClassRegistry
17 from ..utils import compatibility as compat
20 @BlClassRegistry()
21 @compat.ChangeRegionType(region_type='TOOLS')
22 class MUV_PT_UVEdit_CopyPasteUV(bpy.types.Panel):
23 """
24 Panel class: Copy/Paste UV on Property Panel on UV/ImageEditor
25 """
27 bl_space_type = 'IMAGE_EDITOR'
28 bl_region_type = 'UI'
29 bl_label = "Copy/Paste UV"
30 bl_category = "Magic UV"
31 bl_options = {'DEFAULT_CLOSED'}
33 def draw_header(self, _):
34 layout = self.layout
35 layout.label(text="", icon=compat.icon('IMAGE'))
37 def draw(self, context):
38 layout = self.layout
39 sc = context.scene
41 layout.label(text="Face:")
42 row = layout.row(align=True)
43 row.operator(MUV_OT_CopyPasteUVUVEdit_CopyUV.bl_idname, text="Copy")
44 row.operator(MUV_OT_CopyPasteUVUVEdit_PasteUV.bl_idname, text="Paste")
46 layout.separator()
48 layout.label(text="Island:")
49 row = layout.row(align=True)
50 row.operator(MUV_OT_CopyPasteUVUVEdit_CopyUVIsland.bl_idname,
51 text="Copy")
52 ops = row.operator(MUV_OT_CopyPasteUVUVEdit_PasteUVIsland.bl_idname,
53 text="Paste")
54 ops.unique_target = sc.muv_copy_paste_uv_uvedit_unique_target
55 layout.prop(sc, "muv_copy_paste_uv_uvedit_unique_target")