Scripting - Paste content inside existing layer.
This is a tough one to solve...
Imagine this situation... I have one normal layer (ArtLayer) that has a mask (UserMask) and two adjustmentlayers linked to this layer.
The goal is to replace the content of the layer, this content is already copied, so it just needs to paste inside this layer.
The problem is that if the layer is linked to any adjustmentlayers OR the mask is chained to the RGB layer (as by default) OR if there is already content inside the RGB it only creates a new layer instead of pasting it in the existing layer. So if there are no linked layers, no mask, and clear the content before pasting, it does work correctly.
I tried serveral methodes to get this to work, but so far no solution. I tried unlinking the layers, but I cannot unchain the mask using scripts, maybe someone here can? I also tried to add a layer reference to the past action manager function, but it seems to ignore that, but I could have implemented it incorrectly.
I know I could use smartObjects instead, I know how I can make that work, but it has a performance hit when updating these layers, so I would first try all my options before resorting to that solution.
I also tried the "paste inside" paste, but with the same results. Also as suggested past, and merge down, but I'm not sure if thats a good solution, I think it may cause unexptected results in some situations, but I will test that for sure.
I hope some wizard can come up with some action manager code that effectively can paste the content in the target layer without changing linked layers, masks, blending modes, transparancies, and so forth.
