MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / Parse

Method Parse

src/slg/renderconfig.cpp:128–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128void 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
163void RenderConfig::DeleteAllFilmImagePipelinesProperties() {
164 cfg.DeleteAll(cfg.GetAllNamesRE("film\\.imagepipeline\\.[0-9]+\\..*"));

Callers 2

LuxCoreConsoleFunction · 0.95
__HandleConnectionMethod · 0.95

Calls 6

Get<bool>Method · 0.80
GetMethod · 0.80
SetMethod · 0.80
SetLightStrategyMethod · 0.80
ClearMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected