-
Notifications
You must be signed in to change notification settings - Fork 27
/
prefs_behavior.py
38 lines (27 loc) · 1.04 KB
/
prefs_behavior.py
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
import bpy
from bpy.types import PropertyGroup
from bpy.props import *
class prefs(PropertyGroup):
alt_drawing: BoolProperty(
default=False, description='Alternate drawing shaders. Useful for Mac users')
individual_loops: BoolProperty(default=False)
rotate_gizmo_use: BoolProperty(default=True)
rotate_panel_use: BoolProperty(default=True)
def label_row(path, prop, row, label):
row.label(text=label)
row.prop(path, prop, text='')
def draw(preference, context, layout):
label_row(preference.behavior, 'alt_drawing',
layout.row(), 'Use Alternate Drawing')
label_row(preference.behavior, 'rotate_gizmo_use',
layout.row(), 'Use Rotation Gizmo')
label_row(preference.behavior, 'rotate_panel_use',
layout.row(), 'Use Rotation Panel')
label_row(preference.behavior, 'individual_loops',
layout.row(), 'Edit Split Individual Loops')
def register():
bpy.utils.register_class(prefs)
return
def unregister():
bpy.utils.unregister_class(prefs)
return