-
Notifications
You must be signed in to change notification settings - Fork 32
/
presets.py
67 lines (50 loc) · 2.31 KB
/
presets.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from bpy.types import Menu, Operator
from bl_operators.presets import AddPresetBase
PRESET_BAKELIST_SUBDIR = "principled_baker/bake_list"
PRESET_SUFFIXLIST_SUBDIR = "principled_baker/suffix_list"
PRESET_COMBINELIST_SUBDIR = "principled_baker/combine_list"
# --------------------------------------------------------
# Bake List Presets
# --------------------------------------------------------
class PBAKER_MT_display_presets(Menu):
bl_label = "Bake List Presets"
preset_subdir = PRESET_BAKELIST_SUBDIR
preset_operator = "script.execute_preset"
draw = Menu.draw_preset
class PBAKER_AddPresetObjectDisplay(AddPresetBase, Operator):
bl_idname = "principled_baker.preset_add"
bl_label = "Add Bake List Preset"
preset_menu = "PBAKER_MT_display_presets"
preset_defines = ["scene = bpy.context.scene"]
preset_values = ["scene.principled_baker_bakelist"]
preset_subdir = PRESET_BAKELIST_SUBDIR
# --------------------------------------------------------
# Suffix Presets
# --------------------------------------------------------
class PBAKER_MT_display_suffix_presets(Menu):
bl_label = "Bake List Presets"
preset_subdir = PRESET_SUFFIXLIST_SUBDIR
preset_operator = "script.execute_preset"
draw = Menu.draw_preset
class PBAKER_AddSuffixPresetObjectDisplay(AddPresetBase, Operator):
bl_idname = "principled_baker.suffix_preset_add"
bl_label = "Add Suffix List Preset"
preset_menu = "PBAKER_MT_display_suffix_presets"
preset_defines = ["scene = bpy.context.scene"]
preset_values = ["scene.principled_baker_suffixlist"]
preset_subdir = PRESET_SUFFIXLIST_SUBDIR
# --------------------------------------------------------
# Combine Presets
# --------------------------------------------------------
class PBAKER_MT_display_combine_presets(Menu):
bl_label = "Combine List Presets"
preset_subdir = PRESET_COMBINELIST_SUBDIR
preset_operator = "script.execute_preset"
draw = Menu.draw_preset
class PBAKER_AddCombinePresetObjectDisplay(AddPresetBase, Operator):
bl_idname = "principled_baker.combine_preset_add"
bl_label = "Add Combine List Preset"
preset_menu = "PBAKER_MT_display_combine_presets"
preset_defines = ["scene = bpy.context.scene"]
preset_values = ["scene.principled_baker_combinelist"]
preset_subdir = PRESET_COMBINELIST_SUBDIR