diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 5 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 11 | ||||
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 11 |
3 files changed, 7 insertions, 20 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index f376eb8ec67..35f9e17dc41 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -417,11 +417,6 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): min=0.0, max=10.0, default=1.0, ) - film_transparent: BoolProperty( - name="Transparent", - description="World background is transparent, for compositing the render over another background", - default=False, - ) film_transparent_glass: BoolProperty( name="Transparent Glass", description="Render transmissive surfaces as transparent, for compositing glass over another background", diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 5ff88367f22..86f58769025 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -528,31 +528,32 @@ class CYCLES_RENDER_PT_film(CyclesButtonsPanel, Panel): class CYCLES_RENDER_PT_film_transparency(CyclesButtonsPanel, Panel): - bl_label = "Transparency" + bl_label = "Transparent" bl_parent_id = "CYCLES_RENDER_PT_film" def draw_header(self, context): layout = self.layout scene = context.scene - cscene = scene.cycles + rd = scene.render - layout.prop(cscene, "film_transparent", text="") + layout.prop(rd, "film_transparent", text="") def draw(self, context): layout = self.layout layout.use_property_split = True layout.use_property_decorate = False scene = context.scene + rd = scene.render cscene = scene.cycles - layout.active = cscene.film_transparent + layout.active = rd.film_transparent col = layout.column() col.prop(cscene, "film_transparent_glass", text="Transparent Glass") sub = col.column() - sub.active = cscene.film_transparent and cscene.film_transparent_glass + sub.active = rd.film_transparent and cscene.film_transparent_glass sub.prop(cscene, "film_transparent_roughness", text="Roughness Threshold") diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index 8321d0c088c..f42a15706e7 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -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"); |