-
Notifications
You must be signed in to change notification settings - Fork 5
/
naming_preset.py
37 lines (32 loc) · 1.1 KB
/
naming_preset.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
from bl_operators.presets import AddPresetBase
from bpy.types import Operator
class COLLISION_preset(AddPresetBase, Operator):
'''Presets for collider creation'''
bl_idname = "collision.collision_name_preset"
bl_label = "Collision Naming Presets"
preset_menu = "OBJECT_MT_collision_presets"
# variable used for all preset values
preset_defines = [
"prefs = bpy.context.preferences.addons['collider_tools'].preferences"
]
# properties to store in the preset
preset_values = [
"prefs.naming_position",
"prefs.replace_name",
"prefs.obj_basename",
"prefs.separator",
"prefs.collision_string_prefix",
"prefs.collision_string_suffix",
"prefs.box_shape",
"prefs.sphere_shape",
"prefs.convex_shape",
"prefs.mesh_shape",
"prefs.collider_groups_enabled",
"prefs.user_group_01",
"prefs.user_group_02",
"prefs.user_group_03",
"prefs.physics_material_name",
"prefs.physics_material_filter",
]
# where to store the preset
preset_subdir = "collider_tools"