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.
This commit is contained in:
2014-07-18 11:34:35 +02:00
parent 813ece7f79
commit cf3bb40c62
38 changed files with 152 additions and 152 deletions

View File

@@ -1,4 +1,4 @@
import bpy
bpy.context.object.data.sensor_width = 24.4
bpy.context.object.data.sensor_height = 13.5
bpy.context.object.data.sensor_fit = 'HORIZONTAL'
bpy.context.camera.sensor_width = 24.4
bpy.context.camera.sensor_height = 13.5
bpy.context.camera.sensor_fit = 'HORIZONTAL'