1 # SPDX-License-Identifier: GPL-2.0-or-later
3 __author__
= "Nutti <nutti.metro@gmail.com>"
4 __status__
= "production"
6 __date__
= "22 Apr 2022"
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
21 @compat.ChangeRegionType(region_type
='TOOLS')
22 class MUV_PT_UVEdit_CopyPasteUV(bpy
.types
.Panel
):
24 Panel class: Copy/Paste UV on Property Panel on UV/ImageEditor
27 bl_space_type
= 'IMAGE_EDITOR'
29 bl_label
= "Copy/Paste UV"
30 bl_category
= "Magic UV"
31 bl_options
= {'DEFAULT_CLOSED'}
33 def draw_header(self
, _
):
35 layout
.label(text
="", icon
=compat
.icon('IMAGE'))
37 def draw(self
, context
):
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")
48 layout
.label(text
="Island:")
49 row
= layout
.row(align
=True)
50 row
.operator(MUV_OT_CopyPasteUVUVEdit_CopyUVIsland
.bl_idname
,
52 ops
= row
.operator(MUV_OT_CopyPasteUVUVEdit_PasteUVIsland
.bl_idname
,
54 ops
.unique_target
= sc
.muv_copy_paste_uv_uvedit_unique_target
55 layout
.prop(sc
, "muv_copy_paste_uv_uvedit_unique_target")