Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2007-01-19 06:14:51 +0300
committerErwin Coumans <blender@erwincoumans.com>2007-01-19 06:14:51 +0300
commit00e956477e32af21ce7386748c9d9eb8057e5454 (patch)
treee7dd1f72db1acf04a6fcf563c796acb4d40ce0ab /source/gameengine/Converter/BL_BlenderDataConversion.cpp
parenta78683f08e1abd00f59c80d4a01c2cbc8bbf84df (diff)
fix crash in constraint conversion, fix reference frame transformations for generic 6dof constraint
Diffstat (limited to 'source/gameengine/Converter/BL_BlenderDataConversion.cpp')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 86fc2267c64..bca2213fd73 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -2166,22 +2166,25 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
(float)axis1.x(),(float)axis1.y(),(float)axis1.z(),
(float)axis2.x(),(float)axis2.y(),(float)axis2.z()
);
- //if it is a generic 6DOF constraint, set all the limits accordingly
- if (dat->type == PHY_GENERIC_6DOF_CONSTRAINT)
+ if (constraintId)
{
- int dof;
- int dofbit=1;
- for (dof=0;dof<6;dof++)
+ //if it is a generic 6DOF constraint, set all the limits accordingly
+ if (dat->type == PHY_GENERIC_6DOF_CONSTRAINT)
{
- if (dat->flag & dofbit)
+ int dof;
+ int dofbit=1;
+ for (dof=0;dof<6;dof++)
{
- kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,dat->minLimit[dof],dat->maxLimit[dof]);
- } else
- {
- //minLimit > maxLimit means free(disabled limit) for this degree of freedom
- kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,1,-1);
+ if (dat->flag & dofbit)
+ {
+ kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,dat->minLimit[dof],dat->maxLimit[dof]);
+ } else
+ {
+ //minLimit > maxLimit means free(disabled limit) for this degree of freedom
+ kxscene->GetPhysicsEnvironment()->setConstraintParam(constraintId,dof,1,-1);
+ }
+ dofbit<<=1;
}
- dofbit<<=1;
}
}
}