1 # SPDX-FileCopyrightText: 2019-2023 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
6 from bpy
.props
import (
12 class AmaranthToolsetPreferences(bpy
.types
.AddonPreferences
):
13 bl_idname
= "amaranth"
14 use_frame_current
: BoolProperty(
15 name
="Current Frame Slider",
16 description
="Set the current frame from the Specials menu in the 3D View",
19 use_file_save_reload
: BoolProperty(
20 name
="Save & Reload File",
21 description
="File menu > Save & Reload, or Ctrl + Shift + W",
24 use_scene_refresh
: BoolProperty(
26 description
="Specials Menu [W]",
29 use_image_node_display
: BoolProperty(
30 name
="Active Image Node in Editor",
31 description
="Display active node image in image editor",
34 use_scene_stats
: BoolProperty(
35 name
="Extra Scene Statistics",
36 description
="Display extra scene statistics in the status bar (may be slow in heavy scenes)",
39 frames_jump
: IntProperty(
41 description
="Number of frames to jump forward/backward",
45 use_framerate
: BoolProperty(
46 name
="Framerate Jump",
47 description
="Jump the amount of frames forward/backward that you have set as your framerate",
50 use_layers_for_render
: BoolProperty(
51 name
="Current Layers for Render",
52 description
="Save the layers that should be enabled for render",
56 def draw(self
, context
):
60 text
="Here you can enable or disable specific tools, "
61 "in case they interfere with others or are just plain annoying")
63 split
= layout
.split(factor
=0.25)
66 sub
= col
.column(align
=True)
67 sub
.label(text
="3D View", icon
="VIEW3D")
68 sub
.prop(self
, "use_frame_current")
69 sub
.prop(self
, "use_scene_refresh")
73 sub
.label(text
="General", icon
="SCENE_DATA")
74 sub
.prop(self
, "use_file_save_reload")
75 sub
.prop(self
, "use_scene_stats")
76 sub
.prop(self
, "use_layers_for_render")
77 sub
.prop(self
, "use_framerate")
81 sub
.label(text
="Nodes Editor", icon
="NODETREE")
82 sub
.prop(self
, "use_image_node_display")
85 sub
= col
.column(align
=True)
88 text
="Set the current frame from the Specials menu in the 3D View [W]")
90 text
="Refresh the current Scene. Hotkey: F5 or in Specials menu [W]")
93 sub
.label(text
="") # General icon
95 text
="Quickly save and reload the current file (no warning!). "
96 "File menu or Ctrl+Shift+W")
98 text
="Display extra stats for Scenes, Cameras, Meshlights (Cycles). Can be slow in heavy scenes")
100 text
="Save the set of layers that should be activated for a final render")
102 text
="Jump the amount of frames forward/backward that you've set as your framerate")
105 sub
.label(text
="") # Nodes
107 text
="When double-clicking an Image node, display it on the Image editor "
112 bpy
.utils
.register_class(AmaranthToolsetPreferences
)
116 bpy
.utils
.unregister_class(AmaranthToolsetPreferences
)