Sketch 54 100
Released 09 April, 2019 – read release notes
Changes
Sketching & Drawing Sets. Get your business supplies in bulk and at a great, low price 365 days a year with MichaelsPro™ Packs. Buy Daler Rowney Simply.a5 100gsm Wiro Sketch Book - 54 Sheets online. Fine-grained sketch-based image retrieval (FG-SBIR) addresses the problem of retrieving a particular photo instance given a user's query sketch. Its widespread applicability is however hindered by the fact that drawing a sketch takes time, and most people struggle to draw a complete and faithful sketch. In this paper, we reformulate the conventional FG-SBIR framework to tackle these challenges. I'm Sketch, Welcome to my channelDon't forget to obliterate that like button brotendos.
colors
and gradients
properties have been added on Document and globalAssets
GitHub pull request #345 and #398
sketch.globalAssets
property was added- Two new asset types were added
ColorAsset
- name, type: String (can be null)
- color, type: String
GradientAsset
- name, type: String (can be null)
- gradient, type: Gradient
Usage
Setting Global Colors (Be sure to save a copy of your global assets before playing with this!)
Note that this doesn’t work
Other useful actions
Similarily for Gradients
Setting Global Gradients
Similarly, document colors and document gradients can all be found on Document
Shared styles are now document
properties and can be mutated
Two new properties on document
(try not to get them mixed up as the styles are subtly different!)
sharedLayerStyles
sharedTextStyles
Usage
Setting a Shared Style
layer.index
can now be set
You can set the index of the layer to move it in the hierarchy. Note that you also have layer.moveToFront()
, layer.moveForward()
, layer.moveToBack()
, and layer.moveBackward()
Usage
aspectRatio
property has been added to Gradient
When the gradient is Radial
, the from
and to
points makes one axis of the ellipse of the gradient while the aspect ratio determines the length of the orthogonal axis (aspectRatio 1
means that it’s a circle).
Usage
selected
property and getFrame
method have been added on an Symbol override
Sketch 54 100 In Fraction
The frame of an override can be different than the frame of its affected Layer in case where the Symbol Instance has been scaled or, in the case of the example below, the text value is changed for the Symbol instance resulting in a shorter frame.
Sketch 54 100 In Binary
Usage
layer.duplicate
now works on a layer with no parent
Previously you needed to have a parent in order to duplicate the layer. Now you are free to do so without working around this.
Usage
symbolInstance.master
now works on an immutable instance
If you ever got an MSImmutableSymbolInstance
object and attempted to wrap the native sketch object then you would have previously gotten an error. It has now been fixed.
You can now remove flow targets with setting flow
as undefined
on a Layer
Previously you couldn’t remove a flow target. Now you can!
Usage
pattern
properties have been added to Fill
Sketch 54 100 In Meters
Previously this also applied to the noise
property as well but Sketch has depreciated the noise fill option in favor of having the noise patterns be image fills.
Usage
An image buffer can now be used with ImageData
This change helps with the next one (Export now returns a buffer if output is false)
export
now returns a Buffer if options.output
is false
and options.formats
is an image format
If you ever wanted to get at the thumbnail preview image data when something is marked for export you can do so with this new API functionality.
See this issue for more info why this was added.
Quick Summary of Sketch’s export options
The method returns
undefined
ifoptions.output
isundefined
or a string- an array of
Buffer
ifobjectToExport
is an array andoptions.formats
is an image format - an array of
Object
ifobjectToExport
is an array andoptions.formats
is json - a
Buffer
ifobjectToExport
is a single item andoptions.formats
is an image format - an
Object
ifobjectToExport
is a single item andoptions.formats
is json
Usage
getSelectedDocument
will try harder to find your document
If you are using SKPM, SKPM defines context
as a global so it will prefer to use that first. If there is no current document (via NSDocumentController.sharedDocumentController().currentDocument()
then Sketch will attempt to use NSApplication.sharedApplication().orderedDocuments()
. Ultimately, you don’t really need to know too much about these underlying changes but it is useful to know that .getSelectedDocument()
should work reliabily. If its not, be sure to file an issue.
console.clear
will now clear the DevTools console
Use console.clear()
to clean up your console.
selectedPage
and selectedLayers
can now be set on the Document
Previously these were read-only properties. However, now you can pass in a layer or a page to these objects to set them.
Usage
Add some methods to deal with the Symbols Page
The “Symbols” page is similar to other pages. The only way it is specific is when creating a Symbol, Sketch will ask the user if they want to move it to that page. You can put Symbols in any page but if you want to respect the convention Sketch put in place, here are a few methods to help you do so.
Adds a few methods on Page
getSymbolsPage(document)
- Returns a Page or
undefined
if there is no Symbols page yet
- Returns a Page or
createSymbolsPage()
- Returns a Page
isSymbolsPage()
- Returns a
boolean
- Returns a
Usage
Note that .createSymbolsPage()
won’t prevent you from creating multiple pages that are titled “Symbols”.
If you have multiple pages with “Symbols” I believe that .isSymbolsPage()
will only be true for the earliest created page with the title “Symbols”. Under the hood the API is using: