mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Minor fix
This commit is contained in:
@@ -672,7 +672,7 @@ class LinkIfc(bpy.types.Operator):
|
||||
use_relative_path: bpy.props.BoolProperty(name="Use Relative Path", default=False)
|
||||
|
||||
def execute(self, context):
|
||||
files = [self.filepath] if self.filepath else [f.name for f in self.files]
|
||||
files = [f.name for f in self.files] if self.files else [self.filepath]
|
||||
for filename in files:
|
||||
filepath = os.path.join(self.directory, filename)
|
||||
new = context.scene.BIMProjectProperties.links.add()
|
||||
|
||||
@@ -83,6 +83,8 @@ class SelectGlobalId(Operator):
|
||||
global_id = self.global_id or props.global_id
|
||||
entity = ifc_file.by_guid(global_id)
|
||||
obj = tool.Ifc.get_object(entity)
|
||||
if not obj:
|
||||
self.report({"ERROR"}, "No object found")
|
||||
obj.select_set(True)
|
||||
bpy.context.view_layer.objects.active = obj
|
||||
return {"FINISHED"}
|
||||
|
||||
Reference in New Issue
Block a user