Copy link to clipboard
Copied
Hey All!
Can solve that situation, maybe I miss something!?
Working on effect, me scheme:
param1 -\ / render
param2 ---} [sequence data] -
param3 -/ \ update custom UI
So if any param is changed, seq data recalculating and both, render and custom UI - updating.
If I undo last param changes, param will undo, render will take a previous image from cache, but sequnce data will not update, its undoeble.
For example:
1step. param = 1, seq data = 255, render/UI - white
2step. param = 0, seq data = 0, render/UI - black
3step. UNDO -> param = 1, seq data = 0, render - white(from cache), cust UI - Undefined Behaviour.
I cant find the point, where I can recalculate my seq data if Undo and draw updated custom UI. Do we have any Event, or flag or function to manage that? What I tried:
1. Trying to find undo event. ctr-z KEYDOWN works fine, but as I see in Debug, key-down was the first event after ctr-z command, and the value of slider is still not reverted. So I cant use that values,
2. I can recalculate seq data in Draw event, but its wrong way. I cant send it to render and I need to recalculate it many/many/many times at every Draw event.
3. cant use PF_Cmd_UPDATE_PARAMS_UI
4. Im wondering, should I use arb data for my custom UI? And what the role of seq data then?
What is ncice way to work with undo in AE if I have custom data?
here is an order of called events after ctr-z:
Many seq calss, I have all of them (accordingly with that doc:
https://reduxfx.com/ae_seqdata), but its not working for me.
the seq_data calls happen a ton of times. don't worry about it.
anyways, since sequence data doesn't do undo, it's a problematic design to have it HAVE to match params. tracking undos reliably is a very tough, if at all possible.
i think the simplest solution would be to save some state identifier in both the arb params AND the sequence data. when using the sequence data (on whatever call. first chance it's used), compare the state identifier in the arb to the one in the sequence data. if they m
...well... there's no declared purpose for it.
it's not much good for processed image data, becuase different frames might get processed at the same time.
it's no good param-dependet processed data, as there's no telling when the param values changed.
i personally use it for a couple of things:
1. sequence setup is a unique call for brand new instnace. i use it to flag new instances for some purposes.
2. sequence data survives the user hitting the "reset" button. i use it to store data that won't
...Copy link to clipboard
Copied
Maybe problem in my seq flattening functions..
If it helps:
Copy link to clipboard
Copied
the seq_data calls happen a ton of times. don't worry about it.
anyways, since sequence data doesn't do undo, it's a problematic design to have it HAVE to match params. tracking undos reliably is a very tough, if at all possible.
i think the simplest solution would be to save some state identifier in both the arb params AND the sequence data. when using the sequence data (on whatever call. first chance it's used), compare the state identifier in the arb to the one in the sequence data. if they mismatch, regenerate the sequence data and store the corresponding state identifier with it.
Copy link to clipboard
Copied
Hey Shachar!
Thank you for clarification!
Yes, I thought about it, that I shouldt use seq data a base for calculations. But was not sure, what is the place for that data in my effect (architecturally).
Now I need to save my important data into arb data and connect it with my custom UI. Assume that data should be undoable.
Seems like seq data is a temporary place to pass some information to another modules. From event calculations to render, for example. Or to some functions which dont have an access to params, where I cant have an access to my arbdata, right?
Copy link to clipboard
Copied
well... there's no declared purpose for it.
it's not much good for processed image data, becuase different frames might get processed at the same time.
it's no good param-dependet processed data, as there's no telling when the param values changed.
i personally use it for a couple of things:
1. sequence setup is a unique call for brand new instnace. i use it to flag new instances for some purposes.
2. sequence data survives the user hitting the "reset" button. i use it to store data that won't survive in an arb in that situation.
3. sequence data doesn't undo/redo, so i store stuff there that i don't want changing, or that just doesn't trigger a re-render or an undo entry when changed.
4. for data that i need kept during a session but i don't want bloating the project file.
in other words, i use it only when other storage methods don't meet the needs. otherwise it's kinf of a paint in the butt...
Copy link to clipboard
Copied
Ingeniously! Thanks for help! Its clarify very much for me.
Can’t wait until the working day is over and we’ll be able to code.