Cleanup: Use LISTBASE_FOREACH macro for node groups
This commit is contained in:
@@ -325,13 +325,8 @@ static Vector<NodeLinkItem> ui_node_link_items(NodeLinkArg *arg,
|
||||
{
|
||||
Vector<NodeLinkItem> items;
|
||||
|
||||
/* XXX this should become a callback for node types! */
|
||||
if (arg->node_type->type == NODE_GROUP) {
|
||||
bNodeTree *ngroup;
|
||||
|
||||
for (ngroup = (bNodeTree *)arg->bmain->nodetrees.first; ngroup;
|
||||
ngroup = (bNodeTree *)ngroup->id.next)
|
||||
{
|
||||
LISTBASE_FOREACH (bNodeTree *, ngroup, &arg->bmain->nodetrees) {
|
||||
const char *disabled_hint;
|
||||
if ((ngroup->type != arg->ntree->type) ||
|
||||
!bke::node_group_poll(arg->ntree, ngroup, &disabled_hint))
|
||||
@@ -340,9 +335,7 @@ static Vector<NodeLinkItem> ui_node_link_items(NodeLinkArg *arg,
|
||||
}
|
||||
}
|
||||
|
||||
for (ngroup = (bNodeTree *)arg->bmain->nodetrees.first; ngroup;
|
||||
ngroup = (bNodeTree *)ngroup->id.next)
|
||||
{
|
||||
LISTBASE_FOREACH (bNodeTree *, ngroup, &arg->bmain->nodetrees) {
|
||||
const char *disabled_hint;
|
||||
if ((ngroup->type != arg->ntree->type) ||
|
||||
!bke::node_group_poll(arg->ntree, ngroup, &disabled_hint))
|
||||
|
||||
Reference in New Issue
Block a user