Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Accessing Camera Settings with javascript

New Here ,
Jan 13, 2020 Jan 13, 2020

Hi, I am struggling with a script to import a camera from a 3d sotfware. 

I am trying to set "Focal Length" property of the said camera, but I can't find anywhere in adobe js docs a way to access these properties ( they are not directly accessible like "Zoom" or "Depth of Field") , they are only accessible when double clicking the CameraLayer Object. 

 

Does anybody have a clue on how to do that ? 

 

TOPICS
How to , Import and export , Scripting
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 13, 2020 Jan 13, 2020

Hey. You can use a script called RD GimmePropPath to get a path to property. Download link http://www.redefinery.com/ae/view.php?item=rd_GimmePropPath

To access Zoom: app.project.item(1).layer("Camera 1").property("ADBE Camera Options Group").property("ADBE Camera Zoom")

Depth of Field: app.project.item(1).layer("Camera 1").property("ADBE Camera Options Group").property("ADBE Camera Depth of Field")

 

Hope that helps.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 15, 2020 Jan 15, 2020

Hey Tomas, thank you for the tip, that a pretty handy script to have.

Unfortunaltely, I am talking about properties that appear only when double clicking the camera layer. "Film Size" and "Focal Length". I can't access them like other classical properties. 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 15, 2020 Jan 15, 2020
LATEST

I see. I must have misread your original question. However, not all properties are available via scripting, this applies not only to a camera.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines