Adding new object to RigidBodyWorld obgroup is not a good way to do that, since it only
takes effect (create rigid_body for new objects) when you change current frame.
Better to use rigidbody.object_add() operator here!
A logic error meant that the wrong "previous rotation" values were being used
when decomposing the rigidbody results back to transform channels. Instead of
using the previous values for the object in question, it was actually using
the rotation value of the previous object that was evaluated.
Previously it wasn't clear what it was supposed to be doing, or what was
required for it to work.
TODO: figure out why the operator redo settings panel won't work. The workflow
here is still a bit clunky.
Also generate rigid body constraint types in py bullet code from RNA enum values (simpler than having to sync the code when something is changed here!).
Side note: RNA API about icons still needs to expose icons for enum values, and conversion funcs between icon_name and icon_value!
Now all add/remove operators for rigid body objects and constraints
automatically add objects to the appropriate groups and create groups if they
don't exist yet.
This makes handling rigid bodies easier but doesn't take away functionality.
If users want to handle groups manually they just need to create them before
adding any objects.
The previous behaviour was confusing and was even considered to be a bug since
clicking on rigid body in the physics tab seemed to do nothing.
Behaves like the generic constraint but has optional spring on each axis.
TODO: Add option to set rest length.
Patch by Markus Kasten (markus111), thanks!
Constraints connect two rigid bodies.
Depending on which constraint is used different degrees of freedom
are limited, e.g. a hinge constraint only allows the objects to rotate
around a common axis.
Constraints are implemented as individual objects and bahave similar to
rigid bodies in terms of adding/removing/validating.
The position and orientation of the constraint object is the pivot point
of the constraint.
Constraints have their own group in the rigid body world.
To make connecting rigid bodies easier, there is a "Connect" operator that
creates an empty objects with a rigid body constraint connecting the selected
objects to active.
Currently the following constraints are implemented:
* Fixed
* Point
* Hinge
* Slider
* Piston
* Generic
Note: constraint limits aren't animatable yet).