0
$\begingroup$

I'm trying to make a linked library into an instances with a override library so I can pose a linked character before i'm finished with it.

it used to work in 2.93, now I get a context polling error that doesn't care what window it's run in, or how I override it. anyone know a work around?

the code I want to run

instance = bpy.context.collection
bpy.ops.object.make_override_library(type='OVERRIDE_LIBRARY_CREATE_HIERARCHY', collection=instance)
$\endgroup$

1 Answer 1

0
$\begingroup$

my solution in case others hit the same issue:

scene = bpy.context.scene
view_layer = bpy.context.view_layer
coll = bpy.context.collection
coll_name = collection.name

bpy.data.collections[coll_name].override_hierarchy_create(scene=scene, view_layer=view_layer, reference=coll)
$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .