Logo
Explore Help
Register Sign In
Cr8-xyz/blender
1
0
Fork 0
You've already forked blender
Code Issues Pull Requests Actions 1 Packages Projects Releases Wiki Activity
Files
8dbbac43bb38442e69e8dcd6a02c424ffb7855df
blender/release/scripts/presets/camera/Canon_APS-C.py

5 lines
135 B
Python
Raw Normal View History

Configurable sensor size: - Added support of variable size sensor width and height. - Added presets for most common cameras, also new presets can be defined by user. - Added option to control which dimension (vertical or horizontal) of sensor size defines FOV. Old behavior of automatic FOV calculation is also kept. - Renderer, viewport, game engine and collada importer/exporter should deal fine with this changes. Other exporters would be updated soon.
2011-11-04 14:36:06 +00:00
import bpy
Fix T41081: Presets not working on pinned properties panels. Preset operators should avoid using `bpy.context.object.data` as a base path to properties. This path is not available in the buttons context when using pinned datablocks! Instead use the specific `bpy.context.camera` and `bpy.context.lamp.sky` paths now, which lead to the correct datablocks in any case.
2014-07-18 11:34:35 +02:00
bpy.context.camera.sensor_width = 22.3
bpy.context.camera.sensor_height = 14.9
bpy.context.camera.sensor_fit = 'HORIZONTAL'
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 3024ms Template: 8ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API