You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a small script to update a shared style and apply it to all layers that inherit it. Currently I can update the shared style, but I'm not quite sure how to "sync" it to all layers.
I see there's an UpdateStyles plugin, but that takes styles from an external document and applies them to another. I want to update shared styles within a document and then update all layers that use it.
The text was updated successfully, but these errors were encountered:
//Iterate with the sharedStylessketch.sharedStyles.forEach(sharedStyle=>{//Update the referenciessketch.pages.forEach(page=>{page.getAll('style',style=>style.sharedObjectID===sharedStyle.do_objectID).forEach(style=>style.applySharedStyle(newSharedStyle));});});
I'm writing a small script to update a shared style and apply it to all layers that inherit it. Currently I can update the shared style, but I'm not quite sure how to "sync" it to all layers.
I see there's an UpdateStyles plugin, but that takes styles from an external document and applies them to another. I want to update shared styles within a document and then update all layers that use it.
The text was updated successfully, but these errors were encountered: