adobe-photoshop / generator-core

Core Node.js library for Adobe Photoshop CC's Generator extensibility layer
MIT License
688 stars 97 forks source link

Need API to get group bounds without layer FX #84

Open asamiller opened 11 years ago

asamiller commented 11 years ago

A group containing layers with layer FX shows the bounds of the layers not including the FX. If you're exporting the whole group then the corresponding bounds don't match the exported image. It would be great to get boundsWithFX properties on groups.

timriot commented 11 years ago

@DennisKehrig @timothynoel I think this might be up to Generator to figure out, but I'm not sure where you guys left it.

DennisKehrig commented 11 years ago

We left it at "whoever gets to it first". I think it is better in Photoshop, and I trust more in Tim's knowledge about edge cases to get it right.

Regarding bounds with FX, we're about to check in a pull request to allow getting the exact bounds of layers with effects (on themselves or on their children), though at a price - for the time being we cannot do better.

timriot commented 11 years ago

@DennisKehrig Given my understanding of the issue, I would agree that it would be stellar if @timothynoel could tackle this one.

DennisKehrig commented 11 years ago

He knows about it and hopes to, but he has a lot else on his plate, too :)

timriot commented 11 years ago

@DennisKehrig Is this fixed?

DennisKehrig commented 11 years ago

Seems fixed to me! @asamiller If you have the time, can you confirm or reopen? I'm closing this for now. :)

asamiller commented 11 years ago

Yes it's fixed! thanks guys.

DennisKehrig commented 11 years ago

Awesome, thanks for confirming this, @asamiller!

oddgames-david commented 10 years ago

I'm after the original functionality where I can get the bounds of a group, without effects.

I'm using it to do some layer alignment and drop shadows / strokes get in the way. How can I put this "bug" back?

joelrbrandt commented 10 years ago

@timothynoel does sendLayerThumbnailToNetworkClient have the ability to return bounds / pixmaps of groups without the layer effects applied? I can't find anything in the options, but there are a lot of options. :-)

If not (or even if so), it might be worth spending some time thinking about how we can offer an API endpoint to get detailed bound information. Has your schedule cleared up such that you might be willing to chat about this?

timothynoel commented 10 years ago

You can get thumbnails without the fx applied (and pretty much any arbitrary set of layers and layer settings), but you need to you use the layer range form ("firstLayer"/"lastLayer"), and be very specific about the layers included in the thumbnail, and their settings ("layerSettings" array). So you need to figure out the children for groups, the clipping and adjustment layers, etc. and specify them as visible and what fx/blending you want on each layer. That may not be practical for Generator to figure out.

There's a brief explanation about firstLayer/lastLayer/layerSettings here: https://github.com/adobe-photoshop/generator-core/wiki/Photoshop-Kevlar-API-Additions-for-Generator#sendlayerthumbnailtonetworkclient

But I think it will be easier for everyone if we just supported the option directly in the single layer form of the API.

joelrbrandt commented 10 years ago

@oddgames-david Hopefully that work-around can tide you over.

I've tagged this with our "Masks and Bounds" label, because we're hoping to do a whole bit of feature work to improve how we report bounds info. It's a great specific use case, so as soon as we have time to do any work on bounds, we'll do this work!