diff options
author | Damien Picard <dam.pic@free.fr> | 2020-10-28 22:39:22 +0300 |
---|---|---|
committer | Damien Picard <dam.pic@free.fr> | 2020-10-28 22:39:22 +0300 |
commit | d85787dd2bf343903cf95d9c4a9bd87d55c71e31 (patch) | |
tree | 764f9be38723eeea64baf3cb1f216206ef9ea245 | |
parent | 94989086ae6ae7609ed54546abba406e62ea1b8a (diff) |
Sun position: Fix T80379 - Custom startup breaks the add-on
The startup world didn't use nodes, so the sky texture node couldn't
be found.
-rw-r--r-- | sun_position/ui_sun.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sun_position/ui_sun.py b/sun_position/ui_sun.py index e14d9600..fa79a3f0 100644 --- a/sun_position/ui_sun.py +++ b/sun_position/ui_sun.py @@ -148,8 +148,9 @@ class SUNPOS_PT_Panel(bpy.types.Panel): col.prop(sp, "time_spread") col.separator() - col.prop_search(sp, "sky_texture", context.scene.world.node_tree, - "nodes") + if context.scene.world.node_tree is not None: + col.prop_search(sp, "sky_texture", context.scene.world.node_tree, + "nodes") class SUNPOS_PT_Location(bpy.types.Panel): bl_space_type = "PROPERTIES" |