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:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user