netfox icon indicating copy to clipboard operation
netfox copied to clipboard

Add an `get_last_confirmed_context` API to `RewindableAction`

Open RickyYCheng opened this issue 4 months ago • 0 comments

:sparkles: Description

Can we add an API similar to get_last_confirmed_context to RewindableAction?

When has_confirmed() == true, there should be at least one active_tick.

has_confirmed is used in after_tick_loop, so it is typically employed to update visuals. In such cases, we may only need the last context. This way, there will be no need to record the tick when the context occurs.

Use case

This feature could improve this:

# in after_tick_loop callback

if onion_skin_emit_action.has_confirmed():
	var last_active_tick = onion_skin_emit_action._active_ticks.max()
	var texture = onion_skin_emit_action.get_context(last_active_tick)

Distribution

Where would this feature live?

  • In netfox core ( i.e. the netfox addon )

Notes

:)

RickyYCheng avatar Oct 09 '25 13:10 RickyYCheng