This allows moving rigid bodies on frame > startframe.
Also rigid bodies can now be picked up and trown around while the
simulation is running.
Note: There is a small glitch with cancelling tansform during simulation
but it's tricky to get rid of.
TODO: Avoid static-static collision warnings
* Code cleanup for new Rigid Body panels.
* Removed some unneeded split() calls.
* Remove redundant check for "ob.rigid_body_constraint" in the draw() function of the "Rigid Body Constraint" panel. The check is already made in the poll.
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).
Add operators to add/remove rigid body world and objects.
Add UI scripts.
The rigid body simulation works on scene level and overrides the
position/orientation of rigid bodies when active.
It does not deform meshes or generate data so there is no modifier.
Usage:
* Add rigid body world in the scene tab
* Create a group
* Add objects to the group
* Assign group to the rigid body world
* Play animation
For convenience the rigid body tools operators in the tools panel of the 3d view
will add a world, group and add objects to the group automatically so you only have
to press one button to add/remove rigid bodies to the simulation.
Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
Add read/write/interpolate functions.
In order to get rigid body point cache id from object it's now required to pass the
scene to BKE_ptcache_ids_from_object().
Rigid body cache is drawn in the orange color of the bullet logo.
Force fields work with rigid bodies just like they do with other simulations.
Increase min and max strength of force fields so they can influence heavy rigid
bodies.
TODO: Adjust force field strength based on the time step taken.
Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
This is just the basic structure, the simulation isn't hooked up yet.
Scenes get a pointer to a rigid body world that holds rigid body objects.
Objects get a pointer to a rigdid body object.
Both rigid body world and objects aren't used directly in the simulation
and only hold information to create the actual physics objects.
Physics objects are created when rigid body objects are validated.
In order to keep blender and bullet objects in sync care has to be taken
to either call appropriate set functions or flag objects for validation.
Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
It's mostly a C API for bullet that interfaces nicely with blender.
It could act as a generic interface for rigid body simulations but right
now it's very specific to bullet.
TODO: Fix building without bullet.
Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
mat4_decompose() is similar to mat4_to_loc_rot_size() but returns
rotation as quaternion.
mat4_to_loc_quat() just returns location and rotation without size.
officially - modifiers shouldn't calc other objects derived mesh, but in some cases its needed at the moment for certain scenes, so just disallow booleans depending on booleans.
- don't clamp if no empty groups are created
- no need to call ED_vgroup_data_create, this was very old code for weight paint r1596 - weight paint works without adding 'dvert'array.
removing non-GE supported features.
The idea of splitting the draw() function comes from Campbell Barton.
Review from him as well.
The main reason for not implement this in properties_games.py is to make sure the
panel is in the same order for both BI and BGE engines.
When you open a Blender window larger than a screen, Macs clip it to match the height,
but they allow the width to be more.
Problem is that this clipping happens after all window opening code. That causes
check for HiDPI mode to fail.
Now it checks it again on event GHOST_kEventWindowUpdate, which is only on startup.
Currently used special checks in DM draw code, perhaps better would be
simply to flush changes from PBVH to DM.
Anyway, now things seems to be working OK, will check on better solution
from code point of view later.
Own fault from grease pencil to curve enhacement. Fixed the bug itself, and made poll of convert operator more strict (no only active when there is something to convert, i.e. at least one stroke!).
This should not be needed, I really see no reason for this linking error, but I'd rather use this hack than wasting more time over this issue. When will we get rid of this "two build systems to maintain" time-wasting situation?