tylergaw/day-player

Feature Request: Replace Selected Items

Closed this issue · 4 comments

Day Player has excellent features, but I do miss the ability that other image plugins have to select a rectangle, and have the generated image automatically replace it - in the right location, and with the right dimensions. Having to select the artboard or a group seems counter-intuitive in comparison...

Other plugins also allow me to select more than one rectangle, and replace each one with a different, automatically generated image (at the appropriate size for that rectangle). This saves a great deal of time - no need to remember the dimensions of each rectangle, nor to call the plugin several times individually.

Hey @luxlogica thanks for the feedback. I don't have the bandwidth to make modifications to the plugin right now, but pull requests are always welcome if you want to work on getting those changes in.

@tylergaw I wish I could - I love your plugin - but unfortunately my programming skills do not extend to Cocoa... :-(

If it helps at all, I noticed that your plugin actually creates an new picture element on the artboard, while the other plugins seem to simply set the picture as the background fill of the selected item(s).

@luxlogica ahh, what about JavaScript? If so, you're in luck. I don't know Cocoa either, what's cool is that sketch plugins use CocoaScript so they mostly behave like plain ole JavaScript with a few twists and turns thrown in. Check out the docs here https://www.sketchapp.com/support/developer/01-introduction/01.html It's super cool, that's how I was able to to this plugin.

@luxlogica In the latest release, 3.0, I added a similar feature to this. https://github.com/tylergaw/day-player#creating-images-with-dimensions-and-position-of-existing-layers

I don't replace the existing layer and currently it just does one image at a time, but maybe that'll work?