From c322c30fe5466c8358956ccbc4bed76858940d6f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 11 Dec 2014 12:44:47 +0100 Subject: [PATCH] add option to recurse data in indirectly linked blend files need to expose this from the CLI --- modules/blendfile_path_walker.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/blendfile_path_walker.py b/modules/blendfile_path_walker.py index 8e6e070..ed5f3d9 100644 --- a/modules/blendfile_path_walker.py +++ b/modules/blendfile_path_walker.py @@ -166,6 +166,9 @@ class FilePath: # recursive options recursive=False, + # recurse all indirectly linked data + # (not just from the initially referenced blend file) + recursive_all=False, # list of ID block names we want to load, or None to load all block_codes=None, # root when we're loading libs indirectly @@ -195,7 +198,7 @@ class FilePath: if lib_visit is None: lib_visit = {} - if recursive and (level > 0) and (block_codes is not None): + if recursive and (level > 0) and (block_codes is not None) and (recursive_all is False): # prevent from expanding the # same datablock more then once expand_codes = set()