def process_pre(self):
import tempfile
self.temp_dir = tempfile.TemporaryDirectory()
self.environ = {'PYTHONPATH': pythonpath()}
self.outfname = bpy.path.ensure_ext(self.filepath, ".zip")
self.command = (
bpy.app.binary_path_python,
'-m', 'bam.pack',
# file to pack
"--input", bpy.data.filepath,
# file to write
"--output", self.outfname,
"--temp", self.temp_dir.name,
)
if self.log.isEnabledFor(logging.INFO):
import shlex
cmd_to_log = ' '.join(shlex.quote(s) for s in self.command)
self.log.info('Executing %s', cmd_to_log)
评论列表
文章目录