Created
June 23, 2015 10:26
-
-
Save bomberstudios/2283c3c62a47218138d4 to your computer and use it in GitHub Desktop.
This file contains 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 s = context.selection | |
var v = context.document.currentView() | |
var r = v.totalRectForLayers(s) | |
var artboard = [[MSArtboardGroup alloc] initWithFrame:r]; | |
var page = context.document.currentPage(); | |
[page addLayers:[artboard]]; | |
[artboard setGrid:[page grid]]; | |
[artboard absoluteRect].rect = r; | |
[page moveLayersToArtboards]; | |
[artboard select:YES byExpandingSelection:NO]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you :)