Bforartists: Node Editors - iconize add menus

Created on 2 Dec 2020  路  2Comments  路  Source: Bforartists/Bforartists

We have an add menu in every node editor. I was never able to add an icon here, the content of this menus is an array, which is then shown as a menu. And i have never found a way to connect icons to it.

The node arrays can be found in \release\scripts\startup\nodeitems_builtins.py
The NODE_MT_add menu is in Release\2.92\scripts\startup\bl_ui\space_node.py
And the def draw_node_categories_menu is in release\scripts\modules\nodeitems_utils.py

@iyadahmed , do you maybe know a way to connect the arrays with icons so that we can iconize the add menus here too?

addmenu

0 - task

Most helpful comment

image
it turned out this is as easy as setting icon of layout operator in release/scripts/modules/nodeitems_utils.py
we could define a dictionary to map from node type to icon, what would be better is to somehow make use of the node header icons we added earlier #1609
image

All 2 comments

Just saw the mention :), Investigating into it after finishing the other task

image
it turned out this is as easy as setting icon of layout operator in release/scripts/modules/nodeitems_utils.py
we could define a dictionary to map from node type to icon, what would be better is to somehow make use of the node header icons we added earlier #1609
image

Was this page helpful?
0 / 5 - 0 ratings