There is some more script around this, but the essence should be this:
filepath = cwd+"/Scenes/Assets/"+l[0:len(l)-1]+".blend"
group_name = "Asset"
with bpy.data.libraries.load(filepath, link=True) as (data_src, data_dst):
data_dst.groups = [group_name]
for o in data_dst.groups[0].objects:
newobjname = l[0:len(l)-1]
for n in chk:
if n == newobjname:
newobjname = newobjname+"_"
chk.append(newobjname)
o.name = newobjname
bpy.context.scene.objects.link(o)
objects = bpy.context.scene.objects
objects.active = objects[o.name]
bpy.ops.object.proxy_make()
bpy.context.scene.update()
For some reason, when the whole thing is linked in and proxied, the mirror modifier disappears on my rig and the parenting goes from “to armature” to “to object”, meaning there is no actual rigging. What’s going on here???