Godot_bridge/addon/preferences/preferences.py
2023-03-29 12:43:53 +02:00

50 lines
1,002 B
Python

import bpy
from bpy.props import StringProperty, IntProperty, BoolProperty
from ..common import addon
class KH_Prefs(bpy.types.AddonPreferences):
bl_idname = addon.addon_name
# TODO EnumProperty to get list of projects to choose from
godot_project_path: StringProperty(
name="Godot project path",
subtype='DIR_PATH',
default="//godot_project/"
)
blender_repository_path: StringProperty(
name="Blender repository root",
subtype='DIR_PATH',
default="//"
)
root_collection: StringProperty(
name="Root collection",
default="khanat",
)
licence: StringProperty(
name="Licence",
default="CC BY SA Khaganat",
)
contributor: StringProperty(
name="Contributor",
default="",
)
def draw(self, context):
layout = self.layout
box = layout.box()
box.prop(self, "godot_project_path")
box.prop(self, "blender_repository_path")
box.prop(self, "root_collection")
layout.split()
box = layout.box()
box.prop(self, "licence")
box.prop(self, "contributor")