3 # ##### BEGIN GPL LICENSE BLOCK #####
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License
7 # as published by the Free Software Foundation; either version 2
8 # of the License, or (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 # ##### END GPL LICENSE BLOCK #####
21 __author__
= "Nutti <nutti.metro@gmail.com>"
22 __status__
= "production"
24 __date__
= "24 Feb 2018"
26 from bpy
.props
import (
30 from bpy
.types
import AddonPreferences
33 class MUV_Preferences(AddonPreferences
):
34 """Preferences class: Preferences for this add-on"""
36 bl_idname
= __package__
39 uvsculpt_brush_color
= FloatVectorProperty(
42 default
=(1.0, 0.4, 0.4, 1.0),
50 uvinsp_overlapped_color
= FloatVectorProperty(
53 default
=(0.0, 0.0, 1.0, 0.3),
61 uvinsp_flipped_color
= FloatVectorProperty(
64 default
=(1.0, 0.0, 0.0, 0.3),
71 # for Texture Projection
72 texproj_canvas_padding
= FloatVectorProperty(
73 name
="Canvas Padding",
74 description
="Canvas Padding",
81 uvbb_cp_size
= FloatProperty(
83 description
="Control Point Size",
87 uvbb_cp_react_size
= FloatProperty(
89 description
="Size event fired",
97 layout
.label("[Configuration]")
99 layout
.label("UV Sculpt:")
100 sp
= layout
.split(percentage
=0.05)
101 col
= sp
.column() # spacer
102 sp
= sp
.split(percentage
=0.3)
104 col
.label("Brush Color:")
105 col
.prop(self
, "uvsculpt_brush_color", text
="")
109 layout
.label("UV Inspection:")
110 sp
= layout
.split(percentage
=0.05)
111 col
= sp
.column() # spacer
112 sp
= sp
.split(percentage
=0.3)
114 col
.label("Overlapped UV Color:")
115 col
.prop(self
, "uvinsp_overlapped_color", text
="")
116 sp
= sp
.split(percentage
=0.45)
118 col
.label("Flipped UV Color:")
119 col
.prop(self
, "uvinsp_flipped_color", text
="")
123 layout
.label("Texture Projection:")
124 sp
= layout
.split(percentage
=0.05)
125 col
= sp
.column() # spacer
126 sp
= sp
.split(percentage
=0.3)
128 col
.prop(self
, "texproj_canvas_padding")
132 layout
.label("UV Bounding Box:")
133 sp
= layout
.split(percentage
=0.05)
134 col
= sp
.column() # spacer
135 sp
= sp
.split(percentage
=0.3)
137 col
.label("Control Point:")
138 col
.prop(self
, "uvbb_cp_size")
139 col
.prop(self
, "uvbb_cp_react_size")
141 layout
.label("--------------------------------------")
143 layout
.label("[Description]")
144 column
= layout
.column(align
=True)
145 column
.label("Magic UV is composed of many UV editing features.")
146 column
.label("See tutorial page if you are new to this add-on.")
147 column
.label("https://github.com/nutti/Magic-UV/wiki/Tutorial")
149 layout
.label("--------------------------------------")
151 layout
.label("[Location]")
153 row
= layout
.row(align
=True)
154 sp
= row
.split(percentage
=0.5)
155 sp
.label("3D View > Tool shelf > Copy/Paste UV (Object mode)")
156 sp
= sp
.split(percentage
=1.0)
157 col
= sp
.column(align
=True)
158 col
.label("Copy/Paste UV (Among objects)")
160 row
= layout
.row(align
=True)
161 sp
= row
.split(percentage
=0.5)
162 sp
.label("3D View > Tool shelf > Copy/Paste UV (Edit mode)")
163 sp
= sp
.split(percentage
=1.0)
164 col
= sp
.column(align
=True)
165 col
.label("Copy/Paste UV (Among faces in 3D View)")
166 col
.label("Transfer UV")
168 row
= layout
.row(align
=True)
169 sp
= row
.split(percentage
=0.5)
170 sp
.label("3D View > Tool shelf > UV Manipulation (Edit mode)")
171 sp
= sp
.split(percentage
=1.0)
172 col
= sp
.column(align
=True)
173 col
.label("Flip/Rotate UV")
174 col
.label("Mirror UV")
176 col
.label("World Scale UV")
177 col
.label("Preserve UV Aspect")
178 col
.label("Texture Lock")
179 col
.label("Texture Wrap")
180 col
.label("UV Sculpt")
182 row
= layout
.row(align
=True)
183 sp
= row
.split(percentage
=0.5)
184 sp
.label("3D View > Tool shelf > UV Manipulation (Edit mode)")
185 sp
= sp
.split(percentage
=1.0)
186 col
= sp
.column(align
=True)
187 col
.label("Unwrap Constraint")
188 col
.label("Texture Projection")
191 row
= layout
.row(align
=True)
192 sp
= row
.split(percentage
=0.5)
193 sp
.label("UV/Image Editor > Tool shelf > Copy/Paste UV")
194 sp
= sp
.split(percentage
=1.0)
195 col
= sp
.column(align
=True)
196 col
.label("Copy/Paste UV (Among faces in UV/Image Editor)")
198 row
= layout
.row(align
=True)
199 sp
= row
.split(percentage
=0.5)
200 sp
.label("UV/Image Editor > Tool shelf > UV Manipulation")
201 sp
= sp
.split(percentage
=1.0)
202 col
= sp
.column(align
=True)
203 col
.label("Align UV")
204 col
.label("Smooth UV")
205 col
.label("Select UV")
206 col
.label("Pack UV (Extension)")
208 row
= layout
.row(align
=True)
209 sp
= row
.split(percentage
=0.5)
210 sp
.label("UV/Image Editor > Tool shelf > Editor Enhancement")
211 sp
= sp
.split(percentage
=1.0)
212 col
= sp
.column(align
=True)
213 col
.label("Align UV Cursor")
214 col
.label("UV Cursor Location")
215 col
.label("UV Bounding Box")
216 col
.label("UV Inspection")