forked from bartvdbraak/blender
cf3bb40c62
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.
7 lines
161 B
Python
7 lines
161 B
Python
import bpy
|
|
bpy.context.camera.sensor_width = 6.16
|
|
bpy.context.camera.sensor_height = 4.62
|
|
bpy.context.camera.lens = 2.77
|
|
|
|
bpy.context.camera.sensor_fit = 'AUTO'
|