Merge pull request #3835 from c4rlosdias/v0.7.0

Fix problem in facets.py (IfcTester)
This commit is contained in:
Dion Moult
2023-10-05 11:39:47 +11:00
committed by GitHub
4 changed files with 7 additions and 3 deletions
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import os
import os
import bpy
import time
import tempfile
@@ -72,8 +72,10 @@ class ExecuteIfcTester(bpy.types.Operator, tool.Ifc.Operator):
tool.Tester.report = report
props.specifications.clear()
for spec in report:
print(spec)
new_spec = props.specifications.add()
new_spec.name = spec["name"]
new_spec.description = spec["description"]
new_spec.status = spec["status"]
blenderbim.bim.handler.refresh_ui_data()
@@ -37,6 +37,7 @@ def update_active_specification_index(self, context):
class Specification(PropertyGroup):
name: StringProperty(name="Name")
description: StringProperty(name="Description")
status: BoolProperty(default=False, name="Status")
@@ -107,8 +107,9 @@ class BIM_PT_tester(Panel):
class BIM_UL_tester_specifications(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
if item:
row = layout.row(align=True)
row = layout.split(factor=0.3, align=True)
row.label(text=item.name, icon="CHECKMARK" if item.status else "CANCEL")
row.label(text=item.description)
class BIM_UL_tester_failed_entities(UIList):
+1 -1
View File
@@ -48,7 +48,7 @@ def get_pset(element, pset):
@lru_cache
def get_psets(element, pset):
def get_psets(element):
return ifcopenshell.util.element.get_psets(element)