mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 06:58:56 +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)
|
use_relative_path: bpy.props.BoolProperty(name="Use Relative Path", default=False)
|
||||||
|
|
||||||
def execute(self, context):
|
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:
|
for filename in files:
|
||||||
filepath = os.path.join(self.directory, filename)
|
filepath = os.path.join(self.directory, filename)
|
||||||
new = context.scene.BIMProjectProperties.links.add()
|
new = context.scene.BIMProjectProperties.links.add()
|
||||||
|
|||||||
@@ -83,6 +83,8 @@ class SelectGlobalId(Operator):
|
|||||||
global_id = self.global_id or props.global_id
|
global_id = self.global_id or props.global_id
|
||||||
entity = ifc_file.by_guid(global_id)
|
entity = ifc_file.by_guid(global_id)
|
||||||
obj = tool.Ifc.get_object(entity)
|
obj = tool.Ifc.get_object(entity)
|
||||||
|
if not obj:
|
||||||
|
self.report({"ERROR"}, "No object found")
|
||||||
obj.select_set(True)
|
obj.select_set(True)
|
||||||
bpy.context.view_layer.objects.active = obj
|
bpy.context.view_layer.objects.active = obj
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|||||||
Reference in New Issue
Block a user