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/2__colon__3_inch.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/2__colon__3_inch.py')
-rw-r--r-- | release/scripts/presets/camera/2__colon__3_inch.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/presets/camera/2__colon__3_inch.py b/release/scripts/presets/camera/2__colon__3_inch.py index edf3bbba2c9..46436970efc 100644 --- a/release/scripts/presets/camera/2__colon__3_inch.py +++ b/release/scripts/presets/camera/2__colon__3_inch.py @@ -1,4 +1,4 @@ import bpy -bpy.context.object.data.sensor_width = 9.6 -bpy.context.object.data.sensor_height = 5.4 -bpy.context.object.data.sensor_fit = 'HORIZONTAL' +bpy.context.camera.sensor_width = 9.6 +bpy.context.camera.sensor_height = 5.4 +bpy.context.camera.sensor_fit = 'HORIZONTAL' |