ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Camera Lens Blur - Blur Map Options

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Alex King
Camera Lens Blur - Blur Map Options
on Mar 27, 2020 at 5:29:52 pm

Hey Guys,

Just wondering if anyone knows how or if I can get at the "Effects & Masks" option within the "Blur Map" section of the Camera Lens Blur effect via script.

So far I've got this few lines of code to add the effect and designate the "Blur Map" layer, but I can't seem to get to the second drop down. Any tips would be greatly appreciated. :)

myComp.layer(1).property("Effects").addProperty("ADBE Camera Lens Blur");

myComp.layer(1).property("Effects").property("Camera Lens Blur").property("Blur Radius").setValue(7);

myComp.layer(1).property("Effects").property("Camera Lens Blur").property("Layer").setValue(index);

Return to posts index

Andrei Popa
Re: Camera Lens Blur - Blur Map Options
on Mar 28, 2020 at 8:10:54 pm

I am also curious how that can be done. I enumerated the properties of Camera Lens Blur and they are these:

Blur Radius
Iris Properties
Aspect Ratio
Diffraction Fringe
Iris Properties
Blur Map
Blur Focal Distance
Invert Blur Map
Blur Map
Edge Behavior
Use Linear Working Space
Compositing Options

And the Layer must be a number. I tried setting it to a 2 sized array. Like 1 for first and 2 for second, but that did not work. I also tries setting it to mask property of another layer thinking that maybe After Effects would transform it into a correct value. That did not work either. Looks like that value does not exist for scripting.

I'm all out of ideas for now.

My Envato portfolio.

Return to posts index

Alex King
Re: Camera Lens Blur - Blur Map Options
on Mar 29, 2020 at 6:41:11 am

Ah, man! Thanks for trying all that! 😃

I'm mostly trying to make a little script to speed up adding a bit of depth of field to a scene. Was hoping to generate an adjustment layer with the Camera Lens Blur attached and a solid above that with a Gradient Ramp set up as the Blur Map.

I guess I could try adding a shape layer with a gradient fill instead?

Anyhow, thanks again! :)

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 All Rights Reserved