Cleanup: Use utility function to find groups in node tree #104465

Merged
Hans Goudey merged 23 commits from mod_moder/blender:is_contains into main 2023-02-10 17:30:57 +01:00
1 changed files with 5 additions and 2 deletions
Showing only changes of commit 7bdda03ed7 - Show all commits

View File

@ -12723,8 +12723,11 @@ static void rna_def_nodetree(BlenderRNA *brna)
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
func = RNA_def_function(srna, "contains_group", "rna_NodeTree_contains_group");
RNA_def_function_ui_description(func, "Check if the node tree contains another. Used to avoid creating recursive node groups");
parm = RNA_def_pointer(func, "sub_tree", "NodeTree", "Node Group", "Node group for recursive check");
RNA_def_function_ui_description(
func,
"Check if the node tree contains another. Used to avoid creating recursive node groups");
parm = RNA_def_pointer(
func, "sub_tree", "NodeTree", "Node Group", "Node group for recursive check");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
parm = RNA_def_property(func, "contained", PROP_BOOLEAN, PROP_NONE);
mod_moder marked this conversation as resolved
Review

Currently this uses the term group and tree. While we generally use those terms synonymously, it would be better to be consistent within a single function declaration.

Currently this uses the term `group` and `tree`. While we generally use those terms synonymously, it would be better to be consistent within a single function declaration.
RNA_def_function_return(func, parm);