mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-28 06:21:25 +00:00
Play subtags + repeat field by default to avoid surprises
If we start playing from a tag with a repeat field, we'll just play the tag as many times it says and continue with the regular animation of the sprite. Users expect the repeat field to be useful with the default configuration of the program.
This commit is contained in:
parent
63a387d804
commit
1f7f3677f2
@ -180,7 +180,7 @@
|
||||
<option id="straight_line_preview" type="bool" default="true" />
|
||||
<option id="play_once" type="bool" default="false" />
|
||||
<option id="play_all" type="bool" default="false" />
|
||||
<option id="play_subtags" type="bool" default="false" />
|
||||
<option id="play_subtags" type="bool" default="true" />
|
||||
<!-- TODO this would be nice to be "true" but we have to fix
|
||||
some performance issue rendering huge sprites with small
|
||||
zoom levels -->
|
||||
@ -212,7 +212,7 @@
|
||||
<section id="preview" text="Preview">
|
||||
<option id="play_once" type="bool" default="false" />
|
||||
<option id="play_all" type="bool" default="false" />
|
||||
<option id="play_subtags" type="bool" default="false" />
|
||||
<option id="play_subtags" type="bool" default="true" />
|
||||
</section>
|
||||
<section id="theme" text="Theme">
|
||||
<option id="selected" type="std::string" default=""default"" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2020-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2020-2023 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -66,12 +66,24 @@ void PlayState::onEnterState(Editor* editor)
|
||||
}
|
||||
|
||||
// Get the tag
|
||||
if (!m_playAll)
|
||||
if (!m_playAll) {
|
||||
m_tag = m_editor
|
||||
->getCustomizationDelegate()
|
||||
->getTagProvider()
|
||||
->getTagByFrame(m_refFrame, true);
|
||||
|
||||
// Don't repeat the tag infinitely if the tag repeat field doesn't
|
||||
// say so.
|
||||
if (m_playSubtags &&
|
||||
m_tag &&
|
||||
m_tag->repeat() != 0) {
|
||||
m_tag = nullptr;
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_tag = nullptr;
|
||||
}
|
||||
|
||||
// Go to the first frame of the animation or active frame tag
|
||||
if (m_playOnce) {
|
||||
frame_t frame = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user