Nodes: Panel declarations for grouping sockets #108649
|
@ -269,7 +269,7 @@ class NODE_OT_socket_category_add(NodeSocketCategoryOperator, Operator):
|
|||
tree = snode.edit_tree
|
||||
categories = tree.socket_categories
|
||||
|
||||
# Remember index to move the item
|
||||
# Remember index to move the item.
|
||||
LukasTonne marked this conversation as resolved
Outdated
|
||||
dst_index = min(categories.active_index + 1, len(categories))
|
||||
categories.new("Category")
|
||||
categories.move(len(categories) - 1, dst_index)
|
||||
|
|
|
@ -542,10 +542,7 @@ void ntreeBlendWrite(struct BlendWriter *writer, struct bNodeTree *ntree);
|
|||
/** \name Node Tree Interface
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* Run this after relevant changes to categories
|
||||
* to ensure sockets remain sorted by category.
|
||||
*/
|
||||
/** Run this after relevant changes to categories to ensure sockets remain sorted by category. */
|
||||
void ntreeEnsureSocketCategoryOrder(bNodeTree *ntree);
|
||||
LukasTonne marked this conversation as resolved
Outdated
Hans Goudey
commented
This comment fits on one line This comment fits on one line
Lukas Tönne
commented
This is currently in the public API because the This is currently in the public API because the `NODE_OT_tree_socket_move` operator works directly on DNA and needs to call this after it moves sockets. That operator should also use an API method so the update function does not need to be exposed. I suggest a separate fix.
|
||||
|
||||
void ntreeRemoveSocketInterface(bNodeTree *ntree, bNodeSocket *sock);
|
||||
|
@ -598,7 +595,7 @@ void ntreeClearSocketCategories(bNodeTree *ntree);
|
|||
|
||||
/**
|
||||
* Move a socket category up or down in the node tree.
|
||||
* \param index Index to which to move the category.
|
||||
* \param index: Index to which to move the category.
|
||||
*/
|
||||
void ntreeMoveSocketCategory(bNodeTree *ntree, bNodeSocketCategory *category, int new_index);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Period at the end of the comment.