mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
fix poll errors
This commit is contained in:
@@ -107,7 +107,11 @@ class BIM_PT_element_filters(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
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):
|
def draw(self, context):
|
||||||
if not ElementFiltersData.is_loaded:
|
if not ElementFiltersData.is_loaded:
|
||||||
@@ -157,7 +161,11 @@ class BIM_PT_drawing_underlay(Panel):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def poll(cls, context):
|
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):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|||||||
Reference in New Issue
Block a user