Fix T55958: allow the user to select between spring and spring2.
[blender.git] / source / blender / makesdna / DNA_rigidbody_types.h
index 1cd3a22fbe0b02883c9bc36e8df208f99f53c376..19e49644816d14c254d942fc6f42dd8eec41d3e7 100644 (file)
@@ -203,7 +203,8 @@ typedef struct RigidBodyCon {
        int flag;                                       /* (eRigidBodyCon_Flag) */
 
        float breaking_threshold;       /* breaking impulse threshold */
        int flag;                                       /* (eRigidBodyCon_Flag) */
 
        float breaking_threshold;       /* breaking impulse threshold */
-       float pad;
+       char spring_type;               /* spring implementation to use */
+       char pad[3];
 
        /* limits */
        /* translation limits */
 
        /* limits */
        /* translation limits */
@@ -273,9 +274,15 @@ typedef enum eRigidBodyCon_Type {
        /* Simplified spring constraint with only once axis that's automatically placed between the connected bodies */
        RBC_TYPE_SPRING,
        /* dirves bodies by applying linear and angular forces */
        /* Simplified spring constraint with only once axis that's automatically placed between the connected bodies */
        RBC_TYPE_SPRING,
        /* dirves bodies by applying linear and angular forces */
-       RBC_TYPE_MOTOR
+       RBC_TYPE_MOTOR,
 } eRigidBodyCon_Type;
 
 } eRigidBodyCon_Type;
 
+/* Spring implementation type for RigidBodyOb */
+typedef enum eRigidBodyCon_SpringType {
+       RBC_SPRING_TYPE1 = 0,   /* btGeneric6DofSpringConstraint */
+       RBC_SPRING_TYPE2,       /* btGeneric6DofSpring2Constraint */
+} eRigidBodyCon_SpringType;
+
 /* Flags for RigidBodyCon */
 typedef enum eRigidBodyCon_Flag {
        /* constraint influences rigid body motion */
 /* Flags for RigidBodyCon */
 typedef enum eRigidBodyCon_Flag {
        /* constraint influences rigid body motion */