Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_shader.cpp
| Show First 20 Lines • Show All 1,348 Lines • ▼ Show 20 Lines | if (world_recalc || update_all || b_world.ptr.data != world_map) { | ||||
| } | } | ||||
| shader->set_graph(graph); | shader->set_graph(graph); | ||||
| shader->tag_update(scene); | shader->tag_update(scene); | ||||
| background->tag_update(scene); | background->tag_update(scene); | ||||
| } | } | ||||
| PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles"); | PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles"); | ||||
| background->transparent = b_scene.render().film_transparent(); | |||||
| /* when doing preview render check for BI's transparency settings, | |||||
| * this is so because Blender's preview render routines are not able | |||||
| * to tweak all cycles's settings depending on different circumstances | |||||
| */ | |||||
| if (b_engine.is_preview() == false) | |||||
| background->transparent = get_boolean(cscene, "film_transparent"); | |||||
| else | |||||
| background->transparent = b_scene.render().alpha_mode() == | |||||
| BL::RenderSettings::alpha_mode_TRANSPARENT; | |||||
| if (background->transparent) { | if (background->transparent) { | ||||
| background->transparent_glass = get_boolean(cscene, "film_transparent_glass"); | background->transparent_glass = get_boolean(cscene, "film_transparent_glass"); | ||||
| background->transparent_roughness_threshold = get_float(cscene, "film_transparent_roughness"); | background->transparent_roughness_threshold = get_float(cscene, "film_transparent_roughness"); | ||||
| } | } | ||||
| else { | else { | ||||
| background->transparent_glass = false; | background->transparent_glass = false; | ||||
| background->transparent_roughness_threshold = 0.0f; | background->transparent_roughness_threshold = 0.0f; | ||||
| ▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines | |||||