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/Sony_A55.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/Sony_A55.py')
-rw-r--r-- | release/scripts/presets/camera/Sony_A55.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/presets/camera/Sony_A55.py b/release/scripts/presets/camera/Sony_A55.py index b0f172206fa..0468deb6d4c 100644 --- a/release/scripts/presets/camera/Sony_A55.py +++ b/release/scripts/presets/camera/Sony_A55.py @@ -1,4 +1,4 @@ import bpy -bpy.context.object.data.sensor_width = 23.4 -bpy.context.object.data.sensor_height = 15.6 -bpy.context.object.data.sensor_fit = 'HORIZONTAL' +bpy.context.camera.sensor_width = 23.4 +bpy.context.camera.sensor_height = 15.6 +bpy.context.camera.sensor_fit = 'HORIZONTAL' |