Page MenuHome

UI: Only draw node menu search if categories exist
ClosedPublic

Authored by Omar Emara (OmarSquircleArt) on Aug 14 2020, 9:11 PM.

Details

Summary

Currently, the search operator in the node add menu NODE_MT_add is drawn
even if no node categories exists. This patch only draws the operator if
at least one node category passes the poll.

This patch is needed because some add-ons use custom search operator and
do not register node categories. In this case, it is undesirable to have
a search operator drawn that do nothing and is not used. One such add-on
is Animation Nodes.

Diff Detail

Repository
rB Blender

Event Timeline

Omar Emara (OmarSquircleArt) requested review of this revision.Aug 14 2020, 9:11 PM
Jacques Lucke (JacquesLucke) added inline comments.
release/scripts/startup/bl_ui/space_node.py
217

Incorrect whitespace.

This revision is now accepted and ready to land.Aug 17 2020, 10:38 AM