mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-01 04:29:38 +00:00
fixed properties search after 949a2bb and fixed console errors on search
1) When you search not from the SCENE properties blender creates some kind of phantom area to check search results. As this area is not present in `context.screen.areas` it was resulting in the error below.
2) After 949a2bb search in scene properties was limited to currently selected tab. Given the amount of tools we have in properties and native blender approach for searching across all available sections in properties, it seems reasonable to make search work across all tabs.
Console error was:
The error was
Python: Traceback (most recent call last):
File "\3.6\scripts\addons\blenderbim\bim\ui.py", line 281, in draw
aprops = context.screen.BIMAreaProperties[context.screen.areas[:].index(context.area)]
ValueError: bpy.data.screens['Layout.001']...Area is not in list
This commit is contained in:
@@ -167,8 +167,8 @@ class BIM_PT_drawings(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
aprops = context.screen.BIMAreaProperties[context.screen.areas[:].index(context.area)]
|
||||
return aprops.tab == "DRAWINGS" and tool.Ifc.get()
|
||||
aprops = tool.Blender.get_area_properties(context)
|
||||
return (aprops.tab == "DRAWINGS" or context.area.spaces.active.search_filter) and tool.Ifc.get()
|
||||
|
||||
def draw(self, context):
|
||||
if not DrawingsData.is_loaded:
|
||||
@@ -236,8 +236,8 @@ class BIM_PT_schedules(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
aprops = context.screen.BIMAreaProperties[context.screen.areas[:].index(context.area)]
|
||||
return aprops.tab == "DRAWINGS" and tool.Ifc.get()
|
||||
aprops = tool.Blender.get_area_properties(context)
|
||||
return (aprops.tab == "DRAWINGS" or context.area.spaces.active.search_filter) and tool.Ifc.get()
|
||||
|
||||
def draw(self, context):
|
||||
if not DocumentsData.is_loaded:
|
||||
@@ -292,8 +292,8 @@ class BIM_PT_references(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
aprops = context.screen.BIMAreaProperties[context.screen.areas[:].index(context.area)]
|
||||
return aprops.tab == "DRAWINGS" and tool.Ifc.get()
|
||||
aprops = tool.Blender.get_area_properties(context)
|
||||
return (aprops.tab == "DRAWINGS" or context.area.spaces.active.search_filter) and tool.Ifc.get()
|
||||
|
||||
def draw(self, context):
|
||||
if not DocumentsData.is_loaded:
|
||||
@@ -337,8 +337,8 @@ class BIM_PT_sheets(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
aprops = context.screen.BIMAreaProperties[context.screen.areas[:].index(context.area)]
|
||||
return aprops.tab == "DRAWINGS" and tool.Ifc.get()
|
||||
aprops = tool.Blender.get_area_properties(context)
|
||||
return (aprops.tab == "DRAWINGS" or context.area.spaces.active.search_filter) and tool.Ifc.get()
|
||||
|
||||
def draw(self, context):
|
||||
if not SheetsData.is_loaded:
|
||||
|
||||
Reference in New Issue
Block a user