1
$\begingroup$

I have a script that creates a group hierarchy. In this hierarchy it is necessary to decompose links. All I managed to do was find this command: obj = bpy.context.active_object

bpy.data.collections['tube'].objects.link(obj) it makes the object dependent on the collection but does not completely transfer my object.

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ You need to unlink it from the original collection $\endgroup$ Commented Jun 15, 2022 at 16:35
  • $\begingroup$ There's no such thing as "completely transferred" because an object can be part of multiple collections. In your case the object "_tube" is part of the "space" and "tube" collection. If you want to remove it from the "space" collection you can use bpy.data.collections['space'].objects.unlink(obj) $\endgroup$
    – Harry McKenzie
    Commented Jun 15, 2022 at 23:52

0

You must log in to answer this question.

Browse other questions tagged .