Library Import Group by Name

I’m trying to import objects from a .blend by specifying the group name. I have been unsuccessful using both the old and new (bpy) Library functionality.

I have a .blend that has objects grouped by name. My script needs to be able to append all items to the current scene based on the required group name. For example, if the required group is “A” the script needs to be able to attach the library .blend file and copy in all objects that belong to the group named “A.”

The API documentation shows how to import all objects, but searching the documentation yields no clue as to how to do so based on specific criteria. I’ve also looked through the script repositories looking for something that does something similar, but have come up empty.

My previous (related) post about importing objects with their hierarchies intact went unanswered. The good people on IRC were able to help by suggesting that importing groups would solve that. But so far I’ve been unable to specify a specific group (of objects) to append.

Hopefully this post will produce better results.


Once again the IRC channel comes through with the solution. Broken suggested I append the group itself. This works and brings in all the objects belonging to the requested group. I had been approaching the problem backwards; trying to import objects by testing what group they belonged to.

So the solution (in case anyone finds this thread while searching for a answers to this problem) is to append the group itself from the library .blend file.

thanks for sharing

hallo Skwerm, i’m dealing exactly with the same problem, but from what you say i can’t figure out the solution, could you please post a bit of code

thank you, bye