# 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?

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')


bpy.data.cache_files.items()

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

cache_file.object_paths.keys()