Is there a property for the *original" value of a layer property? Specifically, I want the x and y position of a layer as imported from Generator.
It's easy enough to save this manually I know, but just curious.
Maybe there is a default state by default (even before you added any other states) that you can look into its options?
I'm wondering too how to save the properties you declare when you create a new Layer into some sort of variable so that I can come back to the original state when needed.
After you created a layer, simply create your own variables on the layer, like layer.originalX = layer.x
thanks :) so no way to put them all in one variable ?
Hm, maybe layer.options is actually a thing that has them all?
I would try to find out if you can read them from the layer.states.default
ha yes, good idea
You can also just save the state of a layer by doing:layerProperties = layer.properties
Also note that you can pass that into an animation if you want directly:
savedProperties = layer.properties
[whole bunch of other stuff]
I think Cemre had something like that on https://github.com/facebook/shortcuts-for-framer?