Merge branch 'v0.6.0' of github.com:IfcOpenShell/IfcOpenShell into v0.6.0

This commit is contained in:
QwiglyDee
2020-12-26 23:26:00 +07:00
2 changed files with 22 additions and 34 deletions
+8 -2
View File
@@ -19,9 +19,15 @@ class SvIfcGetAttribute(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper
self.outputs.new("SvStringsSocket", "value")
def process(self):
self.sv_input_names = ["entity", "attribute_name"]
self.value_out = []
super().process()
entity_nested_inputs = self.inputs["entity"].sv_get()
attribute_name = self.inputs["attribute_name"].sv_get()[0][0]
for entities in entity_nested_inputs:
if hasattr(entities, "__iter__"):
for entity in entities:
self.process_ifc(entity, attribute_name)
else:
self.process_ifc(entities, attribute_name)
self.outputs["value"].sv_set(self.value_out)
def process_ifc(self, entity, attribute_name):