Godot_bridge/addon/preferences/preferences.py

51 lines
1.1 KiB
Python
Raw Permalink Normal View History

2023-03-29 10:43:53 +00:00
import bpy
from bpy.props import StringProperty, IntProperty, BoolProperty
from ..common import addon
2024-05-18 11:09:47 +00:00
class GB_Prefs(bpy.types.AddonPreferences):
2023-03-29 10:43:53 +00:00
bl_idname = addon.addon_name
# TODO EnumProperty to get list of projects to choose from
2024-05-18 11:09:47 +00:00
default_godot_project_path: StringProperty(
2023-03-29 10:43:53 +00:00
name="Godot project path",
subtype='DIR_PATH',
default="//godot_project/"
)
2024-05-18 11:09:47 +00:00
default_blender_repository_path: StringProperty(
2023-03-29 10:43:53 +00:00
name="Blender repository root",
subtype='DIR_PATH',
default="//"
)
2024-05-18 11:09:47 +00:00
default_root_collection: StringProperty(
2023-03-29 10:43:53 +00:00
name="Root collection",
default="khanat",
)
2024-05-18 11:09:47 +00:00
default_licence: StringProperty(
2023-03-29 10:43:53 +00:00
name="Licence",
default="CC BY SA Khaganat",
)
2024-05-18 11:09:47 +00:00
default_contributor: StringProperty(
2023-03-29 10:43:53 +00:00
name="Contributor",
default="",
)
def draw(self, context):
layout = self.layout
box = layout.box()
2024-05-18 11:09:47 +00:00
box.prop(self, "default_godot_project_path")
box.prop(self, "default_blender_repository_path")
box.prop(self, "default_root_collection")
2023-03-29 10:43:53 +00:00
layout.split()
box = layout.box()
2024-05-18 11:09:47 +00:00
box.prop(self, "default_licence")
box.prop(self, "default_contributor")
2023-03-29 10:43:53 +00:00