Skip to content

Commit

Permalink
add linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
derchrisuk committed Mar 25, 2021
1 parent ad47faf commit 2224b23
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions make-blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ def enqueue_job(event):
run(r'C:/Program\ Files/Blender\ Foundation/Blender\ 2.92/blender.exe --background {comp} --use-extension 1 --threads 0 --render-output {locationpath} --render-anim',
comp=work_comp,
locationpath=intermediate_clip)
if platform.system() == 'Linux':
run(r'blender --background {comp} --use-extension 1 --threads 0 --render-output {locationpath} --render-anim',
comp=work_comp,
locationpath=intermediate_clip)
else:
with open(args.project + 'intro.py', 'r') as fp:
scriptstr = fp.read()
Expand All @@ -212,6 +216,8 @@ def enqueue_job(event):
fp.write(scriptstr)

if platform.system() == 'Darwin':
if args.debug:
print("running: Blender.app --background %s --python-use-system-env --python %s --use-extension 1 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
run(r'/Applications/Blender.app/Contents/MacOS/Blender --background {source} --python-use-system-env --python {jobpath} --use-extension 1 --threads 0 --render-output {locationpath} --render-anim',
source=work_source,
jobpath=work_doc,
Expand All @@ -224,6 +230,13 @@ def enqueue_job(event):
source=work_source,
jobpath=work_doc,
locationpath=intermediate_clip)
if platform.system() == 'Linux':
if args.debug:
print("running: blender --background %s --python-use-system-env --python %s --use-extension 1 --threads 0 --render-output %s --render-anim" % (work_source, work_doc, intermediate_clip))
run(r'blender --background {source} --python-use-system-env --python {jobpath} --use-extension 1 --threads 0 --render-output {locationpath} --render-anim',
source=work_source,
jobpath=work_doc,
locationpath=intermediate_clip)
if args.debug or args.keep:
copyfile(work_doc, args.project + event_id + '.py')

Expand Down

0 comments on commit 2224b23

Please sign in to comment.