From 1dd05a1e7bd2d416666367da4e22c49ce5d47ac5 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Sat, 25 Jan 2014 13:25:26 +0100 Subject: [PATCH] Cleanup: Simplify Cycles standalone OSL detection code. --- intern/cycles/app/cycles_standalone.cpp | 11 +++-------- 1 file 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);