Layer frame depth: change a layer's draw order for part of an animation

Layer frames get an editor-only Depth (Frame Properties, property
copy/paste): +N draws that layer N layers above its place in the timeline
for that frame, -N below; stepped, not interpolated. The draw list orders
layers by it (preview, renders, CLI). Saved as Depth in the editor's copy
only; the Isaac Compatibility Warning and anm2ed info count frames using it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-06 01:21:50 -04:00
1 parent 94d0bbf206
commit f3fb7d5101
13 files changed
+78 -6

No files matched your search

+14
View File
@@ -245,6 +245,20 @@ namespace anm2ed::imgui
}
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_DURATION));
ImGui::BeginDisabled(type != LAYER);
if (input_int_range(localize.get(BASIC_DEPTH), frame && type == LAYER ? useFrame.depth : dummy_value<int>(),
-FRAME_DEPTH_MAX, FRAME_DEPTH_MAX, STEP, STEP_FAST,
!frame ? ImGuiInputTextFlags_DisplayEmptyRefVal : 0) &&
frame)
{
auto depth = useFrame.depth;
frame_edit(edit_state::COMPLETE, EDIT_FRAME_DEPTH,
[depth](Document&, model::Frame& frame, model::Track*, const Reference&)
{ frame.depth = depth; });
}
ImGui::SetItemTooltip("%s", localize.get(TOOLTIP_DEPTH));
ImGui::EndDisabled();
auto tintEdit =
color_edit4_persistent(localize.get(BASIC_TINT), frame ? &useFrame.tint : &dummy_value<vec4>());
frame_edit(tintEdit, EDIT_FRAME_TINT,