Quantcast
Channel: Adobe Community : Popular Discussions - After Effects SDK
Viewing all articles
Browse latest Browse all 73444

How to get a layer's background color with AE SDK

$
0
0

Hello,

 

I am trying to get the color of the background for my current layer but I can't seem to find how to do it.

By background color, I don't mean the application's background color, but the color that shows through if I set the alpha of my pixels to 0.

For example, suppose the composition background is black, I put a green solid on top of it, then put an image on top of the solid and apply my pug-in to the image.

If I set the alpha to zero in my plug-in, the solid's green will show up.

So I want to be able to find out that my background is green.

 

I already tried using PF_AppGetBgColor() but that returns the application's background color, which is not green in this example.

 

If you want more details about what I want to do, I have plug-in P1 which sets some pixels to 0-alpha. On top of it I apply another plug-in P2 which reveals 0-alpha pixels by blending them with some color.

What happens now is that the output is the original image's color blended with P2's color (because P1 only modified the pixels' alpha).

What I want is to have the color showing through the transparent pixels of P1 blended with P2's color.

To do that, I would like to be able to set the color of the 0-alpha pixels to the background's color in P1.

 

Sorry for the long question.

 

Thanks for your suggestions.


Viewing all articles
Browse latest Browse all 73444

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>