Skip to content

Commit d04a0ee

Browse files
small change that allows semicolon separated lists to set pattern for bulk import
1 parent 4516b0f commit d04a0ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bseq/operators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,8 @@ def execute(self, context):
556556
if importer_prop.use_relative and not bpy.data.is_saved:
557557
return relative_path_error()
558558

559+
include_patterns = importer_prop.pattern.split(';') if importer_prop.pattern != '' else None
560+
559561
root_dir = bpy.path.abspath(importer_prop.path)
560562
root_coll = bpy.context.scene.collection
561563
root_layer_collection = bpy.context.view_layer.layer_collection
@@ -565,6 +567,8 @@ def execute(self, context):
565567
seqs = fileseq.findSequencesOnDisk(current_dir)
566568
if len(seqs) == 0:
567569
continue
570+
if include_patterns is not None and all([p not in s.basename() and p not in s.extension() for p in include_patterns for s in seqs]):
571+
continue
568572

569573
# Get list of directories from the root_dir to the current directory
570574
coll_list = bpy.path.relpath(current_dir, start=root_dir).strip("//").split("/")

0 commit comments

Comments
 (0)