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
@@ -167,8 +167,8 @@ namespace anm2ed
|
||||
X(positionY, position.y, false, false, changeIsPositionY, changePosition.y) \
|
||||
X(scaleX, scale.x, false, false, changeIsScaleX, changeScale.x) \
|
||||
X(scaleY, scale.y, false, false, changeIsScaleY, changeScale.y) \
|
||||
X(shearX, shear.x, false, false, changeIsShearX, changeShear.x) \
|
||||
X(shearY, shear.y, false, false, changeIsShearY, changeShear.y) \
|
||||
X(skewX, skew.x, false, false, changeIsSkewX, changeSkew.x) \
|
||||
X(skewY, skew.y, false, false, changeIsSkewY, changeSkew.y) \
|
||||
X(rotation, rotation, false, false, changeIsRotation, changeRotation) \
|
||||
X(tintR, tint.r, false, true, changeIsTintR, changeTint.r) \
|
||||
X(tintG, tint.g, false, true, changeIsTintG, changeTint.g) \
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ namespace anm2ed::model
|
||||
{
|
||||
auto& frame = draw.frame;
|
||||
return math::quad_model_get(frame.size, frame.position, frame.pivot, math::percent_to_unit(frame.scale),
|
||||
frame.rotation, math::percent_to_unit(frame.shear));
|
||||
frame.rotation, math::percent_to_unit(frame.skew));
|
||||
}
|
||||
|
||||
// When an item is drawn: now, and for each sample its time if the track has a frame there.
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace anm2ed::model
|
||||
frame.rotation = glm::mix(frame.rotation, next.rotation, amount);
|
||||
frame.position = glm::mix(frame.position, next.position, amount);
|
||||
frame.scale = glm::mix(frame.scale, next.scale, amount);
|
||||
frame.shear = glm::mix(frame.shear, next.shear, amount);
|
||||
frame.skew = glm::mix(frame.skew, next.skew, amount);
|
||||
frame.colorOffset = glm::mix(frame.colorOffset, next.colorOffset, amount);
|
||||
frame.tint = glm::mix(frame.tint, next.tint, amount);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ namespace anm2ed::model
|
||||
glm::mat4 frame_parent_model_get(const Frame& frame)
|
||||
{
|
||||
return math::quad_model_parent_get(frame.position, {}, math::percent_to_unit(frame.scale), frame.rotation,
|
||||
math::percent_to_unit(frame.shear));
|
||||
math::percent_to_unit(frame.skew));
|
||||
}
|
||||
|
||||
void frame_root_transform_apply(Frame& frame, const Frame& rootFrame, bool isRoundScale, bool isRoundRotation,
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ namespace anm2ed::model
|
||||
glm::vec2 pivot{};
|
||||
glm::vec2 position{};
|
||||
glm::vec2 scale{100.0f, 100.0f};
|
||||
glm::vec2 shear{};
|
||||
glm::vec2 skew{};
|
||||
float rotation{};
|
||||
glm::vec4 tint{types::color::WHITE};
|
||||
glm::vec3 colorOffset{};
|
||||
|
||||
+9
-7
@@ -36,8 +36,8 @@ namespace anm2ed::model
|
||||
"Name", "CreatedBy", "CreatedOn", "Binding", "Value", "DefaultAnimation", "Path", "Vertex", "Fragment", "Id",
|
||||
"LayerId", "NullId", "SpritesheetId", "Fps", "Version", "FrameNum", "Delay", "AtFrame", "EventId", "RegionId",
|
||||
"ShaderId", "Depth", "SoundId", "GroupId", "Index", "Loop", "StartMarker", "EndMarker", "Visible", "ShowRect", "IsExpanded", "Enabled", "Rotation",
|
||||
"XPivot", "YPivot", "XCrop", "YCrop", "XPosition", "YPosition", "Width", "Height", "XScale", "YScale", "ShearX",
|
||||
"ShearY", "RedTint", "GreenTint", "BlueTint", "AlphaTint", "RedOffset", "GreenOffset", "BlueOffset",
|
||||
"XPivot", "YPivot", "XCrop", "YCrop", "XPosition", "YPosition", "Width", "Height", "XScale", "YScale", "SkewX",
|
||||
"SkewY", "ShearX", "ShearY", "RedTint", "GreenTint", "BlueTint", "AlphaTint", "RedOffset", "GreenOffset", "BlueOffset",
|
||||
"Interpolated", "Origin", "BakeInterpolation", "BakeDelay", "BakeCount", "OriginalDelay"};
|
||||
// clang-format on
|
||||
constexpr std::string_view SOURCE_DOCUMENT_TAG = "SourceDocument";
|
||||
@@ -205,7 +205,9 @@ namespace anm2ed::model
|
||||
frame.pivot = {float_get(element, "XPivot"), float_get(element, "YPivot")};
|
||||
frame.position = {float_get(element, "XPosition"), float_get(element, "YPosition")};
|
||||
frame.scale = {float_get(element, "XScale", frame.scale.x), float_get(element, "YScale", frame.scale.y)};
|
||||
frame.shear = {float_get(element, "ShearX"), float_get(element, "ShearY")};
|
||||
// Skew was once called shear.
|
||||
frame.skew = {float_get(element, "SkewX", float_get(element, "ShearX")),
|
||||
float_get(element, "SkewY", float_get(element, "ShearY"))};
|
||||
frame.rotation = float_get(element, "Rotation");
|
||||
for (int i = 0; i < (int)std::size(TINT_ATTRIBUTES); ++i)
|
||||
frame.tint[i] = color_get(element, TINT_ATTRIBUTES[i], frame.tint[i]);
|
||||
@@ -1133,8 +1135,8 @@ namespace anm2ed::model
|
||||
sink.attribute("YScale", frame.scale.y);
|
||||
if (writer.is(SERIALIZE_EXTENSIONS))
|
||||
{
|
||||
sink.attribute("ShearX", frame.shear.x);
|
||||
sink.attribute("ShearY", frame.shear.y);
|
||||
sink.attribute("SkewX", frame.skew.x);
|
||||
sink.attribute("SkewY", frame.skew.y);
|
||||
}
|
||||
for (int i = 0; i < (int)std::size(TINT_ATTRIBUTES); ++i)
|
||||
sink.attribute(TINT_ATTRIBUTES[i], math::float_to_uint8(frame.tint[i]));
|
||||
@@ -1316,7 +1318,7 @@ namespace anm2ed::model
|
||||
{
|
||||
Frame base{};
|
||||
return frame.position == base.position && frame.scale == base.scale && frame.rotation == base.rotation &&
|
||||
frame.shear == base.shear && frame.tint == base.tint && frame.colorOffset == base.colorOffset;
|
||||
frame.skew == base.skew && frame.tint == base.tint && frame.colorOffset == base.colorOffset;
|
||||
}
|
||||
|
||||
IsaacIssues isaac_issues_get(const Model& model)
|
||||
@@ -1334,7 +1336,7 @@ namespace anm2ed::model
|
||||
{
|
||||
issues.easedFrames +=
|
||||
track.type != ItemType::TRIGGER && is_special_interpolation(frame.interpolation);
|
||||
issues.shearFrames += frame.shear != glm::vec2();
|
||||
issues.skewFrames += frame.skew != glm::vec2();
|
||||
issues.shaderFrames += frame.shaderId != -1;
|
||||
issues.depthFrames += track.type == ItemType::LAYER && frame.depth != 0;
|
||||
issues.triggerSounds +=
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ namespace anm2ed::model
|
||||
{
|
||||
int easedFrames{};
|
||||
int groupTransforms{};
|
||||
int shearFrames{};
|
||||
int skewFrames{};
|
||||
int shaderFrames{};
|
||||
int depthFrames{};
|
||||
int triggerSounds{};
|
||||
|
||||
Reference in new issue
Block a user