Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Picard <dam.pic@free.fr>2020-10-28 22:39:22 +0300
committerDamien Picard <dam.pic@free.fr>2020-10-28 22:39:22 +0300
commitd85787dd2bf343903cf95d9c4a9bd87d55c71e31 (patch)
tree764f9be38723eeea64baf3cb1f216206ef9ea245 /sun_position
parent94989086ae6ae7609ed54546abba406e62ea1b8a (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.
Diffstat (limited to 'sun_position')
-rw-r--r--sun_position/ui_sun.py5
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"