Cleanup: Remove bNodeType flag from base registration functions
This flag is only used a few small cases, so instead of setting the flag for every node only set the required flag for the nodes that require it. Mostly the flag is used to set `ntype.flag = NODE_PREVIEW` For nodes that should have previews by default which is only some compositor nodes and some texture nodes. The frame node also sets the `NODE_BACKGROUND` flag. All other nodes were setting a flag of 0 which has no purpose. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D13699
This commit is contained in:
@@ -31,9 +31,9 @@ static bool fn_node_poll_default(bNodeType *UNUSED(ntype),
|
||||
return true;
|
||||
}
|
||||
|
||||
void fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
|
||||
void fn_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
|
||||
{
|
||||
node_type_base(ntype, type, name, nclass, flag);
|
||||
node_type_base(ntype, type, name, nclass);
|
||||
ntype->poll = fn_node_poll_default;
|
||||
ntype->insert_link = node_insert_link_default;
|
||||
ntype->gather_link_search_ops = blender::nodes::search_link_ops_for_basic_node;
|
||||
|
||||
Reference in New Issue
Block a user