WIP: Brush assets project #106303

Draft
Julian Eisel wants to merge 381 commits from brush-assets-project into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 31 additions and 35 deletions
Showing only changes of commit d8fe96d6ce - Show all commits

View File

@ -26,15 +26,10 @@ static void node_declare(NodeDeclarationBuilder &b)
const bNode *node = b.node_or_null();
const bNodeTree *tree = b.tree_or_null();
if (ELEM(nullptr, node, tree)) {
return;
}
if (node && tree) {
const NodeGeometryRepeatInput &storage = node_storage(*node);
const bNode *output_node = tree->node_by_id(storage.output_node_id);
if (output_node == nullptr) {
return;
}
if (output_node) {
const auto &output_storage = *static_cast<const NodeGeometryRepeatOutput *>(
output_node->storage);
for (const int i : IndexRange(output_storage.items_num)) {
@ -49,6 +44,8 @@ static void node_declare(NodeDeclarationBuilder &b)
output_decl.dependent_field({input_decl.input_index()});
}
}
}
}
b.add_input<decl::Extend>("", "__extend__");
b.add_output<decl::Extend>("", "__extend__");
}

View File

@ -27,9 +27,7 @@ NODE_STORAGE_FUNCS(NodeGeometryRepeatOutput);
static void node_declare(NodeDeclarationBuilder &b)
{
const bNode *node = b.node_or_null();
if (node == nullptr) {
return;
}
if (node) {
const NodeGeometryRepeatOutput &storage = node_storage(*node);
for (const int i : IndexRange(storage.items_num)) {
const NodeRepeatItem &item = storage.items[i];
@ -43,6 +41,7 @@ static void node_declare(NodeDeclarationBuilder &b)
output_decl.dependent_field({input_decl.input_index()});
}
}
}
b.add_input<decl::Extend>("", "__extend__");
b.add_output<decl::Extend>("", "__extend__");
}