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/iPhone_4.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/iPhone_4.py')
-rw-r--r-- | release/scripts/presets/camera/iPhone_4.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/presets/camera/iPhone_4.py b/release/scripts/presets/camera/iPhone_4.py index b87dda18097..1e43cd11494 100644 --- a/release/scripts/presets/camera/iPhone_4.py +++ b/release/scripts/presets/camera/iPhone_4.py @@ -1,5 +1,5 @@ import bpy -bpy.context.object.data.sensor_width = 4.54 -bpy.context.object.data.sensor_height = 3.42 -bpy.context.object.data.lens = 3.85 -bpy.context.object.data.sensor_fit = 'HORIZONTAL' +bpy.context.camera.sensor_width = 4.54 +bpy.context.camera.sensor_height = 3.42 +bpy.context.camera.lens = 3.85 +bpy.context.camera.sensor_fit = 'HORIZONTAL' |