From 70e38422d25a5aab233c5c5e8b59077b0ccffa6e Mon Sep 17 00:00:00 2001 From: Jens Ole Wund Date: Sat, 21 Nov 2009 22:45:25 +0000 Subject: new property for soft bodies sb->lcom : Center Of Mass .. might be used to create loc IPO sb_>lrot : is a matrix[3] esitmates the roatation in world coordinates .. might be used to create rot IPO sb_>lscale : is a matrix[3] esitmates the scaling in world coordinates .. might be used to create scale IPO (no python for that yet .. but may be matt has mercy on me ) can be cropped direclty in soft body module by function static void SB_estimate_transform(Object *ob,float lloc[3],float lrot[3][3],float lscale[3][3]) The targets lloc,lrot,lscale should work to be NULL, just in case you don't need it. However i'd prefer if they were accessed via properties which should be calculated automagically if sb->solverflags & SBSO_ESTIMATEIPO is set, like they do in draw_sb_motion(..) in drawobject.c added static void draw_sb_motion(Scene *scene, Object *ob) to drawobject.c for debuggering (had a hard time with destructive matrix operations ) if it causes any trouble with your build on any OS make sure to comment that away. softbody.c and DNA should compile fine in any case. --- source/blender/blenkernel/BKE_softbody.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_softbody.h') diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h index d8053281ceb..92cb5542ad1 100644 --- a/source/blender/blenkernel/BKE_softbody.h +++ b/source/blender/blenkernel/BKE_softbody.h @@ -68,5 +68,8 @@ extern void sbObjectToSoftbody(struct Object *ob); /* pass NULL to unlink again */ extern void sbSetInterruptCallBack(int (*f)(void)); +extern void SB_estimate_transform(Object *ob,float lloc[3],float lrot[3][3],float lscale[3][3]); + + #endif -- cgit v1.2.3