Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Suggestion: Save animation properties as layer metadata #1

Closed
abynim opened this issue Mar 12, 2016 · 3 comments
Closed

Suggestion: Save animation properties as layer metadata #1

abynim opened this issue Mar 12, 2016 · 3 comments

Comments

@abynim
Copy link

abynim commented Mar 12, 2016

@niittymaa congrats on making an awesome plugin. Such a great start!

One quick suggestion: You can save animation properties as layer metadata instead of using the layer name (which is prone to errors since layer names can easily be changed by users). It's easy to set the metadata using MSPluginCommand (docs for reference: https://developer.sketchapp.com/reference/MSPluginCommand/)

For example, to set the value:

var layer = context.selection.firstObject();
context.command.setValue_forKey_onLayer_forPluginIdentifier(animationProps, "animationProps", layer, "com.creatide.sketch.animatemate");

To read the value back:

var layer = context.selection.firstObject();
var animationProps = context.command.valueForKey_onLayer_forPluginIdentifier("animationProps", layer, "com.creatide.sketch.animatemate");

Looking forward to seeing how you take this plugin forward. Good luck 👍

@design4use
Copy link

I was just going to suggest the same thing. Layers can now store data like
json constructs!

On Sat, Mar 12, 2016 at 8:44 AM, Aby Nimbalkar [email protected]
wrote:

@niittymaa https://github.com/niittymaa congrats on making an awesome
plugin. Such a great start!

One quick suggestion: You can save animation properties as layer metadata
instead of using the layer name (which is prone to errors since layer names
can easily be changed by users). It's easy to set the metadata using
MSPluginCommand (docs for reference:
https://developer.sketchapp.com/reference/MSPluginCommand/)

For example, to set the value:

var layer = context.selection.firstObject();
context.command.setValue_forKey_onLayer_forPluginIdentifier(animationProps, "animationProps", layer, "com.creatide.sketch.animatemate");

To read the value back:

var layer = context.selection.firstObject();
var animationProps = context.command.valueForKey_onLayer_forPluginIdentifier("animationProps", layer, "com.creatide.sketch.animatemate");

Looking forward to seeing how you take this plugin forward. Good luck [image:
👍]


Reply to this email directly or view it on GitHub
#1.

@niittymaa
Copy link
Collaborator

You're totally right, but in this stage when you have no other indicators about animations/properties it will lead confuses users because you need to remember where's the animation exist. This is absolutely the right way when we have more visual way to manage animations e.g. some kind timeline UI. But with current basic dialog windows this will not work so well. So we need to investigate how to make UI dialogs that can overlap with Sketch (similar as in Craft).

@niittymaa
Copy link
Collaborator

I close this now at this point. But this is something that will be investigated more in the future after we got more visual workflow with UI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants