io_scene_gltf2: quiet error running when context.space is None
[blender-addons.git] / amaranth / prefs.py
blob41a41f6bc337175a663d7b6bbd32e6918359f010
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 import bpy
4 from bpy.props import (
5 BoolProperty,
6 IntProperty,
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",
15 default=True,
17 use_file_save_reload: BoolProperty(
18 name="Save & Reload File",
19 description="File menu > Save & Reload, or Ctrl + Shift + W",
20 default=True,
22 use_scene_refresh: BoolProperty(
23 name="Refresh Scene",
24 description="Specials Menu [W]",
25 default=True,
27 use_image_node_display: BoolProperty(
28 name="Active Image Node in Editor",
29 description="Display active node image in image editor",
30 default=True,
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)",
35 default=False,
37 frames_jump: IntProperty(
38 name="Frames",
39 description="Number of frames to jump forward/backward",
40 default=10,
41 min=1
43 use_framerate: BoolProperty(
44 name="Framerate Jump",
45 description="Jump the amount of frames forward/backward that you have set as your framerate",
46 default=False,
48 use_layers_for_render: BoolProperty(
49 name="Current Layers for Render",
50 description="Save the layers that should be enabled for render",
51 default=True,
54 def draw(self, context):
55 layout = self.layout
57 layout.label(
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)
63 col = split.column()
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")
69 sub.separator()
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")
77 sub.separator()
79 sub.label(text="Nodes Editor", icon="NODETREE")
80 sub.prop(self, "use_image_node_display")
82 col = split.column()
83 sub = col.column(align=True)
84 sub.label(text="")
85 sub.label(
86 text="Set the current frame from the Specials menu in the 3D View [W]")
87 sub.label(
88 text="Refresh the current Scene. Hotkey: F5 or in Specials menu [W]")
90 sub.separator()
91 sub.label(text="") # General icon
92 sub.label(
93 text="Quickly save and reload the current file (no warning!). "
94 "File menu or Ctrl+Shift+W")
95 sub.label(
96 text="Display extra stats for Scenes, Cameras, Meshlights (Cycles). Can be slow in heavy scenes")
97 sub.label(
98 text="Save the set of layers that should be activated for a final render")
99 sub.label(
100 text="Jump the amount of frames forward/backward that you've set as your framerate")
102 sub.separator()
103 sub.label(text="") # Nodes
104 sub.label(
105 text="When double-clicking an Image node, display it on the Image editor "
106 "(if any)")
109 def register():
110 bpy.utils.register_class(AmaranthToolsetPreferences)
113 def unregister():
114 bpy.utils.unregister_class(AmaranthToolsetPreferences)