diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py index e4e5b94407d..a49c6d623ca 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py @@ -51,11 +51,12 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa layout.prop(rbc, "object1") layout.prop(rbc, "object2") - row = layout.row() - row.prop(rbc, "use_breaking") - sub = row.row() - sub.active = rbc.use_breaking - sub.prop(rbc, "breaking_threshold", text="Threshold") + if rbc.type != 'MOTOR': + row = layout.row() + row.prop(rbc, "use_breaking") + sub = row.row() + sub.active = rbc.use_breaking + sub.prop(rbc, "breaking_threshold", text="Threshold") row = layout.row() row.prop(rbc, "override_solver_iterations", text="Override Iterations") @@ -113,6 +114,30 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa sub.prop(rbc, "limit_ang_x_lower", text="Lower") sub.prop(rbc, "limit_ang_x_upper", text="Upper") + elif rbc.type == 'MOTOR': + col = layout.column(align=True) + col.label("Linear motor:") + + row = col.row() + sub = row.row() + sub.scale_x = 0.5 + sub.prop(rbc, "use_motor_lin", toggle=True, text="Enable") + sub = row.row() + sub.active = rbc.use_motor_lin + sub.prop(rbc, "motor_lin_target_velocity", text="Target Velocity") + sub.prop(rbc, "motor_lin_max_impulse", text="Max Impulse") + + col.label("Angular motor:") + + row = col.row() + sub = row.row() + sub.scale_x = 0.5 + sub.prop(rbc, "use_motor_ang", toggle=True, text="Enable") + sub = row.row() + sub.active = rbc.use_motor_ang + sub.prop(rbc, "motor_ang_target_velocity", text="Target Velocity") + sub.prop(rbc, "motor_ang_max_impulse", text="Max Impulse") + elif rbc.type in {'GENERIC', 'GENERIC_SPRING'}: col = layout.column(align=True) col.label("Limits:") |