forked from bartvdbraak/blender
Fix error when enabling Mist pass but there was no world. Can't find mist settings, so check for World first.
This commit is contained in:
parent
49d1c8d8c6
commit
1bd3922b3a
@ -885,6 +885,7 @@ class CyclesWorld_PT_mist(CyclesButtonsPanel, Panel):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
if CyclesButtonsPanel.poll(context):
|
if CyclesButtonsPanel.poll(context):
|
||||||
|
if context.world:
|
||||||
for rl in context.scene.render.layers:
|
for rl in context.scene.render.layers:
|
||||||
if rl.use_pass_mist:
|
if rl.use_pass_mist:
|
||||||
return True
|
return True
|
||||||
|
Loading…
Reference in New Issue
Block a user