[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11918] branches/pyapi_devel: merge with trunk

Campbell Barton cbarton at metavr.com
Sun Sep 2 17:55:44 CEST 2007


Revision: 11918
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11918
Author:   campbellbarton
Date:     2007-09-02 17:55:43 +0200 (Sun, 02 Sep 2007)

Log Message:
-----------
merge with trunk

Modified Paths:
--------------
    branches/pyapi_devel/SConstruct
    branches/pyapi_devel/bin/.blender/locale/it/LC_MESSAGES/blender.mo
    branches/pyapi_devel/config/darwin-config.py
    branches/pyapi_devel/doc/blender-scons.txt
    branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
    branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.h
    branches/pyapi_devel/intern/bmfont/BMF_Api.h
    branches/pyapi_devel/intern/bmfont/intern/BMF_Api.cpp
    branches/pyapi_devel/intern/bmfont/intern/BMF_BitmapFont.cpp
    branches/pyapi_devel/intern/bmfont/intern/BMF_BitmapFont.h
    branches/pyapi_devel/intern/bsp/intern/BSP_CSGMesh_CFIterator.h
    branches/pyapi_devel/intern/elbeem/intern/isosurface.cpp
    branches/pyapi_devel/intern/elbeem/intern/simulation_object.cpp
    branches/pyapi_devel/intern/elbeem/intern/solver_class.h
    branches/pyapi_devel/intern/elbeem/intern/solver_interface.cpp
    branches/pyapi_devel/intern/elbeem/intern/solver_main.cpp
    branches/pyapi_devel/intern/elbeem/intern/utilities.h
    branches/pyapi_devel/intern/ghost/intern/GHOST_DisplayManager.cpp
    branches/pyapi_devel/intern/ghost/intern/GHOST_WindowX11.cpp
    branches/pyapi_devel/intern/iksolver/intern/IK_QJacobianSolver.cpp
    branches/pyapi_devel/intern/string/intern/STR_String.cpp
    branches/pyapi_devel/po/Makefile
    branches/pyapi_devel/po/it.po
    branches/pyapi_devel/projectfiles_vc7/blender/ftfont/FTF_ftfont.vcproj
    branches/pyapi_devel/projectfiles_vc7/blender/nodes/nodes.vcproj
    branches/pyapi_devel/release/datafiles/blenderbuttons
    branches/pyapi_devel/release/scripts/ac3d_import.py
    branches/pyapi_devel/release/scripts/bpymodules/BPyMesh.py
    branches/pyapi_devel/release/scripts/bpymodules/BPyObject.py
    branches/pyapi_devel/release/scripts/bpymodules/colladaImEx/collada.py
    branches/pyapi_devel/release/scripts/bpymodules/colladaImEx/cstartup.py
    branches/pyapi_devel/release/scripts/bpymodules/colladaImEx/cutils.py
    branches/pyapi_devel/release/scripts/bpymodules/colladaImEx/helperObjects.py
    branches/pyapi_devel/release/scripts/bpymodules/colladaImEx/translator.py
    branches/pyapi_devel/release/scripts/bpymodules/colladaImEx/xmlUtils.py
    branches/pyapi_devel/release/scripts/colladaExport14.py
    branches/pyapi_devel/release/scripts/colladaImport14.py
    branches/pyapi_devel/release/scripts/console.py
    branches/pyapi_devel/release/scripts/export_fbx.py
    branches/pyapi_devel/release/scripts/export_obj.py
    branches/pyapi_devel/release/scripts/mesh_unfolder.py
    branches/pyapi_devel/release/scripts/ply_import.py
    branches/pyapi_devel/release/scripts/scripttemplate_pyconstraint.py
    branches/pyapi_devel/release/scripts/vertexpaint_selfshadow_ao.py
    branches/pyapi_devel/release/text/BlenderQuickStart.pdf
    branches/pyapi_devel/source/blender/blenkernel/BKE_bad_level_calls.h
    branches/pyapi_devel/source/blender/blenkernel/BKE_constraint.h
    branches/pyapi_devel/source/blender/blenkernel/BKE_deform.h
    branches/pyapi_devel/source/blender/blenkernel/BKE_key.h
    branches/pyapi_devel/source/blender/blenkernel/BKE_node.h
    branches/pyapi_devel/source/blender/blenkernel/BKE_object.h
    branches/pyapi_devel/source/blender/blenkernel/bad_level_call_stubs/Makefile
    branches/pyapi_devel/source/blender/blenkernel/bad_level_call_stubs/stubs.c
    branches/pyapi_devel/source/blender/blenkernel/intern/DerivedMesh.c
    branches/pyapi_devel/source/blender/blenkernel/intern/Makefile
    branches/pyapi_devel/source/blender/blenkernel/intern/action.c
    branches/pyapi_devel/source/blender/blenkernel/intern/anim.c
    branches/pyapi_devel/source/blender/blenkernel/intern/armature.c
    branches/pyapi_devel/source/blender/blenkernel/intern/constraint.c
    branches/pyapi_devel/source/blender/blenkernel/intern/curve.c
    branches/pyapi_devel/source/blender/blenkernel/intern/deform.c
    branches/pyapi_devel/source/blender/blenkernel/intern/depsgraph.c
    branches/pyapi_devel/source/blender/blenkernel/intern/exotic.c
    branches/pyapi_devel/source/blender/blenkernel/intern/image.c
    branches/pyapi_devel/source/blender/blenkernel/intern/ipo.c
    branches/pyapi_devel/source/blender/blenkernel/intern/key.c
    branches/pyapi_devel/source/blender/blenkernel/intern/modifier.c
    branches/pyapi_devel/source/blender/blenkernel/intern/node.c
    branches/pyapi_devel/source/blender/blenkernel/intern/object.c
    branches/pyapi_devel/source/blender/blenkernel/intern/softbody.c
    branches/pyapi_devel/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/pyapi_devel/source/blender/blenlib/intern/Makefile
    branches/pyapi_devel/source/blender/blenlib/intern/arithb.c
    branches/pyapi_devel/source/blender/blenloader/intern/Makefile
    branches/pyapi_devel/source/blender/blenloader/intern/readfile.c
    branches/pyapi_devel/source/blender/blenloader/intern/writefile.c
    branches/pyapi_devel/source/blender/blenpluginapi/intern/Makefile
    branches/pyapi_devel/source/blender/ftfont/CMakeLists.txt
    branches/pyapi_devel/source/blender/ftfont/FTF_Api.h
    branches/pyapi_devel/source/blender/ftfont/intern/FTF_TTFont.h
    branches/pyapi_devel/source/blender/ftfont/intern/Makefile
    branches/pyapi_devel/source/blender/imbuf/intern/Makefile
    branches/pyapi_devel/source/blender/imbuf/intern/cineon/Makefile
    branches/pyapi_devel/source/blender/imbuf/intern/dds/Makefile
    branches/pyapi_devel/source/blender/imbuf/intern/openexr/Makefile
    branches/pyapi_devel/source/blender/include/BDR_drawmesh.h
    branches/pyapi_devel/source/blender/include/BIF_editaction.h
    branches/pyapi_devel/source/blender/include/BIF_editarmature.h
    branches/pyapi_devel/source/blender/include/BIF_interface.h
    branches/pyapi_devel/source/blender/include/BIF_language.h
    branches/pyapi_devel/source/blender/include/BIF_transform.h
    branches/pyapi_devel/source/blender/include/BSE_editipo.h
    branches/pyapi_devel/source/blender/include/BSE_node.h
    branches/pyapi_devel/source/blender/include/blendef.h
    branches/pyapi_devel/source/blender/include/butspace.h
    branches/pyapi_devel/source/blender/include/multires.h
    branches/pyapi_devel/source/blender/include/transform.h
    branches/pyapi_devel/source/blender/makesdna/DNA_action_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_curve_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_object_types.h
    branches/pyapi_devel/source/blender/makesdna/DNA_sequence_types.h
    branches/pyapi_devel/source/blender/makesdna/intern/Makefile
    branches/pyapi_devel/source/blender/nodes/SHD_node.h
    branches/pyapi_devel/source/blender/nodes/intern/CMP_nodes/Makefile
    branches/pyapi_devel/source/blender/nodes/intern/Makefile
    branches/pyapi_devel/source/blender/nodes/intern/SHD_nodes/Makefile
    branches/pyapi_devel/source/blender/radiosity/intern/source/Makefile
    branches/pyapi_devel/source/blender/readblenfile/intern/Makefile
    branches/pyapi_devel/source/blender/readblenfile/stub/Makefile
    branches/pyapi_devel/source/blender/readblenfile/test/Makefile
    branches/pyapi_devel/source/blender/render/intern/source/Makefile
    branches/pyapi_devel/source/blender/render/intern/source/convertblender.c
    branches/pyapi_devel/source/blender/render/intern/source/shadeoutput.c
    branches/pyapi_devel/source/blender/src/Makefile
    branches/pyapi_devel/source/blender/src/blenderbuttons.c
    branches/pyapi_devel/source/blender/src/buttons_editing.c
    branches/pyapi_devel/source/blender/src/buttons_object.c
    branches/pyapi_devel/source/blender/src/buttons_shading.c
    branches/pyapi_devel/source/blender/src/drawaction.c
    branches/pyapi_devel/source/blender/src/drawarmature.c
    branches/pyapi_devel/source/blender/src/drawimage.c
    branches/pyapi_devel/source/blender/src/drawipo.c
    branches/pyapi_devel/source/blender/src/drawmesh.c
    branches/pyapi_devel/source/blender/src/drawnode.c
    branches/pyapi_devel/source/blender/src/drawobject.c
    branches/pyapi_devel/source/blender/src/drawseq.c
    branches/pyapi_devel/source/blender/src/drawtime.c
    branches/pyapi_devel/source/blender/src/drawview.c
    branches/pyapi_devel/source/blender/src/edit.c
    branches/pyapi_devel/source/blender/src/editaction.c
    branches/pyapi_devel/source/blender/src/editarmature.c
    branches/pyapi_devel/source/blender/src/editconstraint.c
    branches/pyapi_devel/source/blender/src/editface.c
    branches/pyapi_devel/source/blender/src/editipo.c
    branches/pyapi_devel/source/blender/src/editipo_lib.c
    branches/pyapi_devel/source/blender/src/editipo_mods.c
    branches/pyapi_devel/source/blender/src/editkey.c
    branches/pyapi_devel/source/blender/src/editmesh_mods.c
    branches/pyapi_devel/source/blender/src/editmesh_tools.c
    branches/pyapi_devel/source/blender/src/editnode.c
    branches/pyapi_devel/source/blender/src/editobject.c
    branches/pyapi_devel/source/blender/src/editscreen.c
    branches/pyapi_devel/source/blender/src/editseq.c
    branches/pyapi_devel/source/blender/src/edittime.c
    branches/pyapi_devel/source/blender/src/header_action.c
    branches/pyapi_devel/source/blender/src/header_info.c
    branches/pyapi_devel/source/blender/src/header_ipo.c
    branches/pyapi_devel/source/blender/src/header_view3d.c
    branches/pyapi_devel/source/blender/src/headerbuttons.c
    branches/pyapi_devel/source/blender/src/interface.c
    branches/pyapi_devel/source/blender/src/language.c
    branches/pyapi_devel/source/blender/src/multires.c
    branches/pyapi_devel/source/blender/src/outliner.c
    branches/pyapi_devel/source/blender/src/sculptmode.c
    branches/pyapi_devel/source/blender/src/seqeffects.c
    branches/pyapi_devel/source/blender/src/sequence.c
    branches/pyapi_devel/source/blender/src/space.c
    branches/pyapi_devel/source/blender/src/toolbox.c
    branches/pyapi_devel/source/blender/src/transform.c
    branches/pyapi_devel/source/blender/src/transform_conversions.c
    branches/pyapi_devel/source/blender/src/transform_generics.c
    branches/pyapi_devel/source/blender/src/vpaint.c
    branches/pyapi_devel/source/blender/verify/intern/Makefile
    branches/pyapi_devel/source/blender/yafray/intern/Makefile
    branches/pyapi_devel/source/creator/Makefile
    branches/pyapi_devel/source/creator/creator.c
    branches/pyapi_devel/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/pyapi_devel/source/kernel/gen_messaging/intern/Makefile
    branches/pyapi_devel/source/nan_compile.mk
    branches/pyapi_devel/tools/Blender.py
    branches/pyapi_devel/tools/btools.py

Added Paths:
-----------
    branches/pyapi_devel/release/scripts/weightpaint_average.py
    branches/pyapi_devel/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c
    branches/pyapi_devel/source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c

Modified: branches/pyapi_devel/SConstruct
===================================================================
--- branches/pyapi_devel/SConstruct	2007-09-02 11:55:56 UTC (rev 11917)
+++ branches/pyapi_devel/SConstruct	2007-09-02 15:55:43 UTC (rev 11918)
@@ -241,13 +241,16 @@
     do_clean = True
 
 if not quickie and do_clean:
-    print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
-    dirs = os.listdir(B.root_build_dir)
-    for dir in dirs:
-        if os.path.isdir(B.root_build_dir + dir) == 1:
-            print "clean dir %s"%(B.root_build_dir+dir)
-            shutil.rmtree(B.root_build_dir+dir)
-    print B.bc.OKGREEN+'...done'+B.bc.ENDC
+    if os.path.exists(B.root_build_dir):
+        print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
+        dirs = os.listdir(B.root_build_dir)
+        for dir in dirs:
+            if os.path.isdir(B.root_build_dir + dir) == 1:
+                print "clean dir %s"%(B.root_build_dir+dir)
+                shutil.rmtree(B.root_build_dir+dir)
+        print B.bc.OKGREEN+'...done'+B.bc.ENDC
+    else:
+        print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
     Exit()
 
 if not os.path.isdir ( B.root_build_dir):
@@ -429,8 +432,10 @@
 Depends(nsiscmd, allinstall)
 
 Default(B.program_list)
-Default(installtarget)
 
+if not env['WITHOUT_BF_INSTALL']:
+	Default(installtarget)
+
 #------------ RELEASE
 # TODO: zipup the installation
 

Modified: branches/pyapi_devel/bin/.blender/locale/it/LC_MESSAGES/blender.mo
===================================================================
(Binary files differ)

Modified: branches/pyapi_devel/config/darwin-config.py
===================================================================
--- branches/pyapi_devel/config/darwin-config.py	2007-09-02 11:55:56 UTC (rev 11917)
+++ branches/pyapi_devel/config/darwin-config.py	2007-09-02 15:55:43 UTC (rev 11918)
@@ -48,9 +48,10 @@
 BF_FMOD = LIBDIR + '/fmod'
 
 WITH_BF_OPENEXR = 'true'
-BF_OPENEXR = '/usr/local'
-BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
+BF_OPENEXR = '${LCGDIR}/openexr'
+BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
 BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
+BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
 
 WITH_BF_DDS = 'true'
 

Modified: branches/pyapi_devel/doc/blender-scons.txt
===================================================================
--- branches/pyapi_devel/doc/blender-scons.txt	2007-09-02 11:55:56 UTC (rev 11917)
+++ branches/pyapi_devel/doc/blender-scons.txt	2007-09-02 15:55:43 UTC (rev 11918)
@@ -160,6 +160,17 @@
     for example, setting BF_QUICKDEBUG won't overwrite the contents of BF_DEBUG_LIBS.
 
 
+    Not installing
+    --------------
+
+    If you dont want to install the build result, you can use the following option either
+    on the commandline or in your user-config.py :
+
+        WITHOUT_BF_INSTALL='true'
+
+    by default, this is set to 'false', and so the build is installed
+
+
     Supported toolset
     -----------------
 

Modified: branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp
===================================================================
--- branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp	2007-09-02 11:55:56 UTC (rev 11917)
+++ branches/pyapi_devel/extern/bullet2/src/BulletDynamics/ConstraintSolver/btHingeConstraint.cpp	2007-09-02 15:55:43 UTC (rev 11918)
@@ -17,176 +17,58 @@
 #include "btHingeConstraint.h"
 #include "BulletDynamics/Dynamics/btRigidBody.h"
 #include "LinearMath/btTransformUtil.h"
-#include "LinearMath/btSimdMinMax.h"
 #include <new>
 
-
 btHingeConstraint::btHingeConstraint():
 m_enableAngularMotor(false)
 {
 }
 
 btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, const btVector3& pivotInA,const btVector3& pivotInB,
-									 btVector3& axisInA,btVector3& axisInB)
-									 :btTypedConstraint(rbA,rbB),
-									 m_angularOnly(false),
-									 m_enableAngularMotor(false)
+								 btVector3& axisInA,btVector3& axisInB)
+:btTypedConstraint(rbA,rbB),m_pivotInA(pivotInA),m_pivotInB(pivotInB),
+m_axisInA(axisInA),
+m_axisInB(-axisInB),
+m_angularOnly(false),
+m_enableAngularMotor(false)
 {
-	m_rbAFrame.getOrigin() = pivotInA;
-	
-	// since no frame is given, assume this to be zero angle and just pick rb transform axis
-	btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0);
-	btScalar projection = rbAxisA1.dot(axisInA);
-	if (projection > SIMD_EPSILON)
-		rbAxisA1 = rbAxisA1*projection - axisInA;
-	 else
-		rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1);
-	
-	btVector3 rbAxisA2 = rbAxisA1.cross(axisInA);
 
-	m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(),
-									rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
-									rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
-
-	btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
-	btVector3 rbAxisB1 =  quatRotate(rotationArc,rbAxisA1);
-	btVector3 rbAxisB2 =  rbAxisB1.cross(axisInB);
-	
-	
-	m_rbBFrame.getOrigin() = pivotInB;
-	m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),-axisInB.getX(),
-									rbAxisB1.getY(),rbAxisB2.getY(),-axisInB.getY(),
-									rbAxisB1.getZ(),rbAxisB2.getZ(),-axisInB.getZ() );
-	
-	//start with free
-	m_lowerLimit = btScalar(1e30);
-	m_upperLimit = btScalar(-1e30);
-	m_biasFactor = 0.3f;
-	m_relaxationFactor = 1.0f;
-	m_limitSoftness = 0.9f;
-	m_solveLimit = false;
-
 }
 
 
 btHingeConstraint::btHingeConstraint(btRigidBody& rbA,const btVector3& pivotInA,btVector3& axisInA)
-:btTypedConstraint(rbA), m_angularOnly(false), m_enableAngularMotor(false)
-{
-
-	// since no frame is given, assume this to be zero angle and just pick rb transform axis
-	// fixed axis in worldspace
-	btVector3 rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(0);
-	btScalar projection = rbAxisA1.dot(axisInA);
-	if (projection > SIMD_EPSILON)
-		rbAxisA1 = rbAxisA1*projection - axisInA;
-	else
-		rbAxisA1 = rbA.getCenterOfMassTransform().getBasis().getColumn(1);
-
-	btVector3 rbAxisA2 = axisInA.cross(rbAxisA1);
-
-	m_rbAFrame.getOrigin() = pivotInA;
-	m_rbAFrame.getBasis().setValue( rbAxisA1.getX(),rbAxisA2.getX(),axisInA.getX(),
-									rbAxisA1.getY(),rbAxisA2.getY(),axisInA.getY(),
-									rbAxisA1.getZ(),rbAxisA2.getZ(),axisInA.getZ() );
-
-
-	btVector3 axisInB = rbA.getCenterOfMassTransform().getBasis() * -axisInA;
-
-	btQuaternion rotationArc = shortestArcQuat(axisInA,axisInB);
-	btVector3 rbAxisB1 =  quatRotate(rotationArc,rbAxisA1);
-	btVector3 rbAxisB2 = axisInB.cross(rbAxisB1);
-
-
-	m_rbBFrame.getOrigin() = rbA.getCenterOfMassTransform()(pivotInA);
-	m_rbBFrame.getBasis().setValue( rbAxisB1.getX(),rbAxisB2.getX(),axisInB.getX(),
-									rbAxisB1.getY(),rbAxisB2.getY(),axisInB.getY(),
-									rbAxisB1.getZ(),rbAxisB2.getZ(),axisInB.getZ() );
-	
-	//start with free
-	m_lowerLimit = btScalar(1e30);
-	m_upperLimit = btScalar(-1e30);
-	m_biasFactor = 0.3f;
-	m_relaxationFactor = 1.0f;
-	m_limitSoftness = 0.9f;
-	m_solveLimit = false;
-}
-
-btHingeConstraint::btHingeConstraint(btRigidBody& rbA,btRigidBody& rbB, 
-								     const btTransform& rbAFrame, const btTransform& rbBFrame)
-:btTypedConstraint(rbA,rbB),m_rbAFrame(rbAFrame),m_rbBFrame(rbBFrame),
+:btTypedConstraint(rbA),m_pivotInA(pivotInA),m_pivotInB(rbA.getCenterOfMassTransform()(pivotInA)),
+m_axisInA(axisInA),
+//fixed axis in worldspace
+m_axisInB(rbA.getCenterOfMassTransform().getBasis() * -axisInA),
 m_angularOnly(false),
 m_enableAngularMotor(false)
 {
-	// flip axis
-	m_rbBFrame.getBasis()[2][0] *= btScalar(-1.);
-	m_rbBFrame.getBasis()[2][1] *= btScalar(-1.);
-	m_rbBFrame.getBasis()[2][2] *= btScalar(-1.);
-
-	//start with free
-	m_lowerLimit = btScalar(1e30);
-	m_upperLimit = btScalar(-1e30);
-	m_biasFactor = 0.3f;
-	m_relaxationFactor = 1.0f;
-	m_limitSoftness = 0.9f;
-	m_solveLimit = false;
-}			
-
-
-
-btHingeConstraint::btHingeConstraint(btRigidBody& rbA, const btTransform& rbAFrame)
-:btTypedConstraint(rbA),m_rbAFrame(rbAFrame),m_rbBFrame(rbAFrame),
-m_angularOnly(false),
-m_enableAngularMotor(false)
-{
-	// flip axis
-	m_rbBFrame.getBasis()[2][0] *= btScalar(-1.);
-	m_rbBFrame.getBasis()[2][1] *= btScalar(-1.);
-	m_rbBFrame.getBasis()[2][2] *= btScalar(-1.);
-
-
-	//start with free
-	m_lowerLimit = btScalar(1e30);
-	m_upperLimit = btScalar(-1e30);	
-	m_biasFactor = 0.3f;
-	m_relaxationFactor = 1.0f;
-	m_limitSoftness = 0.9f;
-	m_solveLimit = false;
+	
 }
 
 void	btHingeConstraint::buildJacobian()
 {
 	m_appliedImpulse = btScalar(0.);
 
+	btVector3	normal(0,0,0);
+
 	if (!m_angularOnly)
 	{
-		btVector3 pivotAInW = m_rbA.getCenterOfMassTransform()*m_rbAFrame.getOrigin();
-		btVector3 pivotBInW = m_rbB.getCenterOfMassTransform()*m_rbBFrame.getOrigin();
-		btVector3 relPos = pivotBInW - pivotAInW;
-
-		btVector3 normal[3];
-		if (relPos.length2() > SIMD_EPSILON)
-		{
-			normal[0] = relPos.normalized();
-		}
-		else
-		{
-			normal[0].setValue(btScalar(1.0),0,0);
-		}
-
-		btPlaneSpace1(normal[0], normal[1], normal[2]);
-
 		for (int i=0;i<3;i++)
 		{
+			normal[i] = 1;
 			new (&m_jac[i]) btJacobianEntry(
 				m_rbA.getCenterOfMassTransform().getBasis().transpose(),
 				m_rbB.getCenterOfMassTransform().getBasis().transpose(),
-				pivotAInW - m_rbA.getCenterOfMassPosition(),
-				pivotBInW - m_rbB.getCenterOfMassPosition(),
-				normal[i],
+				m_rbA.getCenterOfMassTransform()*m_pivotInA - m_rbA.getCenterOfMassPosition(),
+				m_rbB.getCenterOfMassTransform()*m_pivotInB - m_rbB.getCenterOfMassPosition(),
+				normal,
 				m_rbA.getInvInertiaDiagLocal(),
 				m_rbA.getInvMass(),
 				m_rbB.getInvInertiaDiagLocal(),
 				m_rbB.getInvMass());
+			normal[i] = 0;
 		}
 	}
 
@@ -197,12 +79,12 @@
 	btVector3 jointAxis0local;
 	btVector3 jointAxis1local;
 	
-	btPlaneSpace1(m_rbAFrame.getBasis().getColumn(2),jointAxis0local,jointAxis1local);
+	btPlaneSpace1(m_axisInA,jointAxis0local,jointAxis1local);
 
-	getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2);
+	getRigidBodyA().getCenterOfMassTransform().getBasis() * m_axisInA;
 	btVector3 jointAxis0 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis0local;
 	btVector3 jointAxis1 = getRigidBodyA().getCenterOfMassTransform().getBasis() * jointAxis1local;
-	btVector3 hingeAxisWorld = getRigidBodyA().getCenterOfMassTransform().getBasis() * m_rbAFrame.getBasis().getColumn(2);

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list