Add info message on paste

Original Blender `view3d.pastebuffer` had an info missing and it wasn't displayed in UI since it's coming from suboperator. New info message also mentions that objects were unlinked from IFC
This commit is contained in:
Andrej730
2025-02-11 12:48:17 +05:00
parent 9ea6a1fc75
commit 77c2e626b3
@@ -1853,13 +1853,15 @@ class OverridePasteBuffer(bpy.types.Operator):
def execute(self, context):
bpy.ops.view3d.pastebuffer()
for obj in context.selected_objects:
pasted_objects = context.selected_objects
for obj in pasted_objects:
# Pasted objects may come from another Blender session, or even
# from the same session where the original object has since
# been deleted. As the source element may not exist, paste will
# always unlink the element. If you want to duplicate an
# element, use the duplicate commands.
tool.Root.unlink_object(obj)
self.report({"INFO"}, f"{len(pasted_objects)} object(s) pasted and unlinked from IFC.")
return {"FINISHED"}