[Bf-blender-cvs] [ff810f08d86] blender2.8: Shows all Cycles panels based on scene, not context engine

Dalai Felinto noreply at git.blender.org
Tue Nov 21 16:19:49 CET 2017


Commit: ff810f08d8670b3d016e865e9b32df44c270ddaa
Author: Dalai Felinto
Date:   Tue Nov 21 13:16:24 2017 -0200
Branches: blender2.8
https://developer.blender.org/rBff810f08d8670b3d016e865e9b32df44c270ddaa

Shows all Cycles panels based on scene, not context engine

This is tricky since we may want granular polling depending on the setting.
Or an option to pick whether we want the context or the scene to drive the
panels to prevent too many panels when mixing Eevee and Cycles for example.

===================================================================

M	intern/cycles/blender/addon/ui.py

===================================================================

diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index af16de70a46..537303035b3 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -50,7 +50,7 @@ class CyclesButtonsPanel:
 
     @classmethod
     def poll(cls, context):
-        return context.engine in cls.COMPAT_ENGINES
+        return context.scene.view_render.engine in cls.COMPAT_ENGINES
 
 
 def get_device_type(context):



More information about the Bf-blender-cvs mailing list