/** \brief Feed command line options to the renderer. * * This function sends all command line options to the renderer, except those * which are set directly before the world block. */ void setupOptions() { if ( g_cl_echoapi ) Aqsis::cxxRenderContext()->addFilter("echorib"); std::string frameList = getFrameList(); if(!frameList.empty()) Aqsis::cxxRenderContext()->addFilter("framedrop", Aqsis::ParamListBuilder()("frames", frameList.c_str()) ); // Allow any command line arguments to override system/env settings Aqsis::log() << Aqsis::info << "Applying search paths provided at the command line\n"; const char* popt[1]; if(!g_cl_shader_path.empty()) { popt[0] = g_cl_shader_path.c_str(); RiOption( tokenCast("searchpath"), "shader", &popt, RI_NULL ); } if(!g_cl_archive_path.empty()) { popt[0] = g_cl_archive_path.c_str(); RiOption( tokenCast("searchpath"), "archive", &popt, RI_NULL ); } if(!g_cl_texture_path.empty()) { popt[0] = g_cl_texture_path.c_str(); RiOption( tokenCast("searchpath"), "texture", &popt, RI_NULL ); } if(!g_cl_display_path.empty()) { popt[0] = g_cl_display_path.c_str(); RiOption( tokenCast("searchpath"), "display", &popt, RI_NULL ); } if(!g_cl_procedural_path.empty()) { popt[0] = g_cl_procedural_path.c_str(); RiOption( tokenCast("searchpath"), "procedural", &popt, RI_NULL ); } RiProgressHandler( &PrintProgress ); }
/** \brief Feed command line options to the renderer. * * This function sends all command line options to the renderer, except those * which are set directly before the world block. */ void setupOptions() { if ( g_cl_echoapi ) { RtInt echoapi = 1; RiOption( tokenCast("statistics"), "echoapi", &echoapi, RI_NULL ); } // Allow any command line arguments to override system/env settings Aqsis::log() << Aqsis::info << "Applying search paths provided at the command line\n"; const char* popt[1]; if(!g_cl_shader_path.empty()) { popt[0] = g_cl_shader_path.c_str(); RiOption( tokenCast("searchpath"), "shader", &popt, RI_NULL ); } if(!g_cl_archive_path.empty()) { popt[0] = g_cl_archive_path.c_str(); RiOption( tokenCast("searchpath"), "archive", &popt, RI_NULL ); } if(!g_cl_texture_path.empty()) { popt[0] = g_cl_texture_path.c_str(); RiOption( tokenCast("searchpath"), "texture", &popt, RI_NULL ); } if(!g_cl_display_path.empty()) { popt[0] = g_cl_display_path.c_str(); RiOption( tokenCast("searchpath"), "display", &popt, RI_NULL ); } if(!g_cl_procedural_path.empty()) { popt[0] = g_cl_procedural_path.c_str(); RiOption( tokenCast("searchpath"), "procedural", &popt, RI_NULL ); } RiProgressHandler( &PrintProgress ); RiPreWorldFunction( &PreWorld ); }