Godot_bridge/addon/common/icons.py
2023-03-29 12:43:53 +02:00

16 lines
379 B
Python

import bpy
import os
icons_collection = None
icons_directory = os.path.dirname(__file__)
def get_icon_id(identifier):
return get_icon(identifier).icon_id
def get_icon(identifier):
if identifier in icons_collection:
return icons_collection[identifier]
return icons_collection.load(identifier, os.path.join(icons_directory, identifier + ".png"), "IMAGE")