diff --git a/leenkx/blender/lnx/make_renderpath.py b/leenkx/blender/lnx/make_renderpath.py index c3c6cbe..f728472 100644 --- a/leenkx/blender/lnx/make_renderpath.py +++ b/leenkx/blender/lnx/make_renderpath.py @@ -240,8 +240,8 @@ def build(): compo_depth = True focus_distance = 0.0 - if len(bpy.data.cameras) > 0 and bpy.data.cameras[0].dof.use_dof: - focus_distance = bpy.data.cameras[0].dof.focus_distance + if len(bpy.data.cameras) > 0 and lnx.utils.get_active_scene().camera.data.dof.use_dof: + focus_distance = lnx.utils.get_active_scene().camera.data.dof.focus_distance if focus_distance > 0.0: wrd.compo_defs += '_CDOF'