# how to know what has been imported after alembic import

I am importing an abc file like so:

bpy.ops.wm.alembic_import(filepath="myabc.abc")

But I want to then get what I have imported and do stuff with it. I dont know whats in the file in advance - how can I find out what nodes I have just imported?

## 1 Answer

Right after you perform the import alembic operation, all the objects that are imported are selected in the viewport. So you can use the following code to get access to them

bpy.context.selected_objects


Then you can perform operations such as grouping them logically as below

bpy.ops.group.create(name='test1')


Additionally, you also have access to cache files

bpy.data.cache_files.items()


Assuming you have loaded an alembic file (test2.abc) containing a cube and sphere, you can get to their object paths using

cache_file = bpy.data.cache_files['test2.abc']


Now we can get access to all the objects paths loaded

cache_file.object_paths.keys()