Make a class panel to easily draw each class

This commit is contained in:
2024-06-06 19:55:46 +02:00
parent cd8301e29c
commit 83d321c69d
6 changed files with 43 additions and 54 deletions
+2 -34
View File
@@ -1,45 +1,13 @@
import bpy
# import os
# from pathlib import Path
#
# preview_collection = {}
# icon_sauropod_path = Path(os.path.dirname(os.path.abspath(__file__)), "icons")
#
# pcoll = bpy.utils.previews.new()
#
# for entry in os.scandir(icon_sauropod_path):
# if entry.name.endswith(".png"):
# name = os.path.splitext(entry.name)[0]
# print(f'[Pipeline] Add icon "{name}"')
# pcoll.load(name.upper(), entry.path, "IMAGE")
from .main import GraouPanel
class GRAOU_PT_export(bpy.types.Panel):
class GRAOU_PT_export(GraouPanel):
bl_idname = 'GRAOU_PT_MAIN'
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
bl_label = 'Export'
bl_category = 'Graou Studio'
def draw(self, context):
layout = self.layout
# layout.label(text='Graou Pipeline', icon_value=pcoll["GRAOU"].icon_id)
col = layout.column(align=True)
col.label(text='Main Config:')
col.operator('graou.build_scene', text='Init Scene', icon='OUTLINER')
col.prop(context.scene.graou_props, 'socket_collection', text='Use socket', toggle=True)
col.operator('graou.lighting', text='Set basic lighting', icon='OUTLINER_OB_LIGHT')
layout.separator()
layout.label(text='Asset:')
layout.operator('graou.make_collision', text='Generate collision', icon='MOD_PHYSICS')
layout.separator()
layout.label(text='Export scene:')
box = layout.box()
box.label(text='Sanity Check')