1
$\begingroup$

I got a scene width lots of small objects (around 2000 icospheres). I need to be able adjust rigid body settings for all those 2000 icospheres Any idea on how to do that (perhaps by the use of python, but how ?)

$\endgroup$
2
$\begingroup$

Well it was easier then i thought it would be.
I created one example object and named it LikeMe, there i set all rigid body options. Then since all target objects have similair names (alls starting width Icosphere added a * at the end and did a select pattern, finalized width a copy of rigid body settings

import bpy
scene = bpy.context.scene
scene.objects.active = bpy.data.objects["LikeMe"]
bpy.ops.object.select_pattern(pattern="Icosphere*", case_sensitive=True)
bpy.ops.rigidbody.object_settings_copy()
$\endgroup$
  • $\begingroup$ The object_settings_copy that does the work is already easily available in the toolshelf. You can find it in the Physics tab "Copy From Active" button. $\endgroup$ – sambler Apr 20 '18 at 18:04
1
$\begingroup$

Glad you found a solution on your own, there's one more way to do it that does not require coding. Just select all the rigidbodies you have, making sure source object is selected last (so it is set as active). Now press Space and start typing in "Copy Rigid Body Settings".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.