Hey
When I set scene via python api, the current scene may have an invalid world for some period of time...
``
@Persistent
def frame_change_handler(scene, depsgraph):
"""
Frame change handler, that redraws the atmosphere if and when
the scene has changed.
"""
if not scene.world or bpy.context.scene.world.psa_exposed.sun_object is None:
return
Will crashm as bpy.context.scene has no world.
if not scene.world or bpy.context.scene.world.psa_exposed.sun_object is None:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'psa_exposed'
We also need to check if current context scene word is valid...
**General information**
4.5.0
**To Reproduce**
Tricky...
Hey
When I set scene via python api, the current scene may have an invalid world for some period of time...
``
@Persistent
def frame_change_handler(scene, depsgraph):
"""
Frame change handler, that redraws the atmosphere if and when
the scene has changed.
"""
AttributeError: 'NoneType' object has no attribute 'psa_exposed'