Fix #129550: Node group default width not working for link-drag-search
When this feature was added we missed accounting for it in all places where node groups were added.
This commit is contained in:
@@ -204,13 +204,17 @@ static void search_link_ops_for_asset_metadata(const bNodeTree &node_tree,
|
||||
Main &bmain = *CTX_data_main(¶ms.C);
|
||||
|
||||
bNode &node = params.add_node(params.node_tree.typeinfo->group_idname);
|
||||
node.flag &= ~NODE_OPTIONS;
|
||||
|
||||
node.id = asset::asset_local_id_ensure_imported(bmain, asset);
|
||||
bNodeTree *group = reinterpret_cast<bNodeTree *>(
|
||||
asset::asset_local_id_ensure_imported(bmain, asset));
|
||||
node.id = &group->id;
|
||||
id_us_plus(node.id);
|
||||
BKE_ntree_update_tag_node_property(¶ms.node_tree, &node);
|
||||
DEG_relations_tag_update(&bmain);
|
||||
|
||||
node.flag &= ~NODE_OPTIONS;
|
||||
node.width = group->default_group_node_width;
|
||||
|
||||
/* Create the inputs and outputs on the new node. */
|
||||
nodes::update_node_declaration_and_sockets(params.node_tree, node);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user