mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-30 16:43:00 +00:00
Fix problem in getpsets(facet.py) and added descriptions to specifications (IfcTester)
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# 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/>.
|
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import bpy
|
import bpy
|
||||||
import time
|
import time
|
||||||
import tempfile
|
import tempfile
|
||||||
@@ -72,8 +72,10 @@ class ExecuteIfcTester(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
tool.Tester.report = report
|
tool.Tester.report = report
|
||||||
props.specifications.clear()
|
props.specifications.clear()
|
||||||
for spec in report:
|
for spec in report:
|
||||||
|
print(spec)
|
||||||
new_spec = props.specifications.add()
|
new_spec = props.specifications.add()
|
||||||
new_spec.name = spec["name"]
|
new_spec.name = spec["name"]
|
||||||
|
new_spec.description = spec["description"]
|
||||||
new_spec.status = spec["status"]
|
new_spec.status = spec["status"]
|
||||||
|
|
||||||
blenderbim.bim.handler.refresh_ui_data()
|
blenderbim.bim.handler.refresh_ui_data()
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ def update_active_specification_index(self, context):
|
|||||||
|
|
||||||
class Specification(PropertyGroup):
|
class Specification(PropertyGroup):
|
||||||
name: StringProperty(name="Name")
|
name: StringProperty(name="Name")
|
||||||
|
description: StringProperty(name="Description")
|
||||||
status: BoolProperty(default=False, name="Status")
|
status: BoolProperty(default=False, name="Status")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -107,8 +107,9 @@ class BIM_PT_tester(Panel):
|
|||||||
class BIM_UL_tester_specifications(UIList):
|
class BIM_UL_tester_specifications(UIList):
|
||||||
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
|
def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
|
||||||
if item:
|
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.name, icon="CHECKMARK" if item.status else "CANCEL")
|
||||||
|
row.label(text=item.description)
|
||||||
|
|
||||||
|
|
||||||
class BIM_UL_tester_failed_entities(UIList):
|
class BIM_UL_tester_failed_entities(UIList):
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ def get_pset(element, pset):
|
|||||||
|
|
||||||
|
|
||||||
@lru_cache
|
@lru_cache
|
||||||
def get_psets(element, pset):
|
def get_psets(element):
|
||||||
return ifcopenshell.util.element.get_psets(element)
|
return ifcopenshell.util.element.get_psets(element)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user