Hide panels with features unsupported in V2x3 (#1614)

This commit is contained in:
Gorgious56
2021-07-30 14:13:41 +02:00
committed by GitHub
parent 2af1ebc614
commit b79d23b3e2
4 changed files with 18 additions and 9 deletions
@@ -13,7 +13,8 @@ class BIM_PT_cost_schedules(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
self.props = context.scene.BIMCostProperties
@@ -13,7 +13,8 @@ class BIM_PT_resources(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
self.props = context.scene.BIMResourceProperties
@@ -17,7 +17,8 @@ class BIM_PT_work_plans(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
if not Data.is_loaded:
@@ -88,7 +89,8 @@ class BIM_PT_work_schedules(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
self.props = context.scene.BIMWorkScheduleProperties
@@ -429,7 +431,8 @@ class BIM_PT_work_calendars(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
if not Data.is_loaded:
@@ -261,7 +261,8 @@ class BIM_PT_structural_analysis_models(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
if not Data.is_loaded:
@@ -345,7 +346,8 @@ class BIM_PT_structural_load_cases(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
self.props = context.scene.BIMStructuralProperties
@@ -449,7 +451,8 @@ class BIM_PT_structural_loads(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
if not Data.is_loaded:
@@ -516,7 +519,8 @@ class BIM_PT_boundary_conditions(Panel):
@classmethod
def poll(cls, context):
return IfcStore.get_file()
file = IfcStore.get_file()
return file and hasattr(file, "schema") and file.schema != "IFC2X3"
def draw(self, context):
if not Data.is_loaded: