You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localspr=app.activeSpriteifnotsprthenreturnendspr.events:on("change", function()
-- The problem here is that the change event can be received from a-- "undo" command, so we are modifying the sprite while we're undoing-- somethingspr:newLayer()
app.refresh()
end)
The issue is that we're listening the "change" event and modifying the sprite on this event can change it when we're undoing another command (undo/redo call the change event too).
The text was updated successfully, but these errors were encountered:
In this way we can know if the event was generated from a
undo/redo/undo history change and not from the direct user
manipulation of the sprite.
Useful for scripts like in aseprite#3539
Source: https://community.aseprite.org/t/undo-crashes-aseprite-when-using-my-script/15828
Crash:
Maybe related to this Sentry crash: https://sentry.io/share/issue/ed018013bd024f3bb4647f59649b7648/ (and probable other crashes)
The script can be reduced to:
The issue is that we're listening the "change" event and modifying the sprite on this event can change it when we're undoing another command (undo/redo call the change event too).
The text was updated successfully, but these errors were encountered: