Last active
January 8, 2021 03:16
-
-
Save sonburn/71e05c03ac02cfe10fea5042215dfacd to your computer and use it in GitHub Desktop.
Get or set a value on a layer in Sketch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var value = nil, | |
key = "kModelPropertiesKey", | |
layer = context.selection[0], | |
plugin = "com.animaapp.stc-sketch-plugin"; | |
// Get the value | |
context.command.valueForKey_onLayer_forPluginIdentifier(key,layer,plugin); | |
// Set the value | |
context.command.setValue_forKey_onLayer_forPluginIdentifier(value,key,layer,plugin); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment