-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpreferences.py
More file actions
48 lines (34 loc) · 1.33 KB
/
preferences.py
File metadata and controls
48 lines (34 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"""
Pivotier Preferences - Addon preferences panel.
This module provides the addon preferences panel, which displays
registered keyboard shortcuts for quick reference.
"""
import bpy
class PivotierPreferences(bpy.types.AddonPreferences):
"""Preferences for the Pivotier addon"""
bl_idname = __package__
def draw(self, context):
layout = self.layout
box = layout.box()
box.label(text="Keyboard Shortcuts:", icon='KEYINGSET')
col = box.column(align=True)
col.label(text="Alt + Shift + C \u2192 Align Cursor to Normal (Edit Mode)")
col.label(text="Alt + Shift + A \u2192 Align Object to Cursor (Object Mode)")
col.label(text="Alt + Shift + B \u2192 Set Pivot to Base (Object Mode)")
col.label(text="Alt + Shift + P \u2192 Set Pivot to Cursor (Object Mode)")
col.label(text="Alt + Shift + O \u2192 Cursor to Active Object (Object Mode)")
layout.separator()
layout.label(
text="Shortcuts can be changed in Edit > Preferences > Keymap > Add-on",
icon='INFO'
)
# Registration
classes = (
PivotierPreferences,
)
def register():
for cls in classes:
bpy.utils.register_class(cls)
def unregister():
for cls in reversed(classes):
bpy.utils.unregister_class(cls)