Cycles/Eeeve: unify film transparent setting

For existing files, it will use the setting from Cycles or Eevee depending on
the render engine in the scene.

Differential Revision: https://developer.blender.org/D4874
This commit is contained in:
2019-05-16 17:03:16 +02:00
committed by Brecht Van Lommel
parent 2ee762344f
commit 9f6670ca37
10 changed files with 30 additions and 48 deletions

View File

@@ -1354,16 +1354,7 @@ void BlenderSync::sync_world(BL::Depsgraph &b_depsgraph, bool update_all)
}
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
/* 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;
background->transparent = b_scene.render().film_transparent();
if (background->transparent) {
background->transparent_glass = get_boolean(cscene, "film_transparent_glass");