Refactor: Node Wrangler: PreviewNode operator
[blender-addons.git] / amaranth / prefs.py
blob00fdb7e03fd628bcac070e6e9e5810fd60de1437
1 # SPDX-FileCopyrightText: 2019-2023 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 import bpy
6 from bpy.props import (
7 BoolProperty,
8 IntProperty,
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",
17 default=True,
19 use_file_save_reload: BoolProperty(
20 name="Save & Reload File",
21 description="File menu > Save & Reload, or Ctrl + Shift + W",
22 default=True,
24 use_scene_refresh: BoolProperty(
25 name="Refresh Scene",
26 description="Specials Menu [W]",
27 default=True,
29 use_image_node_display: BoolProperty(
30 name="Active Image Node in Editor",
31 description="Display active node image in image editor",
32 default=True,
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)",
37 default=False,
39 frames_jump: IntProperty(
40 name="Frames",
41 description="Number of frames to jump forward/backward",
42 default=10,
43 min=1
45 use_framerate: BoolProperty(
46 name="Framerate Jump",
47 description="Jump the amount of frames forward/backward that you have set as your framerate",
48 default=False,
50 use_layers_for_render: BoolProperty(
51 name="Current Layers for Render",
52 description="Save the layers that should be enabled for render",
53 default=True,
56 def draw(self, context):
57 layout = self.layout
59 layout.label(
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)
65 col = split.column()
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")
71 sub.separator()
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")
79 sub.separator()
81 sub.label(text="Nodes Editor", icon="NODETREE")
82 sub.prop(self, "use_image_node_display")
84 col = split.column()
85 sub = col.column(align=True)
86 sub.label(text="")
87 sub.label(
88 text="Set the current frame from the Specials menu in the 3D View [W]")
89 sub.label(
90 text="Refresh the current Scene. Hotkey: F5 or in Specials menu [W]")
92 sub.separator()
93 sub.label(text="") # General icon
94 sub.label(
95 text="Quickly save and reload the current file (no warning!). "
96 "File menu or Ctrl+Shift+W")
97 sub.label(
98 text="Display extra stats for Scenes, Cameras, Meshlights (Cycles). Can be slow in heavy scenes")
99 sub.label(
100 text="Save the set of layers that should be activated for a final render")
101 sub.label(
102 text="Jump the amount of frames forward/backward that you've set as your framerate")
104 sub.separator()
105 sub.label(text="") # Nodes
106 sub.label(
107 text="When double-clicking an Image node, display it on the Image editor "
108 "(if any)")
111 def register():
112 bpy.utils.register_class(AmaranthToolsetPreferences)
115 def unregister():
116 bpy.utils.unregister_class(AmaranthToolsetPreferences)