Creatide / AnimateMate

Create your animations directly in Sketch using AnimateMate.
http://AnimateMate.com
MIT License
1.33k stars 78 forks source link

Suggestion: Save animation properties as layer metadata #1

Closed abynim closed 8 years ago

abynim commented 8 years ago

@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: http://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 :+1:

design4use commented 8 years ago

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 notifications@github.com 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: http://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: :+1:]

— Reply to this email directly or view it on GitHub https://github.com/Creatide/AnimateMate/issues/1.

niittymaa commented 8 years ago

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 commented 8 years ago

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.