diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-30 10:08:08 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-30 10:08:08 +0400 |
commit | 154707492df2629faf65052ad22f77e9dc47d82b (patch) | |
tree | 7eff596025afb0b35993b54aa9c3716fc830c3d4 /netrender/baking.py | |
parent | d406b40b023409ff657c24a6e56e0660d83caddf (diff) |
Netrender: enable scripts, drivers
Diffstat (limited to 'netrender/baking.py')
-rw-r--r-- | netrender/baking.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/netrender/baking.py b/netrender/baking.py index 24d32e85..f3a759a4 100644 --- a/netrender/baking.py +++ b/netrender/baking.py @@ -21,7 +21,6 @@ import sys, subprocess, re from netrender.utils import * -BLENDER_PATH = sys.argv[0] def commandToTask(command): i = command.index("|") @@ -38,9 +37,19 @@ def bake(job, tasks): task_commands = [] for task in tasks: task_commands.extend(task) - - process = subprocess.Popen([BLENDER_PATH, "-b", "-noaudio", job_full_path, "-P", __file__, "--"] + task_commands, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - + + process = subprocess.Popen( + [bpy.app.binary_path, + "-b", + "-y", + "-noaudio", + job_full_path, + "-P", __file__, + "--", + ] + task_commands, + stdout=subprocess.PIPE, stderr=subprocess.STDOUT, + ) + return process result_pattern = re.compile("BAKE FILE\[ ([0-9]+) \]: (.*)") |