Added file exclusion filter for Flamenco.
A filter like "*.abc;*.mkv;*.mov" can be used to prevent certain files from being copied to the job storage directory. Requires a Blender that is bundled with BAM 1.1.7 or newer.
This commit is contained in:
@@ -14,7 +14,8 @@ class CommandExecutionError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
async def bam_copy(base_blendfile: Path, target_blendfile: Path) -> typing.List[Path]:
|
||||
async def bam_copy(base_blendfile: Path, target_blendfile: Path,
|
||||
exclusion_filter: str) -> typing.List[Path]:
|
||||
"""Uses BAM to copy the given file and dependencies to the target blendfile.
|
||||
|
||||
Due to the way blendfile_pack.py is programmed/structured, we cannot import it
|
||||
@@ -41,6 +42,9 @@ async def bam_copy(base_blendfile: Path, target_blendfile: Path) -> typing.List[
|
||||
'--mode', 'FILE',
|
||||
]
|
||||
|
||||
if exclusion_filter:
|
||||
args.extend(['--exclude', exclusion_filter])
|
||||
|
||||
cmd_to_log = ' '.join(shlex.quote(s) for s in args)
|
||||
log.info('Executing %s', cmd_to_log)
|
||||
|
||||
|
Reference in New Issue
Block a user