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

prefs.py « amaranth - git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3c27c12d40fcc253161e05fc5bcd595709af82b9 (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
130
131
132
133
134
#  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.

import bpy
from bpy.props import (
        BoolProperty,
        IntProperty,
        )


class AmaranthToolsetPreferences(bpy.types.AddonPreferences):
    bl_idname = "amaranth"
    use_frame_current: BoolProperty(
        name="Current Frame Slider",
        description="Set the current frame from the Specials menu in the 3D View",
        default=True,
    )
    use_file_save_reload: BoolProperty(
        name="Save & Reload File",
        description="File menu > Save & Reload, or Ctrl + Shift + W",
        default=True,
    )
    use_scene_refresh: BoolProperty(
        name="Refresh Scene",
        description="Specials Menu [W]",
        default=True,
    )
    use_timeline_extra_info: BoolProperty(
        name="Timeline Extra Info",
        description="Timeline Header",
        default=True,
    )
    use_image_node_display: BoolProperty(
        name="Active Image Node in Editor",
        description="Display active node image in image editor",
        default=True,
    )
    use_scene_stats: BoolProperty(
        name="Extra Scene Statistics",
        description="Display extra scene statistics in the status bar (may be slow in heavy scenes)",
        default=False,
    )
    frames_jump: IntProperty(
        name="Frames",
        description="Number of frames to jump forward/backward",
        default=10,
        min=1
    )
    use_framerate: BoolProperty(
        name="Framerate Jump",
        description="Jump the amount of frames forward/backward that you have set as your framerate",
        default=False,
    )
    use_layers_for_render: BoolProperty(
        name="Current Layers for Render",
        description="Save the layers that should be enabled for render",
        default=True,
    )

    def draw(self, context):
        layout = self.layout

        layout.label(
            text="Here you can enable or disable specific tools, "
                 "in case they interfere with others or are just plain annoying")

        split = layout.split(factor=0.25)

        col = split.column()
        sub = col.column(align=True)
        sub.label(text="3D View", icon="VIEW3D")
        sub.prop(self, "use_frame_current")
        sub.prop(self, "use_scene_refresh")

        sub.separator()

        sub.label(text="General", icon="SCENE_DATA")
        sub.prop(self, "use_file_save_reload")
        sub.prop(self, "use_timeline_extra_info")
        sub.prop(self, "use_scene_stats")
        sub.prop(self, "use_layers_for_render")
        sub.prop(self, "use_framerate")

        sub.separator()

        sub.label(text="Nodes Editor", icon="NODETREE")
        sub.prop(self, "use_image_node_display")

        col = split.column()
        sub = col.column(align=True)
        sub.label(text="")
        sub.label(
            text="Set the current frame from the Specials menu in the 3D View [W]")
        sub.label(
            text="Refresh the current Scene. Hotkey: F5 or in Specials menu [W]")

        sub.separator()
        sub.label(text="")  # General icon
        sub.label(
            text="Quickly save and reload the current file (no warning!). "
                 "File menu or Ctrl+Shift+W")
        sub.label(
            text="SMPTE Timecode and frames left/ahead on Timeline's header")
        sub.label(
            text="Display extra stats for Scenes, Cameras, Meshlights (Cycles). Can be slow in heavy scenes")
        sub.label(
            text="Save the set of layers that should be activated for a final render")
        sub.label(
            text="Jump the amount of frames forward/backward that you've set as your framerate")

        sub.separator()
        sub.label(text="")  # Nodes
        sub.label(
            text="When double-clicking an Image node, display it on the Image editor "
                 "(if any)")


def register():
    bpy.utils.register_class(AmaranthToolsetPreferences)


def unregister():
    bpy.utils.unregister_class(AmaranthToolsetPreferences)