| 126 | } |
| 127 | |
| 128 | void RenderConfig::Parse(const Properties &props) { |
| 129 | // I can not use GetProperty() here because it triggers a ToProperties() and it can |
| 130 | // be a problem with OpenCL disabled (PATHOCL is not defined, etc.) |
| 131 | if (cfg.Get(Property("debug.renderconfig.parse.print")(false)).Get<bool>()) { |
| 132 | SDL_LOG("====================RenderConfig::Parse()======================" << endl << |
| 133 | props); |
| 134 | SDL_LOG("==============================================================="); |
| 135 | } |
| 136 | |
| 137 | // Reset the properties cache |
| 138 | propsCache.Clear(); |
| 139 | |
| 140 | cfg.Set(props); |
| 141 | // I can not use GetProperty() here because it triggers a ToProperties() and it can |
| 142 | // be a problem with OpenCL disabled (PATHOCL is not defined, etc.) |
| 143 | scene->enableParsePrint = cfg.Get(Property("debug.scene.parse.print")(false)).Get<bool>(); |
| 144 | |
| 145 | UpdateFilmProperties(props); |
| 146 | |
| 147 | // Scene epsilon is read directly from the cfg properties inside |
| 148 | // render engine Start() method |
| 149 | |
| 150 | // Accelerator settings are read directly from the cfg properties inside |
| 151 | // the render engine |
| 152 | |
| 153 | // Light strategy |
| 154 | scene->lightDefs.SetLightStrategy(cfg); |
| 155 | |
| 156 | // Update the Camera |
| 157 | u_int filmFullWidth, filmFullHeight, filmSubRegion[4]; |
| 158 | u_int *subRegion = Film::GetFilmSize(cfg, &filmFullWidth, &filmFullHeight, filmSubRegion) ? |
| 159 | filmSubRegion : NULL; |
| 160 | scene->camera->Update(filmFullWidth, filmFullHeight, subRegion); |
| 161 | } |
| 162 | |
| 163 | void RenderConfig::DeleteAllFilmImagePipelinesProperties() { |
| 164 | cfg.DeleteAll(cfg.GetAllNamesRE("film\\.imagepipeline\\.[0-9]+\\..*")); |