How can I add orphaned objects into a scene?

I appended an object, and then later removed it from the scene. It’s no longer in the outliner, but under the ‘Objects’ in the ‘Blender file’ section of the outliner window, I can see that object.

I can even use it to project textures the UV projection modifier, even though it’s not in any scene or collection in my file.

The only thing I worked out was that I could copy and past the data block over, but I just want the original object.

Here’s a blender file with the problem object; it’s called ‘CenterRef’.

PublicTroubleshoot_ObjectNotInScene.blend (785.3 KB)

See if you can get that empty into a scene.

Solved.

I was trying to add it back in via the blender file and data API list.

The issue is that adding orphan data back in requires you to go specifically into the ‘Orphan data’ list. But since having orphan data that you want restored is uncommon, so too is the help on the issue.

It’s a paper cut for the user, because they cannot do it from the blender file list, nor from the data-block list. We expect it to work there and when that fails, even if we find the orphaned data list, we are unlikely to try dragging it out from it failing in the other 2 lists.

That is because Blender provides an expectation from cross-function between different editors.

An example: You re-time animation in the dopesheet, action editor, graph editor and timeline.

I’m thinking, either the functionality of these lists should be merged with a filter for orphaned data, or the user should be able to drag data out in ALL those lists. If that’s not right, then at least make the option available in the right click context menu.

Someone raised the issue here:

https://developer.blender.org/T66086

But they merged it into a task where orphan data hasn’t been mentioned once:

https://developer.blender.org/T53662

-S

Hey Simon,

I just received a file from Sketchup and it’s importing all orphan meshes into Blender (maybe each edge is an individual mesh).

I’m wondering if you managed to place multiple Orphan Meshes at the same time into the Blender scene.

1 Like

Hey Rafael, sorry I missed this.

But the good news is I came up with a script which will do what you need it to do:

“”"
In Blender

For every mesh with no user:
assign object with the same name to the active scene

“”"
import bpy

for m in bpy.data.meshes:
if m.users == 0:
o = bpy.data.objects.new(m.name, m)
bpy.context.scene.collection.objects.link(o)

1 Like

Great news! Ill give it a try, hope it works for me as well! Thanks