#Animation Marker Exporter

1 messages ยท Page 1 of 1 (latest)

chrome surge
#

@ocean current @frank patrol

ocean current
#

animation data serializer ๐Ÿ’”

chrome surge
#

IT'S PERFECT.

ocean current
#

bro it's not animation data serializer

#

๐Ÿ˜ญ

chrome surge
#

i know it's metadata but that's so longggggggggg

ocean current
#

animation data is keyframe transforms

chrome surge
#

ughhhhhhhhhh..................

ocean current
#

use Marker Exporter

chrome surge
#

fine.

ocean current
#

lol

#

flight turned into mii

chrome surge
#

if you guys find any bugs make sure NOT to tell me โค๏ธ

frank patrol
chrome surge
#

UGHHHHHHHHHHHHH

#

fineeeeeeeeee...........

ocean current
#

Ill make sure to email it

frank patrol
ocean current
#

actually even mail it physically

#

the error code and output

chrome surge
#

i think i'd... cry...

#

Animation Marker Exporter

frank patrol
#

digga

#

really didnt listen

chrome surge
#

markers can be anything

ocean current
#

I mean I guess

chrome surge
#

this is a marker

#

am i going to export it?

#

NO.

#

that's NOT how it WORKS.

ocean current
#

sure

chrome surge
#

making plugins is so much fun!

#

i should make my own OS

#

i think

#

in holyC

#

just like terry davis intended

chrome surge
#

i actually sort of am larping

#

i've never released anything

#

today that changes.

#

new year new me. (it's april)

ocean current
#

lol

chrome surge
#

i might change the name to be Parameter instead of Argument in the data

#

since that's what it's called in the animation editor too

ocean current
#

yea you can do that

#

rn is the best time to do it

#

early af

chrome surge
#

oh right i have to actually worry about breaking changes

#

the world revolves around me dude get USED to it.

#

๐Ÿซ‚

ocean current
#

๐Ÿซ‚

frank patrol
#

ok

#

now sinek

#

make ur animation system

#

compatible

#

with his plugin

#

:moen

ocean current
frank patrol
#

its your system

#

so you ADAPT IT

#

NOW!

ocean current
#

๐Ÿ’”

#

my hand hurts

chrome surge
ocean current
#

I have carpal tunnel

chrome surge
#

i'm sure @haughty jasper could help you

#

๐Ÿ˜‰

frank patrol
#

@chrome surge

#

its broken

#

{"Markers":[],"Keyframes":[]}

#

this is the attribute it always

#

saves

#

when there are events there

chrome surge
#

that's what it saves for empty stuff

#

if there are no events and no custom keyframes

#

i'll just make it not add anything then

frank patrol
#

but

#

they do have them

#

..

#

they do have animation events

chrome surge
#

are the animations published?

frank patrol
#

yeah

#

how else

#

would i get the ids

chrome surge
#

ugh

#

does it not work for just a few animations or does it not work for any?

#

and do any errors appear?

frank patrol
#

any

#

nope

#

no errors

chrome surge
#

ffs gimme a sec

ocean current
#

@chrome surge @frank patrol lmk when ts works

#

Ill make utility in animation manager

indigo marsh
#

Rui Ferreira

frank patrol
#

rah

ocean current
#

๐Ÿ”ฅ

chrome surge
#

@frank patrol see if it works now

#

added some simple logging

#

just update the plugin or whatever

indigo marsh
#

Wait so what is this?

#

Animation marker exported from?

chrome surge
#
{"Markers":{"Step":[{"Time":0,"Parameter":"Step"},{"Time":0.5,"Parameter":"Step"}]},"Keyframes":{"Step":[{"Time":0},{"Time":0.5}]}}

an example of an exported animation

indigo marsh
#

Ah okay i see

chrome surge
#

i don't really see the use case myself but sinek and idan need it so ๐Ÿคท

#

first published plugin!!!

#

okay NOW it should work

#

i was requiring a types module which roblox doesn't let you do lol

#

flags your plugin as malware

frank patrol
#

aight

#

does work

#

@chrome surge

chrome surge
#

phew

frank patrol
#

oh

#

wait

#

no

#

i meant does

#

nt

#

:soib

chrome surge
#

NO

#

FUCK YOU

frank patrol
#

ahah

#

lol

#

but

#

yeah

#

it doesnt work

chrome surge
#

dude how

#

it works fine for me

#

ugh

#

show me your explorer hierarchy

frank patrol
#

it has animation events

#

since im using them

#

but

#

well

#

it still says nothing

chrome surge
#

huh????

#

show me your entire output

#

is it just the export complete and no markers or keyframes message?

frank patrol
#

yeahj

#

its full of that

#

it skipps everything

chrome surge
#

so it's not failing to fetch them it just deems all of them as nil

#

could you send me your animations?

#

i probably need permissions don't i

frank patrol
#

well

#

idrc

#

but

#

the ids is fine?

#

@chrome surge

#

rbxassetid://71439886846067

#

this is an example

chrome surge
#

yup not authorized to use asset

#

ffs

#

can you give me permissions somehow

#

if you're the owner

frank patrol
#

well

#

spoof it somehow

chrome surge
frank patrol
#

but

#

it does have

#

animation events

chrome surge
#

maybe moon animator has a different animation marker format or something?????

#

like they save it differently???

#

idfk

frank patrol
#

i saved it as a file

chrome surge
#

okay i'm getting the same thing as you

#

it skips over it

#

i need to head out for now once i get back i'll look into it

frank patrol
#

grrr

frank patrol
#

when u gettin back?

#

@chrome surge

chrome surge
#

so tired

#

but I'll look into it just for u bb

#

knees weak arms are heavy

#

there's vomit on my sweater already

#

moms spaghetti

frank patrol
#

@chrome surge

#

so uhh

#

did you fix it?

chrome surge
#

let's take a look ๐Ÿ‘€

#

let's take an eyes ๐Ÿ‘€

#

@frank patrol fixed

#

stupid oversight on my part

chrome surge
#

there's a lot of data i'm not removing even if it's empty, if it becomes an issue let me know

#

then again you're saving almost no space and you have to add nil checks in your code now

#

i think i'd rather just keep the consistent structure

ocean current
#

tbf

#

keep the tables empty

#

Keyframes and Markers

chrome surge
#

is that okay?

ocean current
#

tbf generate no matter what

#

so we know they don't have any rather than not generated

chrome surge
#

alr fair enough

#

done

#

generates entries no matter what and also works properly now

#

you have a cute little icon for the button now too

chrome surge
#

and a low res thumbnail i can't be bothered to change

#

entire code, give me suggestions or whatever

ocean current
#

Nice work

chrome surge
#

you might want to play around with the strings you can set in Parameter, i don't know how well that works

#

like what if you input numbers

#

or .. .. to try and exit out of the thingamajig i don't know what it's called

#

basically SQL injection

frank patrol
#

my code wouldve been non typescripted

#

and that why i dont do plugins

#

cuz they are unreadable later

chrome surge
#

I'm too stupid to make games โœŒ๏ธ

frank patrol
#

ok

#

now make a vfx editing

#

plugin

#

you can loot at the emitter module of vfx forge for reference

chrome surge
#

there are a bunch of vfx plugins already

#

that would blow anything i make out of the water

frank patrol
#

na

#

they dont have mesh vfx

#
  • most of the free ones suck
chrome surge
#

๐Ÿ˜ด pay me......

frank patrol
#

nah, im broke

chrome surge
#

actually no don't I wouldn't make it anyway

#

I'd take the money and run ๐Ÿค‘

#

i don't like how you can't have modules in your plugins

#

you have to maintain one big ass file

#

gross

frank patrol
#

ima fork it a little

#

and make it

#

update

#

newly added animations

#

if you turn automod on

chrome surge
frank patrol
#

I will do something when I get home

#

Cuz kinda inconvenient to manually do it

chrome surge
#

kk fair enough

frank patrol
#

aight

#

time to get to work

#

@chrome surge

#

can you assist me in my making

#

because

#

i never made plugins

frank patrol
#

man

#

idk

#

i cant seem to figure out

#

how to make plugins

ocean current
#

think of it like running a game

#

if you have scripts there with apropriate run context

#

they will run

#

you just set a scripts run context to "Plugin"

#

and it will run when the plugin (the .rbxm) is loaded

#

@frank patrol

#

that's all

frank patrol
#

cuz like

#

when i write the code inside

#

there isnt even autofill

#

which makes me have no idea

#

what methods i can even use

ocean current
#

there's auto fill

#

๐Ÿ’”

#

it's just like writing normal scripts

frank patrol
#

nope

#

didnt work for me

#

๐Ÿฅ€

ocean current
#

can I stream you how to make plugin

#

really

#

wanna show

frank patrol
#

np

#

if you can ofc

#

@ocean current

#
local Connection
Connection = AutoSerializeInside.Click:Connect(function()
    if enabled == false  then
        enabled = true
        local Selections = SelectionService:Get()
        if #Selections == 0 then warn('[Animation Marker Exporter] Nothing selected!') return end
        for _,Selected in Selections do
            if Selected:IsA('Folder') then
                Selected.ChildAdded:Connect(function(Child)
                    if Child:IsA("Animation") and Child.AnimationId ~= nil then
                        ExportAnimation(Child)
                    end
                end)
            end
        end
    end
end)
#

how would i go about this

#

i want it

#

to

#

do it automaticly

#

if you turned on the button

#

so basicly you select a folder, you

#

press the button

#

and then when you add something inside of it, it automaticly saves it all

ocean current
#

or descendant added

#

you can do game.Descendant added

#

and check if it's animation

#

that also works

frank patrol
#

wouldnt that be heavy

#

?

ocean current
#

that's the point

#

it's a plugin

#

made for preruntime

frank patrol
#
local Connection
AutoSerializeInside.Click:Connect(function()
    if enabled == false  then
        enabled = true
        Connection = game.ChildAdded:Connect(function(Child)
            if Child:IsA("Animation") then
                Child:GetPropertyChangedSignal("AnimationId"):Connect(function()
                    if Child.AnimationId ~= "" then
                        ExportAnimation(Child)
                    end
                end)

            end
        end)
    else
        enabled = false
        Connection:Disconnect()
    end
end)
#

so smth like this

#

its unfinished

#

but

#

i think im getting the hang of it

#

alr i made it work @ocean current

#

time to make it work with ur plugin

ocean current
#

there's also hand

frank patrol
#

i saw the "hand"

#

first

ocean current
#

oh

frank patrol
#

then came

#

the BALLS

ocean current
#

๐Ÿ”ฅ

frank patrol
#

and then the DENIS

frank patrol
#

and then i started realizing

#

that the next one

#

on my fyp

#

was

#

women..

ocean current
#

incredible

#

truly marvelous story

frank patrol
#

anyways

#

where can i find ur animation manager

#

cuz

#

ehm

#

im not scrolling

#

thru

#

1.5k messeges

ocean current
#

really

ocean current
#

Ill nuke that thread

#

holy shit

frank patrol
#

cant do

ocean current
#

wtf happened there ๐Ÿ˜ญ

#

ye ye

#

I deleted the message

frank patrol
#

๐Ÿ˜ญ

ocean current
#

let me move it a new place

#

and ping suphi to nuke

frank patrol
#

what would we call this

#

golden digga

#

goofy ah runnin around

#

WAIT

#

IS THAT THE SEX BULLETS STAND

#

WAIT

#

I DIDNT RECOGNIZE IT

#

IF IT IS OFC

#

not sure tho

#

its not them prolly

#

oof

ocean current
#

Im gon make github for animation manager

frank patrol
#

whos that diddy blud ๐Ÿ˜ญ

#

he is bizzare

#

i do remember him getting beat up hard somewhere

ocean current
#

I guess Ill do mit license

#

cuz otherwise it's not open to be modified apparently

frank patrol
#

like

#

huh

#

wierd af

ocean current
#

like not having license automatically makes it untouchable by default for legal system

#

it counts as your work

frank patrol
#

ehm

#

aight ig

#

why mit tho

#

like

ocean current
#

MIT allows almost anything just requires attribution

frank patrol
#

changing stuff

#

and that sit?

ocean current
#

yes

frank patrol
#

so

ocean current
#

it allows that

frank patrol
#

whats the problem?

#

like

#

cant you just say

#

FREE TO CHANGE/MODIFY

#

?

ocean current
#

apparently legal systems say no

frank patrol
#

digga waaaaaaaaaaaaaa

ocean current
#

there's no true public domain dedicated thing as such

#

Im not making the rules gng

frank patrol
#

like

#

how can someone

#

sue you

#

for code u use

#

if they arent allowed

#

to see private

#

files

#

like

#

whaaaaaaaaaaaaaaaaattttt

indigo marsh
#

Sinek License

ocean current
#

๐Ÿคทโ€โ™‚๏ธ

ocean current
#

okay Ill do the unlicense

frank patrol
#

like

#

it doesnt matter to me

#

it just

#

like

#

confuses me

ocean current
#

dawg

#

like all of these

#

enforce you to keep the license

#

I can't get around it unfortunately

#

๐Ÿ˜ญ

frank patrol
#

just put it into github

#

like

#

who cares after all

ocean current
#

dawg if Im uploading to a platform like that

#

Im claiming the code

#

just want to do it right

frank patrol
#

say free to use and redestribute

ocean current
#

I pay attention to all licenses

frank patrol
#

hm

#

i suppose if ur gonna use it in a big game

#

i guess

ocean current
#

yeah

#

I value what devs put up as their license

frank patrol
#

yeah

#

if they doi

#

i credit

#

and leave the liscense

#

but usualy its without any license

ocean current
#

encourage them to pick one

#

it makes things easier for everyone

#

and more secure

frank patrol
#

he got beat up

#

fuckass won 5 mil

#

because his friends helped him

#

and he gave them 1k each calling them beggar

#

beggars* and telling them to leave him alone

#

so bizzare

chrome surge
#

save the folder path with plugin:SetSetting()

#

and save the gameid too

#

so it doesn't look for that folder in the wrong game

#

i can try implementing that sometime someday

#

but tomorrow idk if I'll be able to

frank patrol
#

Shouldn't be a problem

#

Ive made it work

#

Currently I do have to press it each time I load in

#

But

#

I make it auto load if it's on already

chrome surge
#

I'd probably make it so you can only track a single root folder though

frank patrol
#

dw

#

ill figure it out

#

on my own

#

i already got the core

#

now i just have to make it automaticly turn on if the last session it was turned on

frank patrol
#

I DID IT!

#

YESSIRRR

#

FINALLY

#

now,

#

ill have to make a custom animation system

#

that uses it

#

cuz

#

@ocean current doesnt want to add it on his own

#

๐Ÿ˜ 

#

and i dont know how to even start forking his code

ocean current
#

GetAnimationMarkerTimepositions

#

GetKeyframeTimepositions

#

like the code is very simple

frank patrol
#

like

#

i dont understand how to use ur system

#

like overall

#

i understand what it does

#

but i cant seem to understand on using it

ocean current
#

that's it

#

that's where you start

#

plays an animation track

#

how do you play animations usually

frank patrol
#

@chrome surge

#

how would i decode it tho?

#

if i want to get the info

#

i have to decode it somehow

chrome surge
#

decode what @frank patrol

#

the attributes?

#

use HTTPService: DecodeJSON

frank patrol
#

aight

#

i already did it

#
local function DecodeData(instance)
    local raw = instance:GetAttribute("Data")
    if not raw then return nil end

    return HttpService:JSONDecode(raw)
end

local function GetAllMarkerTimings(animation: Animation, markername: string): {}
    local decoded = DecodeData(animation)
    if decoded then
        local markers = decoded.Markers
        if markers then
            local markerlist = {}
            for name, list in markers do
                table.insert(markerlist,name)
            end
            return markerlist
        end
    end
    return {}

end


local function GetTimeToMarker(animation: Animation, markername: string): number?
    local decoded = DecodeData(animation)
    if not decoded then return nil end

    local markers = decoded.Markers
    if not markers then return nil end

    local markerList = markers[markername]
    if not markerList or #markerList == 0 then return nil end

    return markerList[1].Time
end
``` ts is what i added to @ocean current s module
#

unfinished yet

#

but

#

prolly will work

ocean current
#

you can even cache the data when it's decoded for the first time

#

make a global table for them

ocean current
#

what if you have multiple markers

#

use markerIndex

#

as an argument

#

also markername should be markerName

frank patrol
#

hm

#

ill work on it more

frank patrol
#

what about it

#

@ocean current

ocean current
#

make markerIndex: number?

#

it defaults to 1

frank patrol
#

local function GetTimeToMarker(animation: Animation, markerName: string): number?
    local decoded = DecodeData(animation)
    if not decoded then return nil end

    local markers = decoded.Markers
    if not markers then return nil end

    local markerList = markers[markerName]
    if not markerList or #markerList == 0 then return nil end
    print(markerList[1].Time)
    return markerList[1].Time
end
#

its get time to marker*

#

its for 1 marker

ocean current
#

limit yourself

frank patrol
ocean current
#
local function GetTimeToMarker(animation: Animation, markerName: string, markerIndex: number?): number?
    local decoded = DecodeData(animation)
    if not decoded then return nil end

    local markers = decoded.Markers
    if not markers then return nil end

    local markerList = markers[markerName]
    if not markerList or #markerList == 0 then return nil end

    local markerIndex = markerIndex or 1
    local markerData = markerList[markerIndex]
    if not markerData  then return nil end
    
    return markerData.Time
end
frank patrol
#

i got get all markerrs

ocean current
#

also cache the decoded marker data

frank patrol
#

whats the point tho

#

like

#

check if the animation has been used

ocean current
#

because you may have it run for 100 npcs

frank patrol
#

/cached

#

already

ocean current
#

oh it is?

#

great

frank patrol
#

no

#

like

#

i was talking about

#

like checking if the animation was cached already

#

and if it was skip the stuff

#

right?

ocean current
#

Im talking about marker data

#

being cached

#

I already cache anything else

#

dont json decode every time

#

only do it once

#

also this only construct the marker data once

#

and do that even if you just want to get a single marker

#

lazy loading

frank patrol
#

hm

#

well

#

how do i do it tho

#
local function DecodeData(instance)
    local raw = instance:GetAttribute("Data")
    if not raw then return nil end

    return HttpService:JSONDecode(raw)
end

local function GetAllMarkerTimings(animation: Animation): {}
    local decoded = DecodeData(animation)
    if decoded then
        local markers = decoded.Markers
        if markers then
            local markerlist = {}

            for name, list in pairs(markers) do
                for _, markerData in pairs(list) do
                    local Time = markerData.Time

                    warn("Time: ", Time ,"    Name:", name)
                    table.insert(markerlist, {
                        Name = name,
                        Time = Time
                    })
                end
            end
            return markerlist
        end
    end
    return {}
end


local function GetTimeToMarker(animation: Animation, markerName: string, markerIndex: number?): number?
    local decoded = DecodeData(animation)
    if not decoded then return nil end

    local markers = decoded.Markers
    if not markers then return nil end

    local markerList = markers[markerName]
    if not markerList or #markerList == 0 then return nil end

    local markerIndex = markerIndex or 1
    local markerData = markerList[markerIndex]
    if not markerData  then return nil end

    return markerData.Time
end
#

this is what i got rn

#

@ocean current

ocean current
#

local AnimationMarkerData = {} :: {[Animation]: YOUR_DATA}

#

@frank patrol

frank patrol
#

hm

#

so save it

ocean current
#

exactly

frank patrol
#

in the types thingy?

ocean current
#

save it in the global table

#

and use it to retrieve

#

just like what I did for animation length

frank patrol
#

local AnimationMarkerData = {} :: {[Animation]: {}}

#

so this basicly

#

at the start

#

where i save all global tables

ocean current
#

exactly

#

and specify some type for it

#

types are not as complicated as they look

#

trust me

frank patrol
#

but what type

#

should i save it as

#

cuz

#

so like number,

#

like

#

string,number?

#

for name,time?

ocean current
#
type MarkerData = {[string]: {
    TimePosition: number,
    Parameter: string?,
  }
}
#

@frank patrol

#

save it like so

#

types are really simple really

frank patrol
#

theres already

#

an export type

#

at the top

#

can i put it there?

ocean current
#

oh can I see

#

yes

#

put it there

#

no need to export it

#

put it higher than the class type

#

type KeyframeData = {[string]: {
TimePosition: number,
}
}

#

and KeyframeData

frank patrol
ocean current
#

I did this to show you how the types look expanded

frank patrol
#

like that i suppose

ocean current
#

I usually do

#
type MarkerData = {[string]: {{TimePosition: number, Parameter: string?}}}
#

looks better imo

frank patrol
#

so no need for export

#

alr

ocean current
#

yeah nope

frank patrol
#

what does export do tho

ocean current
#

it allows you to access the type by requiring the module

#
local a: AnimationManager.MarkerData = nil
frank patrol
#

hm ic

indigo marsh
#

^which shouldn't be allowed

#

I really hope roblox changes that

frank patrol
#

so

#

at the end

ocean current
frank patrol
#

i use it here:
local AnimationMarkerData = {} :: {MarkerData}

ocean current
#

I agree

indigo marsh
ocean current
#

it's per animation

#

also leave the table empty if there's no data for it

#

so we know it was processed before

frank patrol
#

wait

#

so can i for example

#

save it from here:

#
local function DecodeData(instance)
    local raw = instance:GetAttribute("Data")
    if not raw then return nil end

    return HttpService:JSONDecode(raw)
end
frank patrol
ocean current
#

exactly

#

process only once mentality

frank patrol
#

so then when i call decode

ocean current
#

I made a mistake here

frank patrol
#

it checks if it has been saved already

ocean current
#

fixed the type

#

it's an array of {Timeposition, Parameter}

#

per marker

ocean current
ocean current
frank patrol
#

yeah

#

i already did

#

before

#

you told me

ocean current
#

alr alr

frank patrol
#

i saw a syntax error

ocean current
#

good

#

ye ye

ocean current
#

not everything will be served to your plate

#

๐Ÿ˜”

frank patrol
#

yeah i know

#

thats why im trying to do it on my own

#

no chatlgbt this time ๐Ÿ”ฅ

#

ill learn more by working on plugins prolly

#

since i wont get sidetracked

#

by vfx animations

ocean current
#

ye exactly

frank patrol
#

and other stuff

#

also btw

#

i noticed that if i want to test

#

with the command line

#

i have to restart studio

#

each time if i want the command bar to load the new code

#

any way to fix?

#

@ocean current

ocean current
#

bro

#

what

#

๐Ÿ˜ญ

frank patrol
#

ok

#

so

ocean current
#

for plugins?

frank patrol
#

na

#

for the module

#

animation manager

ocean current
#

why are you testing in command line

frank patrol
#

for some reason

ocean current
#

just test by running the game

frank patrol
#

well

ocean current
frank patrol
#

in terms

#

of just testing

ocean current
#

F8 exists

#

that's very fast

frank patrol
#

like run script

#

forgot bout that

#

๐Ÿ˜‚

ocean current
#

run script too

#

but like

#

F8 I always do that

frank patrol
#

so basicly i save it like that:
AnimationMarkerData[instance] = Proccessed.Markers
warn(AnimationMarkerData[instance])

#

and now i have to make checks to see if it has been cached already

#

im thinking about

#

either doing Proccessed.Markers

#

or

#

just Proccessed

frank patrol
#

it should be this:

#
type MarkerData = {[string]: {{Parameter: string?,TimePosition: number}}}
#

and not

#

timeposition fist

#

cuz

ocean current
frank patrol
#

22:18:29.756 โ–ผ {
["hitreg"] = โ–ผ {
[1] = โ–ผ {
["Parameter"] = "",
["Time"] = 0.4000000059604645
}
}

ocean current
#

save keyframe and marker data at the same time

#

better imo

#

since you will decode anyways

frank patrol
#

well

#

but

#

it wont match the marker data type

#

so

#

like whats the point of it?

ocean current
#

you can expand the type

#

actually yeah

#

that's very smarty

frank patrol
ocean current
#

you can do

frank patrol
#

cuz

#

i mean i could add more stuff

#

into the type

#

but whats the point

#

if its too long

#

it will just be confusing af

ocean current
#
local AnimationMetadata = {} :: {[Animation]: {
  MarkerData: MarkerData?,
  KeyframeData: KeyframeData?,
}}
#

yeah this

#

then you can check if they have the table

#

if they do it is already processed

ocean current
#

this is not confusing at all

#

very intuitive

frank patrol
#

like

#

whats the point of having that?

ocean current
#

to store data?

#

wdym what's the point

frank patrol
#

like

#

ah

ocean current
#

basically saying merge the data

frank patrol
#

its marker data

#

or

#

meta data?

ocean current
#

not or

#

it's just Metadata

frank patrol
#

hm

ocean current
#

contains both

#

keyframe and marker

#

if they have any

frank patrol
#

whats the point of having it tho

ocean current
#

wdym what's the point

#

to make your life easier

#

Idk how you can't see this simplifies things

frank patrol
#

well...

#

i cant understand

#

why we need

#

animationmarker data

ocean current
#

decode data once and then save it as metadata

frank patrol
#

why we need

#

a type

#

for it

#

wait

ocean current
frank patrol
#

shouldnt i save it as animation data

#

?

ocean current
#

get rid of the other global tables

#

use AnimationMetadata global table

#

index with the instance itself to save the decoded data

frank patrol
#
local AnimationLengths = {} :: {[Animation]: number}
local AnimationByPath = {} :: any
local AnimationMarkerData = {} :: {[Animation]: MarkerData}
local AnimationMetadata = {} :: {[Animation]: {MarkerData: MarkerData?,KeyframeData: KeyframeData?,}}
frank patrol
#

so basicly it should be something like that?

#

oh

#

so it IS INSTEAD

ocean current
#

yes

frank patrol
#

thats what i was asking

#

cuz

ocean current
#

yea exactly

frank patrol
#

ah

#

i was confused af

ocean current
#

๐Ÿ˜ญ

frank patrol
#

i thought u said to keep both for sum reason

#

๐Ÿฅ€

ocean current
#

๐Ÿฅ€

#

okay get back to work

#

you got this

frank patrol
#

btw

#

the Keyframedata

#

is not exported as a Type

#

and its underlined orange

ocean current
#

ofc bro

#

complete the missing pieces

frank patrol
#

aight

ocean current
#

๐Ÿซก

frank patrol
#

if i only understood what type keyframe data is ๐Ÿ˜‚

#

i guess thats for later

ocean current
#

you have keyframes

#

aswell

#

did you forget

#

๐Ÿ’”

#

don't make shit only for yourself

#

challange yourself to generalize a bit

ocean current
#

without parameter

#

you can also save it as a number list

#

that's also valid

#

{number}

frank patrol
#
local function DecodeData(instance)
    if AnimationMetadata[instance] then return AnimationMetadata[instance] end
    local raw = instance:GetAttribute("Data")
    local Proccessed = HttpService:JSONDecode(raw)
    AnimationMetadata[instance] = Proccessed
    warn(AnimationMetadata[instance])
    return Proccessed
end

#

so

#

basicly this right?

#

not sure

#

if its exactly the way you wanted me to optimize

#

but it does seem like it would optimize a lil

frank patrol
#

but i didnt make the plugin

#

and i have absolutly no idea

#

what it would contain

#

considering that it always prints this for my animation outputs:

ocean current
frank patrol
#

22:30:15.796 โ–ผ {
["Keyframes"] = {},
["Markers"] = โ–ผ {
["hitreg"] = โ–ผ {
[1] = โ–ผ {
["Parameter"] = "",
["Time"] = 0.4000000059604645
}
}
}
} - Server - AnimationManager:97

frank patrol
ocean current
#

๐Ÿ’€ bro

#

then how are you making this

#

go try thatshit

#

frying me

#

๐Ÿ˜ญ

frank patrol
#

HOW!?!?

ocean current
#

if it prints

#

it's already working

#

check the attribute

#

on the animation instance

frank patrol
#

{"Markers":{"hitreg":[{"Time":0.4000000059604645,"Parameter":""}]},"Keyframes":[]}

#

empty

ocean current
#

yeah bro then it2s empty

#

that means there's no keyframe data for it

#

it ignores keyframes named "Keyframe"

frank patrol
#

like

#

what does it

#

do

#

and what is it for

#

like

ocean current
#

@chrome surge make it so when parameter is not existent it saves it as nil

frank patrol
#

i got a ton of questions

ocean current
#

you can change name of keyframes

#

and get keyframes by name

#

that's it

#

that's what it is

frank patrol
#

so basicly you can move an animation to a named keyframe right?

frank patrol
#

if so

#

then how do i add a name to it

ocean current
#

in animation editor

#

double click the thing

#

and rename

#

it might be right click too

#

Idk how you never noticed you can rename keyframes

frank patrol
#

what about moon animator ๐Ÿ˜ญ

frank patrol
ocean current
frank patrol
#

never knew

#

never did

ocean current
#

cuz moon animator is stupid

frank patrol
#

i never had use for it

#

๐Ÿ˜ญ

#

i used animation events

ocean current
#

yeah they are deprecated

frank patrol
ocean current
#

events are new

frank patrol
#

hm

#

aight

#

good to know i guess

#
--!strict
type MarkerData = {[string]: {{Parameter: string?,TimePosition: number}}}
type KeyframeData = {[Keyframe]: {Name: string?}}

#

so after allat

#

it should look like this right?

#

also

#

here

#
local AnimationMetadata = {} :: {[Animation]: {KeyframeData: KeyframeData?,MarkerData: MarkerData?}}
#

it should be like that

#

instead of the opposite

ocean current
#

like before

#
type KeyframeData = {[string]: {number}}
frank patrol
#

wait

#

what exactly

#

does it contain?

#

because

ocean current
#

string is keyframe name

frank patrol
#

from my understanding

#

ohhhhhhhhhh

ocean current
#

number list is keyframes

#

their timepositions

frank patrol
#

ohhhhhhhhhhhhhhhhhhh

#

i feel enlightened

frank patrol
#

sinek

#

yk what

#

when you are bored

#

make a tutorial

#

on how to use and understand this ts code

#

cuz

#

im personaly still kinda confused

ocean current
#

I thought the code was as clean as it gets

frank patrol
#

also

#

you didnt answer my question

#
local function DecodeData(instance)
    if AnimationMetadata[instance] then return AnimationMetadata[instance] end
    local raw = instance:GetAttribute("Data")
    local Proccessed = HttpService:JSONDecode(raw)
    AnimationMetadata[instance] = Proccessed
    warn(AnimationMetadata[instance])
    return Proccessed
end

is the idea implemented right here?

ocean current
#

a little refactor tho

#

variable naming can be better

frank patrol
#

yeah?

#

dont tell anyone ๐Ÿคซ

ocean current
#

Im abandoning you

#

get out

#

what is that table insert bs btw

#

I don't get it

#

@frank patrol

frank patrol
#

its ragebait

#

you dont need it

#

when you have the metadata

ocean current
#

actually

#
type AnimationMetadata = {
  MarkerData: MarkerData?,
  KeyframeData: KeyframeData?,
}
#

and Id do it like this

frank patrol
#

broooo

#

YOU KEEP

#

WRITING IT

#

THE OPOSSITE

#

WAY

#

ITS THE KEYFRAME DATA

#

AND THEN MARKER DATA

#

RAHHHHHHH

ocean current
#
local function GetAnimationMetadata(animation: Animation): AnimationMetadata
    local metadata = AnimationMetadata[animation]
    if metadata then return metadata end

    local jsonData = instance:GetAttribute("Data")
    local metadata = HttpService:JSONDecode(jsonData)

    AnimationMetadata[animation] = metadata
    return metadata
end
#

@frank patrol

frank patrol
#

isnt it the same thing?

#

ah

#

ok

#

i get it

#

so you make it return

#

a known type

ocean current
#

exactly

frank patrol
#

the decoded.markers

#

i think i missed something when setting up the types

#

tryna find

#

where the chain started

ocean current
#

Dont forget

#

Also you dont have {MarkerData}

#

That means an array ot MarkerData

frank patrol
#

yeah

#

but

#

this still

#

errors

#

like

#

underlines

ocean current
#

Because MarkerData is optional

frank patrol
#

even without

ocean current
#

It can be nil

frank patrol
#

markerdata

ocean current
frank patrol
#

right

ocean current
#

Bruh

frank patrol
#

wdym?

ocean current
#

MarkerData is ?

#

Meaning it can be nil

frank patrol
#

oh

#

yeah

#

yeah

#

mb

#

i figured it out