Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/cycles/blender/blender_sync.cpp31
1 files changed, 17 insertions, 14 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp
index ef9ce85ddf8..72ed1b84915 100644
--- a/intern/cycles/blender/blender_sync.cpp
+++ b/intern/cycles/blender/blender_sync.cpp
@@ -211,7 +211,6 @@ void BlenderSync::sync_integrator()
void BlenderSync::sync_film()
{
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
- BL::WorldMistSettings b_mist = b_scene.world().mist_settings();
Film *film = scene->film;
Film prevfilm = *film;
@@ -220,19 +219,23 @@ void BlenderSync::sync_film()
film->filter_type = (FilterType)RNA_enum_get(&cscene, "filter_type");
film->filter_width = (film->filter_type == FILTER_BOX)? 1.0f: get_float(cscene, "filter_width");
- film->mist_start = b_mist.start();
- film->mist_depth = b_mist.depth();
-
- switch(b_mist.falloff()) {
- case BL::WorldMistSettings::falloff_QUADRATIC:
- film->mist_falloff = 2.0f;
- break;
- case BL::WorldMistSettings::falloff_LINEAR:
- film->mist_falloff = 1.0f;
- break;
- case BL::WorldMistSettings::falloff_INVERSE_QUADRATIC:
- film->mist_falloff = 0.5f;
- break;
+ if(b_scene.world()) {
+ BL::WorldMistSettings b_mist = b_scene.world().mist_settings();
+
+ film->mist_start = b_mist.start();
+ film->mist_depth = b_mist.depth();
+
+ switch(b_mist.falloff()) {
+ case BL::WorldMistSettings::falloff_QUADRATIC:
+ film->mist_falloff = 2.0f;
+ break;
+ case BL::WorldMistSettings::falloff_LINEAR:
+ film->mist_falloff = 1.0f;
+ break;
+ case BL::WorldMistSettings::falloff_INVERSE_QUADRATIC:
+ film->mist_falloff = 0.5f;
+ break;
+ }
}
if(film->modified(prevfilm))