diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2016-11-07 12:56:58 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2016-11-07 12:59:12 +0300 |
commit | c8c7414c3f6768b5cb54d56ff7999d0a0ca22bc6 (patch) | |
tree | e61cded63fe3aea523671af91d17cf000fd94f0d /source/blender/makesdna/DNA_rigidbody_types.h | |
parent | dd921238d9223f550d3043313c9c38d07620de5d (diff) |
Expose Bullet rotational spring settings in the UI.
Bullet spring constraint already supports rotational springs, but
they are not exposed in blender UI, likely due to a simple oversight.
Supporting them is as simple as adding a few DNA/RNA properties
with appropriate UI and passing them on to Bullet.
Reviewers: sergof
Reviewed By: sergof
Differential Revision: https://developer.blender.org/D2331
Diffstat (limited to 'source/blender/makesdna/DNA_rigidbody_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_rigidbody_types.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_rigidbody_types.h b/source/blender/makesdna/DNA_rigidbody_types.h index 5d76ffe57b5..381ee5d40e5 100644 --- a/source/blender/makesdna/DNA_rigidbody_types.h +++ b/source/blender/makesdna/DNA_rigidbody_types.h @@ -226,10 +226,16 @@ typedef struct RigidBodyCon { float spring_stiffness_x; float spring_stiffness_y; float spring_stiffness_z; + float spring_stiffness_ang_x; + float spring_stiffness_ang_y; + float spring_stiffness_ang_z; /* amount of velocity lost over time */ float spring_damping_x; float spring_damping_y; float spring_damping_z; + float spring_damping_ang_x; + float spring_damping_ang_y; + float spring_damping_ang_z; /* motor settings */ float motor_lin_target_velocity; /* linear velocity the motor tries to hold */ @@ -295,7 +301,11 @@ typedef enum eRigidBodyCon_Flag { RBC_FLAG_USE_SPRING_Z = (1 << 13), /* motors */ RBC_FLAG_USE_MOTOR_LIN = (1 << 14), - RBC_FLAG_USE_MOTOR_ANG = (1 << 15) + RBC_FLAG_USE_MOTOR_ANG = (1 << 15), + /* angular springs */ + RBC_FLAG_USE_SPRING_ANG_X = (1 << 16), + RBC_FLAG_USE_SPRING_ANG_Y = (1 << 17), + RBC_FLAG_USE_SPRING_ANG_Z = (1 << 18) } eRigidBodyCon_Flag; /* ******************************** */ |