Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2014-01-25 16:25:26 +0400
committerThomas Dinges <blender@dingto.org>2014-01-25 16:25:26 +0400
commit1dd05a1e7bd2d416666367da4e22c49ce5d47ac5 (patch)
treea867367271d39cbfd35315c89dcebead14714494 /intern/cycles/app
parent3b32507b41b52f437321a0aa11c2714a2886f374 (diff)
Cleanup: Simplify Cycles standalone OSL detection code.
Diffstat (limited to 'intern/cycles/app')
-rw-r--r--intern/cycles/app/cycles_standalone.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/intern/cycles/app/cycles_standalone.cpp b/intern/cycles/app/cycles_standalone.cpp
index 0993b0d4f55..144d02ea661 100644
--- a/intern/cycles/app/cycles_standalone.cpp
+++ b/intern/cycles/app/cycles_standalone.cpp
@@ -231,11 +231,6 @@ static void options_parse(int argc, const char **argv)
/* shading system */
string ssname = "svm";
- string shadingsystems = "Shading system to use: svm";
-
-#ifdef WITH_OSL
- shadingsystems += ", osl";
-#endif
/* parse options */
ArgParse ap;
@@ -244,7 +239,9 @@ static void options_parse(int argc, const char **argv)
ap.options ("Usage: cycles [options] file.xml",
"%*", files_parse, "",
"--device %s", &devicename, ("Devices to use: " + device_names).c_str(),
+#ifdef WITH_OSL
"--shadingsys %s", &ssname, "Shading system to use: svm, osl",
+#endif
"--background", &options.session_params.background, "Render in background, without user interface",
"--quiet", &options.quiet, "In background mode, don't print progress messages",
"--samples %d", &options.session_params.samples, "Number of samples to render",
@@ -313,12 +310,10 @@ static void options_parse(int argc, const char **argv)
}
#ifdef WITH_OSL
else if(!(ssname == "osl" || ssname == "svm")) {
-#else
- else if(!(ssname == "svm")) {
-#endif
fprintf(stderr, "Unknown shading system: %s\n", ssname.c_str());
exit(EXIT_FAILURE);
}
+#endif
else if(options.scene_params.shadingsystem == SceneParams::OSL && options.session_params.device.type != DEVICE_CPU) {
fprintf(stderr, "OSL shading system only works with CPU device\n");
exit(EXIT_FAILURE);