Some Blender2.49b changes

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
Post Reply
Kanttori
Posts: 38
Joined: Thu Jul 08, 2010 12:52 am

Some Blender2.49b changes

Post by Kanttori »

Hi!

I'm a newbie to blender/bullet coding, but I there was stuff I needed so I played around with the Blender code to be sure I could use blender effectively for my physics modeling (with the 2.49b code since the export-patch was for it).

I looked a bit at how Blender 2.49b uses the rigidbodyjoint constraints; their values were being moved "as is" when they should've been converted to radians, fixed it. ConeTwist wasn't visible in blender 2.49b, uncommented the line where it would've been added and changed the way ConeTwist's params are set in the gui (it's got a max only now, no disable/enable switch and no AngMins). Also added limit setting to hinge.

Issues:
- Are the extremeTwistX, extremeSwingY, extremeSwingZ max values okay at 180 degrees? (see source/blender/src/buttons_object.c)
- Blender issue: No input checks are done for the constraints in Blender (min > max is allowed and will disable the constraint for the axis).
- Bullet issue: Hinge-constraint doesn't have a setLimit(int limitIndex,btScalar limitValue) like conetwist does, so _biasFactor, _softness and _relaxationFactor get set to "defaults" when the limits are being set.

The patch attached is against a clean 2.49b (used the blenders repository to make it). It includes the bullet-export patch, my changes should be denoted by // Kanttori DEBUG and are in buttons_object.c, BL_BlenderDataConversion.cpp, CcdPhysicsEnvironment.cpp.
patchAgainstClean249b.zip
(4.11 KiB) Downloaded 471 times
Post Reply