This commit is contained in:
Massimo Fabbro
2023-02-12 14:09:33 +01:00
committed by GitHub
parent 74de7436b7
commit 145ac1a0f4
@@ -527,7 +527,11 @@ class FilterModelElements(Operator):
selection += "[" selection += "["
if f.selector == "IfcPropertySet": if f.selector == "IfcPropertySet":
selection += f'{f.active_option.split(": ")[1]}.{f.active_sub_option.split(": ")[1]} {"!" if f.negation else ""}{comparison_operator} "{f.value}"' selection += f'{f.active_option.split(": ")[1]}.{f.active_sub_option.split(": ")[1]} {"!" if f.negation else ""}{comparison_operator}'
if (f.value == "True" or f.value == "False"):
selection += f' {f.value}'
else:
selection += f' "{f.value}"'
elif f.selector == "Attribute": elif f.selector == "Attribute":
# we're using the prop_search functionality in blender which returns the index of the option. Sometimes the user can override this and enter a value that doesn't exist in the list. In this case there is no index and we need to handle it. @vulevukusej # we're using the prop_search functionality in blender which returns the index of the option. Sometimes the user can override this and enter a value that doesn't exist in the list. In this case there is no index and we need to handle it. @vulevukusej
pattern = re.compile(r'^[0-9]+:') pattern = re.compile(r'^[0-9]+:')