Commit Graph

7 Commits

Author SHA1 Message Date
Joshua Leung
67c2cd916d Made the tooltip for rigid body constraint "Connect" operator clearer
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.
2013-01-28 02:48:19 +00:00
Bastien Montagne
a2e55171fe Bunch of fixes for UI messages.
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!
2013-01-27 18:14:24 +00:00
Sergej Reich
204ec89bff rigidbody: Improve add/remove operators
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.
2013-01-25 06:26:38 +00:00
Campbell Barton
fd35d42bf4 code cleanup: dont use 'bpy.context' when 'context' is available 2013-01-23 07:52:31 +00:00
Sergej Reich
c48238fac6 rigidbody: Add generic spring constraint
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!
2013-01-23 05:57:01 +00:00
Sergej Reich
47c96081d0 rigidbody: Add rigid body constraints
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).
2013-01-23 05:56:56 +00:00
Sergej Reich
cdc8ed24bf rigidbody: Add "Copy Rigid Body Settings" and "Bake To Keyframes" operators
Based on a script by liero, thanks!
2013-01-23 05:56:49 +00:00