1 # SPDX-License-Identifier: GPL-2.0-or-later
4 from bpy
.props
import (
10 class AmaranthToolsetPreferences(bpy
.types
.AddonPreferences
):
11 bl_idname
= "amaranth"
12 use_frame_current
: BoolProperty(
13 name
="Current Frame Slider",
14 description
="Set the current frame from the Specials menu in the 3D View",
17 use_file_save_reload
: BoolProperty(
18 name
="Save & Reload File",
19 description
="File menu > Save & Reload, or Ctrl + Shift + W",
22 use_scene_refresh
: BoolProperty(
24 description
="Specials Menu [W]",
27 use_image_node_display
: BoolProperty(
28 name
="Active Image Node in Editor",
29 description
="Display active node image in image editor",
32 use_scene_stats
: BoolProperty(
33 name
="Extra Scene Statistics",
34 description
="Display extra scene statistics in the status bar (may be slow in heavy scenes)",
37 frames_jump
: IntProperty(
39 description
="Number of frames to jump forward/backward",
43 use_framerate
: BoolProperty(
44 name
="Framerate Jump",
45 description
="Jump the amount of frames forward/backward that you have set as your framerate",
48 use_layers_for_render
: BoolProperty(
49 name
="Current Layers for Render",
50 description
="Save the layers that should be enabled for render",
54 def draw(self
, context
):
58 text
="Here you can enable or disable specific tools, "
59 "in case they interfere with others or are just plain annoying")
61 split
= layout
.split(factor
=0.25)
64 sub
= col
.column(align
=True)
65 sub
.label(text
="3D View", icon
="VIEW3D")
66 sub
.prop(self
, "use_frame_current")
67 sub
.prop(self
, "use_scene_refresh")
71 sub
.label(text
="General", icon
="SCENE_DATA")
72 sub
.prop(self
, "use_file_save_reload")
73 sub
.prop(self
, "use_scene_stats")
74 sub
.prop(self
, "use_layers_for_render")
75 sub
.prop(self
, "use_framerate")
79 sub
.label(text
="Nodes Editor", icon
="NODETREE")
80 sub
.prop(self
, "use_image_node_display")
83 sub
= col
.column(align
=True)
86 text
="Set the current frame from the Specials menu in the 3D View [W]")
88 text
="Refresh the current Scene. Hotkey: F5 or in Specials menu [W]")
91 sub
.label(text
="") # General icon
93 text
="Quickly save and reload the current file (no warning!). "
94 "File menu or Ctrl+Shift+W")
96 text
="Display extra stats for Scenes, Cameras, Meshlights (Cycles). Can be slow in heavy scenes")
98 text
="Save the set of layers that should be activated for a final render")
100 text
="Jump the amount of frames forward/backward that you've set as your framerate")
103 sub
.label(text
="") # Nodes
105 text
="When double-clicking an Image node, display it on the Image editor "
110 bpy
.utils
.register_class(AmaranthToolsetPreferences
)
114 bpy
.utils
.unregister_class(AmaranthToolsetPreferences
)