Photoshop - Generate - Image Assets intermittently ignores masks when generating assets

  • 2
  • Problem
  • Updated 10 months ago
I've been dealing with this quirky behavior for months:

When apply vector or pixel masks to layers that are generating web assets, the masks will sometime be ignored and the generated assets are incorrect. Sometimes generator  renders the change immediately , and other times it takes a few seconds, and frustratingly often it never renders. When I say render I mean rendering the actual asset file as viewed in Bridge or the Mac finder window.

Work arounds include deleting and re-adding the masks or turning off- unchecking the menu item - "File/Generate", and then restarting Generate. 

I have created scripts for removing and re-adding all the masks in a multi-layer psd just to deal with this problem and even then sometimes generator ignores the masks - it seems to work better to go through each layer and delete the masks one at a time and then re-add it. 

Another scenario in which a mask misbehaves every time - and stops rendering correctly is this: 
  • Move a layer with a mask from psd-a to psd-b and the mask gets ignored in psd-b. The mask needs to be added in the same psd file to get recognized.

To be clear - the masks are used to crop out unwanted pixels, and/or to add padding in layers with transparency. 

Is there a way to force generator to look at the layers and render correctly? Or am I missing something?
Photo of Ron Troyer

Ron Troyer

  • 3 Posts
  • 1 Reply Like
  • mystified and frustrated

Posted 10 months ago

  • 2
Photo of Max Johnson

Max Johnson, Champion

  • 401 Posts
  • 174 Reply Likes
I also have intermittent issues with generator losing its mind when I change things on smart objects, but I don't have a solid repro case...
I have had luck fixing it by grouping the offending layer, copy-pasting the layer's name to the group, renaming original layer "tmp", changing one character in the group name, changing it back, then copy-pasting that back on top of the original layer. 

Because this seems to fix it, I assume there's some meta-data in the layer's generator settings that are being ignored or not being updated until it sees a new layer ID and name change?
Photo of Ron Troyer

Ron Troyer

  • 3 Posts
  • 1 Reply Like
Max,
I tried renaming the layer to force the offending layer to get recognized=no luck
But following your bizarre sequence did work for me. 

Note:  another instance when a layer mask misbehaves is when:
  • a masked layer that does work is duplicated ---- the duplicated layer's mask does not.
  • delete and re-add the duplicated layer's mask and it works
Photo of Max Johnson

Max Johnson, Champion

  • 400 Posts
  • 174 Reply Likes
I... I feel icky even saying this, but I wonder if you could make an action that does the crazy workaround? Or would it end up being layer-name-specific and break?