move get collection recursive in functions so it can be reused
This commit is contained in:
@@ -307,6 +307,18 @@ def connect_to_file_output(node_list, file_out=None, base_path='', excludes=None
|
||||
|
||||
# region Utilities
|
||||
|
||||
def get_collection_children_recursive(col, cols=None) -> list:
|
||||
'''return a list of all the child collections
|
||||
and their subcollections in the passed collection'''
|
||||
|
||||
cols = cols if cols is not None else []
|
||||
for sub in col.children:
|
||||
if sub not in cols:
|
||||
cols.append(sub)
|
||||
if len(sub.children):
|
||||
cols = get_collection_children_recursive(sub, cols)
|
||||
return cols
|
||||
|
||||
def set_properties_editor_tab(tab, skip_if_exists=True):
|
||||
'''Take a tab name and apply it to properties editor
|
||||
tab: identifier of the tab, possible name in:
|
||||
|
||||
Reference in New Issue
Block a user