shteeve3d/blender-wiggle-2

Collision collection can not take sub-collections into account. (Blender 4.0.2)

Closed this issue · 2 comments

Would be a neat option to implement, now I have to reclutter my outliner into using a single collection for all my meshes in the meantime.

What I do: In Blender objects can be in multiple collections. So I make a 'COLLISION' collection add the collision objects to that that collection, leaving them in the meshes they are already in. You can add the current object to a 'COLLISION' collection (assuming you've already made one) with this Python code:

D.collections['COLLISION'].objects.link(C.active_object)

This is cleaner it than including sub-collections, because there will be cases where you don't want to include all subcollections (e.g. if a rig has different clothes in different subcollections), and the code to detect which subcollections are enabled or not (traversing viewlayers) while doable is painful and best avoided if you can. IME above solution is fine.

See that. Didn't realize you can link meshes to more than one collection, as I did experience ghost-collisions doing what I did before, due to example invisible custom shapes and such.

Saves me some future headache, appreciate you.