The Omega Update(TM) Part 4 (Massive Refactor, Change All Frame Properties)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "anm2.h"
|
||||
#include "render.h"
|
||||
#include "tool.h"
|
||||
|
||||
@@ -22,20 +23,53 @@ struct Settings
|
||||
{
|
||||
ivec2 windowSize = {1080, 720};
|
||||
bool playbackIsLoop = true;
|
||||
bool previewIsAxis = true;
|
||||
bool playbackIsClampPlayhead = true;
|
||||
bool changeIsCrop = false;
|
||||
bool changeIsSize = false;
|
||||
bool changeIsPosition = false;
|
||||
bool changeIsPivot = false;
|
||||
bool changeIsScale = false;
|
||||
bool changeIsRotation = false;
|
||||
bool changeIsDelay = false;
|
||||
bool changeIsTint = false;
|
||||
bool changeIsColorOffset = false;
|
||||
bool changeIsVisibleSet = false;
|
||||
bool changeIsInterpolatedSet = false;
|
||||
bool changeIsFromSelectedFrame = false;
|
||||
vec2 changeCrop{};
|
||||
vec2 changeSize{};
|
||||
vec2 changePosition{};
|
||||
vec2 changePivot{};
|
||||
vec2 changeScale{};
|
||||
f32 changeRotation{};
|
||||
s32 changeDelay{};
|
||||
vec4 changeTint{};
|
||||
vec3 changeColorOffset{};
|
||||
bool changeIsVisible{};
|
||||
bool changeIsInterpolated{};
|
||||
s32 changeNumberFrames = 1;
|
||||
bool previewIsAxes = true;
|
||||
bool previewIsGrid = true;
|
||||
bool previewIsRootTransform = false;
|
||||
bool previewIsTriggers = true;
|
||||
bool previewIsPivots = false;
|
||||
bool previewIsTargets = true;
|
||||
bool previewIsBorder = false;
|
||||
f32 previewOverlayTransparency = 255.0f;
|
||||
f32 previewZoom = 200.0;
|
||||
vec2 previewPan = {0.0, 0.0};
|
||||
ivec2 previewGridSize = {32, 32};
|
||||
ivec2 previewGridSize = {32, 3};
|
||||
ivec2 previewGridOffset{};
|
||||
vec4 previewGridColor = {1.0, 1.0, 1.0, 0.125};
|
||||
vec4 previewAxisColor = {1.0, 1.0, 1.0, 0.125};
|
||||
vec4 previewAxesColor = {1.0, 1.0, 1.0, 0.125};
|
||||
vec4 previewBackgroundColor = {0.113, 0.184, 0.286, 1.0};
|
||||
ivec2 generateStartPosition = {0, 0};
|
||||
ivec2 generateFrameSize = {64, 64};
|
||||
ivec2 generatePivot = {32, 32};
|
||||
s32 generateRows = 4;
|
||||
s32 generateColumns = 4;
|
||||
s32 generateFrameCount = 16;
|
||||
s32 generateDelay = 1;
|
||||
bool editorIsGrid = true;
|
||||
bool editorIsGridSnap = true;
|
||||
bool editorIsBorder = true;
|
||||
@@ -45,9 +79,14 @@ struct Settings
|
||||
ivec2 editorGridOffset = {32, 32};
|
||||
vec4 editorGridColor = {1.0, 1.0, 1.0, 0.125};
|
||||
vec4 editorBackgroundColor = {0.113, 0.184, 0.286, 1.0};
|
||||
ToolType tool = TOOL_PAN;
|
||||
s32 mergeType = ANM2_MERGE_APPEND_FRAMES;
|
||||
bool mergeIsDeleteAnimationsAfter = false;
|
||||
s32 bakeInterval = 1;
|
||||
bool bakeIsRoundScale = true;
|
||||
bool bakeIsRoundRotation = true;
|
||||
s32 tool = TOOL_PAN;
|
||||
vec4 toolColor = {1.0, 1.0, 1.0, 1.0};
|
||||
RenderType renderType = RENDER_PNG;
|
||||
s32 renderType = RENDER_PNG;
|
||||
std::string renderPath = ".";
|
||||
std::string renderFormat = "{}.png";
|
||||
std::string ffmpegPath = "/usr/bin/ffmpeg";
|
||||
@@ -57,9 +96,35 @@ const SettingsEntry SETTINGS_ENTRIES[] =
|
||||
{
|
||||
{"window", TYPE_IVEC2, offsetof(Settings, windowSize)},
|
||||
{"playbackIsLoop", TYPE_BOOL, offsetof(Settings, playbackIsLoop)},
|
||||
{"previewIsAxis", TYPE_BOOL, offsetof(Settings, previewIsAxis)},
|
||||
{"playbackIsClampPlayhead", TYPE_BOOL, offsetof(Settings, playbackIsClampPlayhead)},
|
||||
{"changeIsCrop", TYPE_BOOL, offsetof(Settings, changeIsCrop)},
|
||||
{"changeIsSize", TYPE_BOOL, offsetof(Settings, changeIsSize)},
|
||||
{"changeIsPosition", TYPE_BOOL, offsetof(Settings, changeIsPosition)},
|
||||
{"changeIsPivot", TYPE_BOOL, offsetof(Settings, changeIsPivot)},
|
||||
{"changeIsScale", TYPE_BOOL, offsetof(Settings, changeIsScale)},
|
||||
{"changeIsRotation", TYPE_BOOL, offsetof(Settings, changeIsRotation)},
|
||||
{"changeIsDelay", TYPE_BOOL, offsetof(Settings, changeIsDelay)},
|
||||
{"changeIsTint", TYPE_BOOL, offsetof(Settings, changeIsTint)},
|
||||
{"changeIsColorOffset", TYPE_BOOL, offsetof(Settings, changeIsColorOffset)},
|
||||
{"changeIsVisibleSet", TYPE_BOOL, offsetof(Settings, changeIsVisibleSet)},
|
||||
{"changeIsInterpolatedSet", TYPE_BOOL, offsetof(Settings, changeIsInterpolatedSet)},
|
||||
{"changeIsFromSelectedFrame", TYPE_BOOL, offsetof(Settings, changeIsFromSelectedFrame)},
|
||||
{"changeCrop", TYPE_VEC2, offsetof(Settings, changeCrop)},
|
||||
{"changeSize", TYPE_VEC2, offsetof(Settings, changeSize)},
|
||||
{"changePosition", TYPE_VEC2, offsetof(Settings, changePosition)},
|
||||
{"changePivot", TYPE_VEC2, offsetof(Settings, changePivot)},
|
||||
{"changeScale", TYPE_VEC2, offsetof(Settings, changeScale)},
|
||||
{"changeRotation", TYPE_FLOAT, offsetof(Settings, changeRotation)},
|
||||
{"changeDelay", TYPE_INT, offsetof(Settings, changeDelay)},
|
||||
{"changeTint", TYPE_VEC4, offsetof(Settings, changeTint)},
|
||||
{"changeColorOffset", TYPE_VEC3, offsetof(Settings, changeColorOffset)},
|
||||
{"changeIsVisible", TYPE_BOOL, offsetof(Settings, changeIsVisibleSet)},
|
||||
{"changeIsInterpolated", TYPE_BOOL, offsetof(Settings, changeIsInterpolatedSet)},
|
||||
{"changeNumberFrames", TYPE_INT, offsetof(Settings, changeNumberFrames)},
|
||||
{"previewIsAxes", TYPE_BOOL, offsetof(Settings, previewIsAxes)},
|
||||
{"previewIsGrid", TYPE_BOOL, offsetof(Settings, previewIsGrid)},
|
||||
{"previewIsRootTransform", TYPE_BOOL, offsetof(Settings, previewIsRootTransform)},
|
||||
{"previewIsTriggers", TYPE_BOOL, offsetof(Settings, previewIsTriggers)},
|
||||
{"previewIsPivots", TYPE_BOOL, offsetof(Settings, previewIsPivots)},
|
||||
{"previewIsTargets", TYPE_BOOL, offsetof(Settings, previewIsTargets)},
|
||||
{"previewIsBorder", TYPE_BOOL, offsetof(Settings, previewIsBorder)},
|
||||
@@ -69,8 +134,15 @@ const SettingsEntry SETTINGS_ENTRIES[] =
|
||||
{"previewGridSize", TYPE_IVEC2, offsetof(Settings, previewGridSize)},
|
||||
{"previewGridOffset", TYPE_IVEC2, offsetof(Settings, previewGridOffset)},
|
||||
{"previewGridColor", TYPE_VEC4, offsetof(Settings, previewGridColor)},
|
||||
{"previewAxisColor", TYPE_VEC4, offsetof(Settings, previewAxisColor)},
|
||||
{"previewAxesColor", TYPE_VEC4, offsetof(Settings, previewAxesColor)},
|
||||
{"previewBackgroundColor", TYPE_VEC4, offsetof(Settings, previewBackgroundColor)},
|
||||
{"generateStartPosition", TYPE_VEC2, offsetof(Settings, generateStartPosition)},
|
||||
{"generateFrameSize", TYPE_VEC2, offsetof(Settings, generateFrameSize)},
|
||||
{"generatePivot", TYPE_VEC2, offsetof(Settings, generatePivot)},
|
||||
{"generateRows", TYPE_INT, offsetof(Settings, generateRows)},
|
||||
{"generateColumns", TYPE_INT, offsetof(Settings, generateColumns)},
|
||||
{"generateFrameCount", TYPE_INT, offsetof(Settings, generateFrameCount)},
|
||||
{"generateDelay", TYPE_INT, offsetof(Settings, generateDelay)},
|
||||
{"editorIsGrid", TYPE_BOOL, offsetof(Settings, editorIsGrid)},
|
||||
{"editorIsGridSnap", TYPE_BOOL, offsetof(Settings, editorIsGridSnap)},
|
||||
{"editorIsBorder", TYPE_BOOL, offsetof(Settings, editorIsBorder)},
|
||||
@@ -80,6 +152,11 @@ const SettingsEntry SETTINGS_ENTRIES[] =
|
||||
{"editorGridOffset", TYPE_IVEC2, offsetof(Settings, editorGridOffset)},
|
||||
{"editorGridColor", TYPE_VEC4, offsetof(Settings, editorGridColor)},
|
||||
{"editorBackgroundColor", TYPE_VEC4, offsetof(Settings, editorBackgroundColor)},
|
||||
{"mergeType", TYPE_INT, offsetof(Settings, mergeType)},
|
||||
{"mergeIsDeleteAnimationsAfter", TYPE_BOOL, offsetof(Settings, mergeIsDeleteAnimationsAfter)},
|
||||
{"bakeInterval", TYPE_INT, offsetof(Settings, bakeInterval)},
|
||||
{"bakeRoundScale", TYPE_BOOL, offsetof(Settings, bakeIsRoundScale)},
|
||||
{"bakeRoundRotation", TYPE_BOOL, offsetof(Settings, bakeIsRoundRotation)},
|
||||
{"tool", TYPE_INT, offsetof(Settings, tool)},
|
||||
{"toolColor", TYPE_VEC4, offsetof(Settings, toolColor)},
|
||||
{"renderType", TYPE_INT, offsetof(Settings, renderType)},
|
||||
|
Reference in New Issue
Block a user