diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-07-18 13:34:35 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-07-18 13:37:57 +0400 |
commit | cf3bb40c625716ea083ee453e5263cc9e759ee18 (patch) | |
tree | cfb3a85ce25bda3891ca113f39c7f2f8309a4eb8 /release/scripts/presets/camera/Super_16_Film.py | |
parent | 813ece7f7973cf094e92136fbbda17a98ef7e734 (diff) |
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.
Diffstat (limited to 'release/scripts/presets/camera/Super_16_Film.py')
-rw-r--r-- | release/scripts/presets/camera/Super_16_Film.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/presets/camera/Super_16_Film.py b/release/scripts/presets/camera/Super_16_Film.py index 1e42953bf05..4ca397a7e27 100644 --- a/release/scripts/presets/camera/Super_16_Film.py +++ b/release/scripts/presets/camera/Super_16_Film.py @@ -1,4 +1,4 @@ import bpy -bpy.context.object.data.sensor_width = 12.52 -bpy.context.object.data.sensor_height = 7.41 -bpy.context.object.data.sensor_fit = 'HORIZONTAL' +bpy.context.camera.sensor_width = 12.52 +bpy.context.camera.sensor_height = 7.41 +bpy.context.camera.sensor_fit = 'HORIZONTAL' |