Skip to content

Commit c65a872

Browse files
committed
fix OS detection
handle unsupported OS convert frame number to string
1 parent 7b26e5c commit c65a872

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

etc/cinema4d_sg.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
"""
44
DrQueue render template for Cinema4D
5-
Copyright (C) 2011 Andreas Schroeder
5+
Copyright (C) 2011-2014 Andreas Schröder
66
77
This file is part of DrQueue.
88
@@ -38,11 +38,11 @@ def run_renderer(env_dict):
3838
# renderer path/executable
3939
engine_path = "C:\Program\ Files\MAXON\CINEMA\ 4D\ R12\CINEMA\ 4D.exe"
4040

41-
if DRQUEUE_OS == "Mac OSX":
41+
elif DRQUEUE_OS in ["Mac OSX", "Darwin"]:
4242
# renderer path/executable
4343
engine_path = "/Applications/MAXON/CINEMA\ 4D\ R12/CINEMA\ 4D.app/Contents/MacOS/CINEMA\ 4D"
4444

45-
if DRQUEUE_OS == "Linux":
45+
elif DRQUEUE_OS == "Linux":
4646
# we use wine on linux (this is a hack, but works)
4747
# there is a tightvnc server running on display :1
4848
# see wine bug #8069
@@ -62,7 +62,11 @@ def run_renderer(env_dict):
6262
# set env variable, so wine can access the xserver even though we are rendering headless
6363
os.environ["DISPLAY"] = ":1"
6464

65-
command = engine_path + " -nogui -render " + DRQUEUE_SCENEFILE + " -oimage " + DRQUEUE_RENDERDIR + " -frame " + DRQUEUE_FRAME + " -omultipass " + DRQUEUE_RENDERDIR + " -threads 0"
65+
else:
66+
helper.log_write('ERROR: Unsupported operating system ' + str(DRQUEUE_OS))
67+
return helper.return_to_ipython(1)
68+
69+
command = engine_path + " -nogui -render " + DRQUEUE_SCENEFILE + " -oimage " + DRQUEUE_RENDERDIR + " -frame " + str(DRQUEUE_FRAME) + " -omultipass " + DRQUEUE_RENDERDIR + " -threads 0"
6670

6771
# log command line
6872
helper.log_write(command + "\n")

0 commit comments

Comments
 (0)