Replace functionally opaque Viscous Pause with functionally transparent "Viscous posing mode" toggle.
PiperOrigin-RevId: 946298154 Change-Id: Ia06dd6346ac1002000f2d0b1cf9498ffb0d5f8bd
This commit is contained in:
committed by
Copybara-Service
parent
94132c75c7
commit
fbf031a7d5
@@ -157,8 +157,15 @@ def handle_step_control_keyboard_events(
|
||||
|
||||
pressed = imgui.IsKeyChordPressed
|
||||
|
||||
if pressed(imgui.Key.Space):
|
||||
if step_control.get_pause_state() == sim.PauseState.UNPAUSED:
|
||||
if pressed(int(imgui.Key.Ctrl) | int(imgui.Key.Space)):
|
||||
if step_control.get_pause_state() == sim.PauseState.VISCOUS_PAUSED:
|
||||
step_control.set_pause_state(sim.PauseState.UNPAUSED)
|
||||
else:
|
||||
step_control.set_pause_state(sim.PauseState.VISCOUS_PAUSED)
|
||||
return True
|
||||
elif pressed(imgui.Key.Space):
|
||||
pause = step_control.get_pause_state()
|
||||
if pause in (sim.PauseState.VISCOUS_PAUSED, sim.PauseState.UNPAUSED):
|
||||
step_control.set_pause_state(sim.PauseState.NORMAL_PAUSED)
|
||||
else:
|
||||
step_control.set_pause_state(sim.PauseState.UNPAUSED)
|
||||
|
||||
Reference in New Issue
Block a user