-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
preferences.py
50 lines (40 loc) · 1.72 KB
/
preferences.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
# This module contains user preferences for this add-on.
import bpy
from bpy.types import AddonPreferences
from bpy.props import StringProperty, BoolProperty, EnumProperty, FloatProperty
ADDON_NAME = __package__
EXPORTING_TEMPLATE = [
("FBX", "fbx", "Exports selected objects as fbx files", '', 0),
("OBJ", "obj", "Exports selected objects as obj files", '', 0),
("UNITY_FBX", "Unity (fbx)", "Exports selected objects as fbx files specifically for the Unity game engine", '', 1),
]
class AddonPreferences(AddonPreferences):
bl_idname = ADDON_NAME
save_imported_textures: BoolProperty(
name="Save Imported Textures",
default=True,
description="Saves all imported textures to the 'Layers' folder. This helps provided a constant external folder for saving images used in layers which helps keep your files consistent"
)
organize_modifiers: BoolProperty(
name="Organize Modifiers",
default=True,
description="When true, editing the modifier stack in any way triggers organization of the modifier stack"
)
hide_booleans: BoolProperty(
name="Hide Booleans",
default=True,
description="Hides booleans in the modifier stack"
)
export_template: EnumProperty(
items=EXPORTING_TEMPLATE,
default='FBX',
name="Exporting Template"
)
export_selected_objects_individually: BoolProperty(
name="Export Selected Objects Individually",
default=False,
description="If true, all selected objects will be exported as individual files when using the export button in this add-on"
)
def draw(self, context):
layout = self.layout
#layout.prop(self, "auto_delete_unused_images")