Rename Shear to Skew
The property, tool, settings, strings and saved attribute are now Skew (SkewX/SkewY in the editor's copy). Files with ShearX/ShearY still load, and settings saved under the old names carry over. Goldens differ only in the attribute name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2ce8795b4a
commit
1381824fb7
167 files changed
+984
-967
No files matched your search
@@ -374,7 +374,7 @@ namespace anm2ed::imgui
|
||||
auto issues = model::isaac_issues_get(document->model);
|
||||
for (auto [count, format] : {std::pair{issues.easedFrames, FORMAT_ISAAC_EASED_FRAMES},
|
||||
{issues.groupTransforms, FORMAT_ISAAC_GROUP_TRANSFORMS},
|
||||
{issues.shearFrames, FORMAT_ISAAC_SHEAR_FRAMES},
|
||||
{issues.skewFrames, FORMAT_ISAAC_SKEW_FRAMES},
|
||||
{issues.shaderFrames, FORMAT_ISAAC_SHADER_FRAMES},
|
||||
{issues.depthFrames, FORMAT_ISAAC_DEPTH_FRAMES},
|
||||
{issues.triggerSounds, FORMAT_ISAAC_TRIGGER_SOUNDS}})
|
||||
|
||||
@@ -592,17 +592,17 @@ namespace anm2ed::imgui
|
||||
if (isEnd) document_change_push(manager);
|
||||
}
|
||||
|
||||
if (frame && useTool == tool::SHEAR)
|
||||
if (frame && useTool == tool::SKEW)
|
||||
{
|
||||
if (isBegin) edit_begin_push(manager, EDIT_FRAME_SHEAR);
|
||||
if (isBegin) edit_begin_push(manager, EDIT_FRAME_SKEW);
|
||||
if (isToolDown)
|
||||
{
|
||||
auto delta = input.mouseDelta;
|
||||
if (input.isMod) (std::abs(delta.x) >= std::abs(delta.y) ? delta.y : delta.x) = 0.0f;
|
||||
frames_change({.shearX = delta.x, .shearY = delta.y});
|
||||
frames_change({.skewX = delta.x, .skewY = delta.y});
|
||||
}
|
||||
if (isArrow) frames_change({.shearX = arrow.x, .shearY = arrow.y});
|
||||
if (isDuring) tooltip_lines_draw({localize_format(FORMAT_SHEAR, frame->shear.x, frame->shear.y)});
|
||||
if (isArrow) frames_change({.skewX = arrow.x, .skewY = arrow.y});
|
||||
if (isDuring) tooltip_lines_draw({localize_format(FORMAT_SKEW, frame->skew.x, frame->skew.y)});
|
||||
if (isEnd) document_change_push(manager);
|
||||
}
|
||||
|
||||
@@ -690,7 +690,7 @@ namespace anm2ed::imgui
|
||||
{
|
||||
return math::quad_model_get(markerSize, frame.position, markerSize * 0.5f,
|
||||
math::percent_to_unit(frame.scale), frame.rotation,
|
||||
math::percent_to_unit(frame.shear));
|
||||
math::percent_to_unit(frame.skew));
|
||||
};
|
||||
|
||||
if (draw.type == model::DrawType::ROOT || draw.type == model::DrawType::GROUP_ROOT)
|
||||
@@ -742,7 +742,7 @@ namespace anm2ed::imgui
|
||||
transform * marker_model_get(markerSize), color);
|
||||
if (!isShowRect) continue;
|
||||
auto rectModel = math::quad_model_get(frame.scale, frame.position, frame.scale * 0.5f, vec2(1.0f),
|
||||
frame.rotation, math::percent_to_unit(frame.shear));
|
||||
frame.rotation, math::percent_to_unit(frame.skew));
|
||||
rect_render(shaderLine, transform * rectModel, rectModel, color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace anm2ed::imgui
|
||||
{BASIC_POSITION, TOOLTIP_POSITION, EDIT_FRAME_POSITION, &model::Frame::position, false},
|
||||
{BASIC_PIVOT, TOOLTIP_PIVOT, EDIT_FRAME_PIVOT, &model::Frame::pivot, true},
|
||||
{BASIC_SCALE, TOOLTIP_SCALE, EDIT_FRAME_SCALE, &model::Frame::scale, false},
|
||||
{BASIC_SHEAR, TOOLTIP_SHEAR, EDIT_FRAME_SHEAR, &model::Frame::shear, false}};
|
||||
{BASIC_SKEW, TOOLTIP_SKEW, EDIT_FRAME_SKEW, &model::Frame::skew, false}};
|
||||
|
||||
struct FlipButton
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace anm2ed::imgui
|
||||
{
|
||||
constexpr StringType FRAME_PROPERTY_LABELS[] = {
|
||||
BASIC_POSITION, BASIC_SCALE, BASIC_ROTATION, BASIC_SHEAR, BASIC_PIVOT, BASIC_CROP,
|
||||
BASIC_POSITION, BASIC_SCALE, BASIC_ROTATION, BASIC_SKEW, BASIC_PIVOT, BASIC_CROP,
|
||||
BASIC_SIZE, BASIC_REGION, BASIC_TINT, BASIC_COLOR_OFFSET, BASIC_VISIBLE, BASIC_INTERPOLATED,
|
||||
BASIC_DURATION, BASIC_SHADER, BASIC_DEPTH, BASIC_EVENT, LABEL_SOUNDS};
|
||||
static_assert(std::size(FRAME_PROPERTY_LABELS) == (std::size_t)edit::FrameProperty::COUNT);
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace anm2ed::imgui::wizard
|
||||
false},
|
||||
{BASIC_PIVOT, {&settings.changeIsPivotX, &settings.changeIsPivotY}, value_ptr(settings.changePivot), true},
|
||||
{BASIC_SCALE, {&settings.changeIsScaleX, &settings.changeIsScaleY}, value_ptr(settings.changeScale), false},
|
||||
{BASIC_SHEAR, {&settings.changeIsShearX, &settings.changeIsShearY}, value_ptr(settings.changeShear), false},
|
||||
{BASIC_SKEW, {&settings.changeIsSkewX, &settings.changeIsSkewY}, value_ptr(settings.changeSkew), false},
|
||||
{BASIC_ROTATION, {&settings.changeIsRotation}, &settings.changeRotation, false}};
|
||||
ComponentRow colorRows[] = {
|
||||
{BASIC_TINT,
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace anm2ed::imgui::wizard
|
||||
mat4 transform =
|
||||
transform_get(zoom) * math::quad_model_get(frame.size, frame.position, frame.pivot,
|
||||
math::percent_to_unit(frame.scale), frame.rotation,
|
||||
math::percent_to_unit(frame.shear));
|
||||
math::percent_to_unit(frame.skew));
|
||||
auto vertices = math::uv_vertices_get(uvMin, uvMax);
|
||||
|
||||
texture_render(shaderTexture, resource::texture::id_get(*sourceTexture), transform, frame.tint,
|
||||
|
||||
Reference in new issue
Block a user