mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix creating pset templates after 5e930972d6 #6017
This commit is contained in:
@@ -42,9 +42,7 @@ class AddPsetTemplateFile(bpy.types.Operator):
|
||||
|
||||
def execute(self, context):
|
||||
template = ifcopenshell.file()
|
||||
filepath = next(
|
||||
p for p in tool.Blender.get_data_dir_paths("pset", "*.ifc") if p.stem == self.new_template_filename
|
||||
).__str__()
|
||||
filepath = (tool.Blender.get_data_dir_path("pset") / self.new_template_filename).with_suffix(".ifc").__str__()
|
||||
|
||||
pset_template = ifcopenshell.api.run("pset_template.add_pset_template", template)
|
||||
ifcopenshell.api.run("pset_template.add_prop_template", template, pset_template=pset_template)
|
||||
|
||||
Reference in New Issue
Block a user