WIP minor tweaks to port IfcSverchok. See #1222.

This commit is contained in:
Dion Moult
2021-01-23 18:42:11 +11:00
parent 8b7d96893f
commit 65f381a377
2 changed files with 6 additions and 4 deletions
+1 -2
View File
@@ -4,8 +4,7 @@ import ifcsverchok.helper
from bpy.props import StringProperty, EnumProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode
from blenderbim.bim import schema
from blenderbim.bim.prop import getIfcClasses, getIfcProducts, refreshClasses, refreshPredefinedTypes
from blenderbim.bim.module.root.prop import getIfcClasses, getIfcProducts, refreshClasses, refreshPredefinedTypes
class SvIfcByType(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
@@ -5,6 +5,7 @@ import ifcsverchok.helper
from bpy.props import StringProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode
from blenderbim.bim.ifc import IfcStore
class SvIfcSelectBlenderObjectsRefresh(bpy.types.Operator):
@@ -36,12 +37,14 @@ class SvIfcSelectBlenderObjects(bpy.types.Node, SverchCustomTreeNode, ifcsvercho
)
def process(self):
self.file = IfcStore.get_file()
self.sv_input_names = ["entities"]
self.guids = []
super().process()
for obj in bpy.context.visible_objects:
index = obj.BIMObjectProperties.attributes.find("GlobalId")
if index != -1 and obj.BIMObjectProperties.attributes[index].string_value in self.guids:
if not obj.BIMObjectProperties.ifc_definition_id:
continue
if self.file.by_id(obj.BIMObjectProperties.ifc_definition_id).GlobalId in self.guids:
obj.select_set(True)
def process_ifc(self, entities):