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:
2017-04-21 18:15:59 +02:00
parent 8d5c97931e
commit 1e80446870
4 changed files with 38 additions and 10 deletions

View File

@@ -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)