generated from stilobique/BlenderTemplate
40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
import bpy
|
|
import os
|
|
|
|
# from pathlib import Path
|
|
# icon_sauropod_path = Path(os.path.dirname(os.path.abspath(__file__)), "icons", "sauropode.png")
|
|
# print(f'[Pipeline] Get the icon sauropods {icon_sauropod_path}')
|
|
#
|
|
# if icon_sauropod_path.exists():
|
|
# print(f'[Pipeline] Icon find')
|
|
# icon_sauropod = bpy.app.icons.new_triangles_from_file(icon_sauropod_path.as_posix())
|
|
# # icon_sauropod_id = bpy.app.icons.release(icon_sauropod)
|
|
|
|
|
|
class GRAOU_PT_panel(bpy.types.Panel):
|
|
bl_idname = 'GRAOU_PT_MAIN'
|
|
bl_space_type = 'VIEW_3D'
|
|
bl_region_type = 'UI'
|
|
bl_label = 'Pipeline'
|
|
bl_category = 'Graou Studio'
|
|
|
|
def draw(self, context):
|
|
layout = self.layout
|
|
|
|
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)
|
|
|
|
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')
|
|
layout.operator('graou.building_export', text='Export Placeholder', icon='EXPORT')
|