diff --git a/Fange Pipeline/__init__.py b/Fange Pipeline/__init__.py index 439eb92..adff14e 100644 --- a/Fange Pipeline/__init__.py +++ b/Fange Pipeline/__init__.py @@ -1,6 +1,7 @@ import bpy from .ui import GRAOU_PT_panel +from .operators.outline import ConfigBlendScene from .ops import ExportForFange, MakeBasicCollision from .preference import GRAOU_AddonPreference @@ -18,7 +19,7 @@ bl_info = { modules_class = [ # Main Property - ExportForFange, MakeBasicCollision, + ExportForFange, MakeBasicCollision, ConfigBlendScene, # UI GRAOU_PT_panel, # Preference diff --git a/Fange Pipeline/models.py b/Fange Pipeline/models.py index 2b4d7b0..972eaf6 100644 --- a/Fange Pipeline/models.py +++ b/Fange Pipeline/models.py @@ -4,6 +4,9 @@ from pathlib import Path class FangeProject: + """ + This object is a model to give all Unity project path. + """ def __init__(self): self._pref = bpy.context.preferences.addons[__name__.split(".")[0]].preferences @@ -26,3 +29,27 @@ class FangeProject: @property def characters(self): return self._project_path.joinpath(self._subdir_path, self._characters_path) + + +class Outline: + """ + Model about the Outline config. + """ + def __init__(self): + self._collections = { + 'Placeholder': ['COLOR_01'], + 'Icon': ['COLOR_04'], + 'Game Object': ['COLOR_05'] + } + + @property + def placeholder(self): + return 'Placeholder' + + @property + def icon(self): + return 'Icon' + + @property + def game(self): + return 'Game Object' diff --git a/Fange Pipeline/operators/outline.py b/Fange Pipeline/operators/outline.py new file mode 100644 index 0000000..7656c66 --- /dev/null +++ b/Fange Pipeline/operators/outline.py @@ -0,0 +1,16 @@ +import bpy + +from ..models import Outline + + +class ConfigBlendScene(bpy.types.Operator): + """Init the opened blend scene""" + bl_idname = 'graou.build_scene' + bl_label = 'Config or update the outline' + + def __init__(self): + self._outline = Outline() + + def execute(self, context): + print(f'[Pipeline] Generate outline') + return {'FINISHED'} diff --git a/Fange Pipeline/ops.py b/Fange Pipeline/ops.py index 4c229f4..df0e7f5 100644 --- a/Fange Pipeline/ops.py +++ b/Fange Pipeline/ops.py @@ -12,7 +12,6 @@ class ExportForFange(bpy.types.Operator): def __init__(self): self.coll_layout = bpy.data.collections.get('Placeholder') self.path = FangeProject() - self.fbx_preset = 'sm-unity-building' @classmethod def poll(cls, context): diff --git a/Fange Pipeline/ui.py b/Fange Pipeline/ui.py index 6b04955..a3d3d56 100644 --- a/Fange Pipeline/ui.py +++ b/Fange Pipeline/ui.py @@ -14,6 +14,9 @@ class GRAOU_PT_panel(bpy.types.Panel): layout.use_property_split = True layout.use_property_decorate = False + layout.label(text='Scene Setup', icon='WORLD_DATA') + layout.operator('graou.build_scene') + layout.label(text='Collision', icon='WORLD_DATA') layout.operator('graou.make_collision')