[feat] add full element icons
- add more element icons. now element icons is not problem. - change icon load strategy. now icon is loaded outside plugin. this operations might slow down blender but now I can apply my custom map to some operators to get better using experience. - use new element icons to decorate some group name to let user know what this group stands for.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import bpy, mathutils
|
||||
from . import UTILS_constants, UTILS_functions
|
||||
from . import UTILS_constants, UTILS_functions, UTILS_icons_manager
|
||||
|
||||
# ================================================= actual add
|
||||
|
||||
@ -12,7 +12,12 @@ class BALLANCE_OT_add_components(bpy.types.Operator):
|
||||
elements_type: bpy.props.EnumProperty(
|
||||
name="Type",
|
||||
description="This element type",
|
||||
items=tuple(map(lambda x: (x, x, ""), UTILS_constants.bmfile_componentList)),
|
||||
#items=tuple(map(lambda x: (x, x, ""), UTILS_constants.bmfile_componentList)),
|
||||
items=tuple(
|
||||
# token, display name, descriptions, icon, index
|
||||
(blk, blk, "", UTILS_icons_manager.get_element_icon(blk), idx)
|
||||
for idx, blk in enumerate(UTILS_constants.bmfile_componentList)
|
||||
),
|
||||
)
|
||||
|
||||
attentionElements = ("PC_TwoFlames", "PR_Resetpoint")
|
||||
|
Reference in New Issue
Block a user