Custom Focal length and switch script

Next
 From:  agonyii
9622.1 
Hi,

maybe that was already answered but I could not find an exact info.

I would like to change a perspective focal length from 50mm (if thats default) to on example 150mm or 200mm?
It would be awesome to have a shortcut for switching between a default perspective focal length and the custom one.

Thank you!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
9622.2 In reply to 9622.1 
Hi angonyii, try this script on a shortcut key:

script: /* Toggle field of view */ var other_angle = 40.0; var v = moi.ui.mainWindow.viewpanel.getViewport('3d'); if ( v.projection == 'Perspective' ) { if ( v.fieldOfViewAngle == other_angle ) { v.fieldOfViewAngle = 27.5; } else { v.fieldOfViewAngle = other_angle; } }

Yes, the default angle matches to a 50mm focal length for a 35mm camera.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  agonyii
9622.3 In reply to 9622.2 
Works great! I hope it would be useful to others as well. Thanks so much Michael!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All