Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_sync.cpp
| Show First 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | |||||
| void BlenderSync::sync_film(BL::SpaceView3D &b_v3d) | void BlenderSync::sync_film(BL::SpaceView3D &b_v3d) | ||||
| { | { | ||||
| PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles"); | PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles"); | ||||
| Film *film = scene->film; | Film *film = scene->film; | ||||
| Film prevfilm = *film; | Film prevfilm = *film; | ||||
| vector<Pass> prevpasses = scene->passes; | |||||
| if (b_v3d) { | if (b_v3d) { | ||||
| film->display_pass = update_viewport_display_passes(b_v3d, film->passes); | film->display_pass = update_viewport_display_passes(b_v3d, scene->passes); | ||||
| } | } | ||||
| film->exposure = get_float(cscene, "film_exposure"); | film->exposure = get_float(cscene, "film_exposure"); | ||||
| film->filter_type = (FilterType)get_enum( | film->filter_type = (FilterType)get_enum( | ||||
| cscene, "pixel_filter_type", FILTER_NUM_TYPES, FILTER_BLACKMAN_HARRIS); | cscene, "pixel_filter_type", FILTER_NUM_TYPES, FILTER_BLACKMAN_HARRIS); | ||||
| film->filter_width = (film->filter_type == FILTER_BOX) ? 1.0f : | film->filter_width = (film->filter_type == FILTER_BOX) ? 1.0f : | ||||
| get_float(cscene, "filter_width"); | get_float(cscene, "filter_width"); | ||||
| Show All 13 Lines | switch (b_mist.falloff()) { | ||||
| case BL::WorldMistSettings::falloff_INVERSE_QUADRATIC: | case BL::WorldMistSettings::falloff_INVERSE_QUADRATIC: | ||||
| film->mist_falloff = 0.5f; | film->mist_falloff = 0.5f; | ||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| if (film->modified(prevfilm)) { | if (film->modified(prevfilm)) { | ||||
| film->tag_update(scene); | film->tag_update(scene); | ||||
| film->tag_passes_update(scene, prevfilm.passes, false); | } | ||||
| if (!Pass::equals(prevpasses, scene->passes)) { | |||||
| scene->tag_passes_update(scene, prevpasses, false); | |||||
| film->tag_update(scene); | |||||
| } | } | ||||
| } | } | ||||
| /* Render Layer */ | /* Render Layer */ | ||||
| void BlenderSync::sync_view_layer(BL::SpaceView3D & /*b_v3d*/, BL::ViewLayer &b_view_layer) | void BlenderSync::sync_view_layer(BL::SpaceView3D & /*b_v3d*/, BL::ViewLayer &b_view_layer) | ||||
| { | { | ||||
| /* render layer */ | /* render layer */ | ||||
| ▲ Show 20 Lines • Show All 283 Lines • ▼ Show 20 Lines | #endif | ||||
| RNA_END; | RNA_END; | ||||
| scene->film->denoising_data_pass = denoising.use || denoising.store_passes; | scene->film->denoising_data_pass = denoising.use || denoising.store_passes; | ||||
| scene->film->denoising_clean_pass = (scene->film->denoising_flags & DENOISING_CLEAN_ALL_PASSES); | scene->film->denoising_clean_pass = (scene->film->denoising_flags & DENOISING_CLEAN_ALL_PASSES); | ||||
| scene->film->denoising_prefiltered_pass = denoising.store_passes && | scene->film->denoising_prefiltered_pass = denoising.store_passes && | ||||
| denoising.type == DENOISER_NLM; | denoising.type == DENOISER_NLM; | ||||
| scene->film->pass_alpha_threshold = b_view_layer.pass_alpha_threshold(); | scene->film->pass_alpha_threshold = b_view_layer.pass_alpha_threshold(); | ||||
| scene->film->tag_passes_update(scene, passes); | scene->tag_passes_update(scene, passes); | ||||
| scene->film->tag_update(scene); | scene->film->tag_update(scene); | ||||
| scene->integrator->tag_update(scene); | scene->integrator->tag_update(scene); | ||||
| return passes; | return passes; | ||||
| } | } | ||||
| void BlenderSync::free_data_after_sync(BL::Depsgraph &b_depsgraph) | void BlenderSync::free_data_after_sync(BL::Depsgraph &b_depsgraph) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines | |||||