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_timeline_extra_info
: BoolProperty(
28 name
="Timeline Extra Info",
29 description
="Timeline Header",
32 use_image_node_display
: BoolProperty(
33 name
="Active Image Node in Editor",
34 description
="Display active node image in image editor",
37 use_scene_stats
: BoolProperty(
38 name
="Extra Scene Statistics",
39 description
="Display extra scene statistics in the status bar (may be slow in heavy scenes)",
42 frames_jump
: IntProperty(
44 description
="Number of frames to jump forward/backward",
48 use_framerate
: BoolProperty(
49 name
="Framerate Jump",
50 description
="Jump the amount of frames forward/backward that you have set as your framerate",
53 use_layers_for_render
: BoolProperty(
54 name
="Current Layers for Render",
55 description
="Save the layers that should be enabled for render",
59 def draw(self
, context
):
63 text
="Here you can enable or disable specific tools, "
64 "in case they interfere with others or are just plain annoying")
66 split
= layout
.split(factor
=0.25)
69 sub
= col
.column(align
=True)
70 sub
.label(text
="3D View", icon
="VIEW3D")
71 sub
.prop(self
, "use_frame_current")
72 sub
.prop(self
, "use_scene_refresh")
76 sub
.label(text
="General", icon
="SCENE_DATA")
77 sub
.prop(self
, "use_file_save_reload")
78 sub
.prop(self
, "use_timeline_extra_info")
79 sub
.prop(self
, "use_scene_stats")
80 sub
.prop(self
, "use_layers_for_render")
81 sub
.prop(self
, "use_framerate")
85 sub
.label(text
="Nodes Editor", icon
="NODETREE")
86 sub
.prop(self
, "use_image_node_display")
89 sub
= col
.column(align
=True)
92 text
="Set the current frame from the Specials menu in the 3D View [W]")
94 text
="Refresh the current Scene. Hotkey: F5 or in Specials menu [W]")
97 sub
.label(text
="") # General icon
99 text
="Quickly save and reload the current file (no warning!). "
100 "File menu or Ctrl+Shift+W")
102 text
="SMPTE Timecode and frames left/ahead on Timeline's header")
104 text
="Display extra stats for Scenes, Cameras, Meshlights (Cycles). Can be slow in heavy scenes")
106 text
="Save the set of layers that should be activated for a final render")
108 text
="Jump the amount of frames forward/backward that you've set as your framerate")
111 sub
.label(text
="") # Nodes
113 text
="When double-clicking an Image node, display it on the Image editor "
118 bpy
.utils
.register_class(AmaranthToolsetPreferences
)
122 bpy
.utils
.unregister_class(AmaranthToolsetPreferences
)