Add icon test, not enable

This commit is contained in:
2024-05-16 22:31:59 +02:00
parent 9cbe89e4b8
commit ebbb80a2da
3 changed files with 12 additions and 6 deletions
+12 -6
View File
@@ -2,13 +2,17 @@ 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)
# 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")
class GRAOU_PT_panel(bpy.types.Panel):
@@ -21,6 +25,8 @@ class GRAOU_PT_panel(bpy.types.Panel):
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')