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:
1 parent
94d0bbf206
commit
f3fb7d5101
13 files changed
+78
-6
No files matched your search
@@ -376,6 +376,7 @@ namespace anm2ed::imgui
|
||||
{issues.groupTransforms, FORMAT_ISAAC_GROUP_TRANSFORMS},
|
||||
{issues.shearFrames, FORMAT_ISAAC_SHEAR_FRAMES},
|
||||
{issues.shaderFrames, FORMAT_ISAAC_SHADER_FRAMES},
|
||||
{issues.depthFrames, FORMAT_ISAAC_DEPTH_FRAMES},
|
||||
{issues.triggerSounds, FORMAT_ISAAC_TRIGGER_SOUNDS}})
|
||||
if (count > 0) ImGui::BulletText("%s", localize_format(format, count).c_str());
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace anm2ed::imgui
|
||||
constexpr StringType FRAME_PROPERTY_LABELS[] = {
|
||||
BASIC_POSITION, BASIC_SCALE, BASIC_ROTATION, BASIC_SHEAR, BASIC_PIVOT, BASIC_CROP,
|
||||
BASIC_SIZE, BASIC_REGION, BASIC_TINT, BASIC_COLOR_OFFSET, BASIC_VISIBLE, BASIC_INTERPOLATED,
|
||||
BASIC_DURATION, BASIC_SHADER, BASIC_EVENT, LABEL_SOUNDS};
|
||||
BASIC_DURATION, BASIC_SHADER, BASIC_DEPTH, BASIC_EVENT, LABEL_SOUNDS};
|
||||
static_assert(std::size(FRAME_PROPERTY_LABELS) == (std::size_t)edit::FrameProperty::COUNT);
|
||||
|
||||
void TimelineContext::frame_begin()
|
||||
|
||||
Reference in new issue
Block a user