mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
fix poll errors
This commit is contained in:
@@ -107,7 +107,11 @@ class BIM_PT_element_filters(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.scene.camera and hasattr(context.active_object.data, "BIMCameraProperties")
|
||||
return (
|
||||
context.scene.camera
|
||||
and context.active_object
|
||||
and hasattr(context.active_object.data, "BIMCameraProperties")
|
||||
)
|
||||
|
||||
def draw(self, context):
|
||||
if not ElementFiltersData.is_loaded:
|
||||
@@ -157,7 +161,11 @@ class BIM_PT_drawing_underlay(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.scene.camera and hasattr(context.active_object.data, "BIMCameraProperties")
|
||||
return (
|
||||
context.scene.camera
|
||||
and context.active_object
|
||||
and hasattr(context.active_object.data, "BIMCameraProperties")
|
||||
)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
Reference in New Issue
Block a user