Welcome to mirror list, hosted at ThFree Co, Russian Federation.

properites.py « uv_magic_uv - git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e4634e5139932ef792c86b08adf9a72d6e4b253a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# <pep8-80 compliant>

# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

__author__ = "Nutti <nutti.metro@gmail.com>"
__status__ = "production"
__version__ = "5.2"
__date__ = "17 Nov 2018"


from .op import (
    align_uv,
    align_uv_cursor,
    copy_paste_uv,
    copy_paste_uv_object,
    copy_paste_uv_uvedit,
    flip_rotate_uv,
    mirror_uv,
    move_uv,
    pack_uv,
    preserve_uv_aspect,
    select_uv,
    smooth_uv,
    texture_lock,
    texture_projection,
    texture_wrap,
    transfer_uv,
    unwrap_constraint,
    uv_bounding_box,
    uv_inspection,
    uv_sculpt,
    uvw,
    world_scale_uv,
)


__all__ = [
    'MUV_Properties',
    'init_props',
    'clear_props',
]


# Properties used in this add-on.
# pylint: disable=W0612
class MUV_Properties():
    def __init__(self):
        self.prefs = MUV_Prefs()


class MUV_Prefs():
    expanded = {
        "info_desc": False,
        "info_loc": False,
        "conf_uvsculpt": False,
        "conf_uvinsp": False,
        "conf_texproj": False,
        "conf_uvbb": False
    }


def init_props(scene):
    scene.muv_props = MUV_Properties()

    align_uv.Properties.init_props(scene)
    align_uv_cursor.Properties.init_props(scene)
    copy_paste_uv.Properties.init_props(scene)
    copy_paste_uv_object.Properties.init_props(scene)
    copy_paste_uv_uvedit.Properties.init_props(scene)
    flip_rotate_uv.Properties.init_props(scene)
    mirror_uv.Properties.init_props(scene)
    move_uv.Properties.init_props(scene)
    pack_uv.Properties.init_props(scene)
    preserve_uv_aspect.Properties.init_props(scene)
    select_uv.Properties.init_props(scene)
    smooth_uv.Properties.init_props(scene)
    texture_lock.Properties.init_props(scene)
    texture_projection.Properties.init_props(scene)
    texture_wrap.Properties.init_props(scene)
    transfer_uv.Properties.init_props(scene)
    unwrap_constraint.Properties.init_props(scene)
    uv_bounding_box.Properties.init_props(scene)
    uv_inspection.Properties.init_props(scene)
    uv_sculpt.Properties.init_props(scene)
    uvw.Properties.init_props(scene)
    world_scale_uv.Properties.init_props(scene)


def clear_props(scene):
    align_uv.Properties.del_props(scene)
    align_uv_cursor.Properties.del_props(scene)
    copy_paste_uv.Properties.del_props(scene)
    copy_paste_uv_object.Properties.del_props(scene)
    copy_paste_uv_uvedit.Properties.del_props(scene)
    flip_rotate_uv.Properties.del_props(scene)
    mirror_uv.Properties.del_props(scene)
    move_uv.Properties.del_props(scene)
    pack_uv.Properties.del_props(scene)
    preserve_uv_aspect.Properties.del_props(scene)
    select_uv.Properties.del_props(scene)
    smooth_uv.Properties.del_props(scene)
    texture_lock.Properties.del_props(scene)
    texture_projection.Properties.del_props(scene)
    texture_wrap.Properties.del_props(scene)
    transfer_uv.Properties.del_props(scene)
    unwrap_constraint.Properties.del_props(scene)
    uv_bounding_box.Properties.del_props(scene)
    uv_inspection.Properties.del_props(scene)
    uv_sculpt.Properties.del_props(scene)
    uvw.Properties.del_props(scene)
    world_scale_uv.Properties.del_props(scene)

    del scene.muv_props