Fix T55958: allow the user to select between spring and spring2.

The old springs with damping 1.0 operate in a special way that
is more similar to plastic deformation than a spring. Some users
rely on that, so let the user choose which implementation to use.
This also restores full backward compatibility with 2.79.

Reviewers: sergof

Differential Revision: https://developer.blender.org/D3544
This commit is contained in:
Alexander Gavrilov
2018-07-14 17:01:02 +03:00
parent 4d978cc2e4
commit ec640510a8
6 changed files with 181 additions and 67 deletions

View File

@@ -140,6 +140,11 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa
sub.prop(rbc, "motor_ang_max_impulse", text="Max Impulse")
elif rbc.type in {'GENERIC', 'GENERIC_SPRING'}:
if rbc.type == 'GENERIC_SPRING':
row = layout.row()
row.label("Spring Type:")
row.prop(rbc, "spring_type", text="")
col = layout.column(align=True)
col.label("Limits:")