diff --git a/bam/blend/blendfile_pack.py b/bam/blend/blendfile_pack.py index 16fa7ed..c91b242 100755 --- a/bam/blend/blendfile_pack.py +++ b/bam/blend/blendfile_pack.py @@ -513,6 +513,9 @@ def pack( if (not os.path.exists(src)) or os.path.isdir(src): yield report(" %s: %r\n" % (colorize("source missing", color='red'), src)) else: + dst_dir = os.path.dirname(dst) + if not os.path.exists(dst_dir): + os.makedirs(dst_dir) yield report(" %s: %r -> %r\n" % (colorize("copying", color='blue'), src, dst)) shutil.copy(src, dst)