0
$\begingroup$

i'd like to "append" a deleted objects that is stuck inside bpy.data.objects via python in the context scene, how to do so?

right now, i'm creating a new object and doing something like that

    stuck = bpy.data.objects['my_hidden_obj']

    bpy.ops.mesh.primitive_plane_add()
    New = bpy.context.object
    New.data = stuck.data
    New.name = stuck.name

but i'm almost sure there's a way better technique to do so ? correct ?

$\endgroup$

1 Answer 1

1
$\begingroup$

Link to collection

bpy.context.collection.objects.link(stuck)

or for < 2.8 link to scene

bpy.context.scene.objects.link(stuck)
$\endgroup$
1
  • $\begingroup$ of course ! linking to scene collection ! Thanks $\endgroup$
    – Fox
    Commented Jan 25, 2020 at 21:59

You must log in to answer this question.

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