Fix T41081: Presets not working on pinned properties panels.
authorLukas Tönne <lukas.toenne@gmail.com>
Fri, 18 Jul 2014 09:34:35 +0000 (11:34 +0200)
committerLukas Tönne <lukas.toenne@gmail.com>
Fri, 18 Jul 2014 09:37:57 +0000 (11:37 +0200)
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.

38 files changed:
release/scripts/presets/camera/1__colon__2.3_inch.py
release/scripts/presets/camera/1__colon__2.5_inch.py
release/scripts/presets/camera/2__colon__3_inch.py
release/scripts/presets/camera/4__colon__3_inch.py
release/scripts/presets/camera/Arri_Alexa.py
release/scripts/presets/camera/Blackmagic_Cinema_Camera.py
release/scripts/presets/camera/Blender.py
release/scripts/presets/camera/Canon_1100D.py
release/scripts/presets/camera/Canon_APS-C.py
release/scripts/presets/camera/Canon_APS-H.py
release/scripts/presets/camera/Canon_C300.py
release/scripts/presets/camera/Full_Frame_35mm_Camera.py
release/scripts/presets/camera/GoPro_Hero3_Black.py
release/scripts/presets/camera/GoPro_Hero3_Silver.py
release/scripts/presets/camera/GoPro_Hero3_White.py
release/scripts/presets/camera/Nexus_5.py
release/scripts/presets/camera/Nikon_D3100.py
release/scripts/presets/camera/Nikon_DX.py
release/scripts/presets/camera/Panasonic_AG-HVX200.py
release/scripts/presets/camera/Panasonic_LX2.py
release/scripts/presets/camera/Red_Epic.py
release/scripts/presets/camera/Red_One_2K.py
release/scripts/presets/camera/Red_One_3K.py
release/scripts/presets/camera/Red_One_4K.py
release/scripts/presets/camera/Samsung_Galaxy_S3.py
release/scripts/presets/camera/Samsung_Galaxy_S4.py
release/scripts/presets/camera/Sony_A55.py
release/scripts/presets/camera/Sony_EX1.py
release/scripts/presets/camera/Sony_F65.py
release/scripts/presets/camera/Super_16_Film.py
release/scripts/presets/camera/Super_35_Film.py
release/scripts/presets/camera/iPhone_4.py
release/scripts/presets/camera/iPhone_4S.py
release/scripts/presets/camera/iPhone_5.py
release/scripts/presets/sunsky/classic.py
release/scripts/presets/sunsky/desert.py
release/scripts/presets/sunsky/mountain.py
release/scripts/startup/bl_operators/presets.py

index 829a060ab358f9cff06516d7f91489eee399322e..72548384401c27bcf92e63326576833631d6d7eb 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 6.16
-bpy.context.object.data.sensor_height = 4.62
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 6.16
+bpy.context.camera.sensor_height = 4.62
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 3ddd240ab5098aa0af8f54d356a8f42d37469249..90f60e7d7f0fb60c18bb60557adf003628a83b13 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 5.76
-bpy.context.object.data.sensor_height = 4.29
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 5.76
+bpy.context.camera.sensor_height = 4.29
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index edf3bbba2c903cd55df23c5abbe8fd939e283244..46436970efca3d78d26f1db63c6b83a40a8bdcad 100644 (file)
@@ -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'
index 6e38782c4d84597a1bc7c02e9118ee3527b5baad..88346c01ef810e2656a61c2246e94668fd9929dd 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 17.31
-bpy.context.object.data.sensor_height = 12.98
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 17.31
+bpy.context.camera.sensor_height = 12.98
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 2bdcf12240bfab4e26612eb56e66d2a5c5c7ec7d..6a6cdfee12b9d51e53247909e8ae397ead9f80a7 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 23.760
-bpy.context.object.data.sensor_height = 13.365
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 23.760
+bpy.context.camera.sensor_height = 13.365
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 402a5b30cbbe72518539c68c115e773797b5bcf5..6fde30756dac1b864854979d0fe68154adb2ac88 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 15.81
-bpy.context.object.data.sensor_height = 8.88
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 15.81
+bpy.context.camera.sensor_height = 8.88
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 9fa4ab752e364d96748cbdf4096f5126327acbc8..ca4906fbb392fd2de81ba80f99f5f4d295f5d3a0 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 32
-bpy.context.object.data.sensor_height = 18
-bpy.context.object.data.sensor_fit = 'AUTO'
+bpy.context.camera.sensor_width = 32
+bpy.context.camera.sensor_height = 18
+bpy.context.camera.sensor_fit = 'AUTO'
index 54f2cf75b540e6a6212f5998d6fcdba03a62b3ad..e665e9e95d54d6a9d8be27ad1bcd11427ce23002 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 22.2
-bpy.context.object.data.sensor_height = 14.7
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 22.2
+bpy.context.camera.sensor_height = 14.7
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 829e03cc5cfadc47fb7daea9cc3d9c7d455d8bb6..95108b2187f23dd57263e413ba57b59cde1ca900 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 22.3
-bpy.context.object.data.sensor_height = 14.9
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 22.3
+bpy.context.camera.sensor_height = 14.9
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index d5cc02f4e4ad2be7e98afe7791692cfaf40c5ccc..d3b61d1aa46b15eb9ba1e462dffac81a106cb974 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 27.90
-bpy.context.object.data.sensor_height = 18.60
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 27.90
+bpy.context.camera.sensor_height = 18.60
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 70c760c73b5db2d60d77c209a384df4b212ffa7e..e22af779854a5db2da019c0bd56060652abff856 100644 (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'
index d3e141ba4d9fd22be27ede91ff887cf2afa9658e..c8017331b285082283e21269d8efbdc0e8659f6f 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 36
-bpy.context.object.data.sensor_height = 24
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 36
+bpy.context.camera.sensor_height = 24
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 9cea698d8abdb06cf1fdfd59773fced8a975c34f..e294f802a02d00f82c7c400d7c02fd71ca3c1428 100644 (file)
@@ -1,6 +1,6 @@
 import bpy
-bpy.context.object.data.sensor_width = 6.16
-bpy.context.object.data.sensor_height = 4.62
-bpy.context.object.data.lens = 2.77
+bpy.context.camera.sensor_width = 6.16
+bpy.context.camera.sensor_height = 4.62
+bpy.context.camera.lens = 2.77
 
-bpy.context.object.data.sensor_fit = 'AUTO'
+bpy.context.camera.sensor_fit = 'AUTO'
index 1eee0750c2d26a30d448aa8163617e7c85884ff8..247bd7c4aaf5d4a9265874b72814415fdc968222 100644 (file)
@@ -1,6 +1,6 @@
 import bpy
-bpy.context.object.data.sensor_width = 5.371
-bpy.context.object.data.sensor_height = 4.035
-bpy.context.object.data.lens = 2.77
+bpy.context.camera.sensor_width = 5.371
+bpy.context.camera.sensor_height = 4.035
+bpy.context.camera.lens = 2.77
 
-bpy.context.object.data.sensor_fit = 'AUTO'
+bpy.context.camera.sensor_fit = 'AUTO'
index 3d1f368aab0fc18d78a2d0986c0b4aed539ba44d..948f838f5d6f51a0e79a3e48a3e93bedfc49bc5d 100644 (file)
@@ -1,6 +1,6 @@
 import bpy
-bpy.context.object.data.sensor_width = 5.76
-bpy.context.object.data.sensor_height = 4.29
-bpy.context.object.data.lens = 2.77
+bpy.context.camera.sensor_width = 5.76
+bpy.context.camera.sensor_height = 4.29
+bpy.context.camera.lens = 2.77
 
-bpy.context.object.data.sensor_fit = 'AUTO'
+bpy.context.camera.sensor_fit = 'AUTO'
index aa781782acb4a1df0ed24afa862ddd05b06cd67a..36e741cbba558116e8e88d6cd24d8ed4dc6c80dd 100644 (file)
@@ -1,5 +1,5 @@
 import bpy
-bpy.context.object.data.sensor_width = 4.5
-bpy.context.object.data.sensor_height = 3.37
-bpy.context.object.data.lens = 3.91
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 4.5
+bpy.context.camera.sensor_height = 3.37
+bpy.context.camera.lens = 3.91
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 238d9c22d122af22859d66c7d8fb816b45f1329d..b4ceb3aa721b07e88cea5d6aa7833cb859aa93bd 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 23.1
-bpy.context.object.data.sensor_height = 15.4
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 23.1
+bpy.context.camera.sensor_height = 15.4
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index a0505bf9b9c33822745d3c89a278be6b97eb4249..dbe9e7fcc18654476636933720c6ac7342a25962 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 23.6
-bpy.context.object.data.sensor_height = 15.8
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 23.6
+bpy.context.camera.sensor_height = 15.8
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index ee82cbe9bf0f453d6703536094b0355e62bc33b9..71ad3c3a161bb4d5f288e68d165d5aa2f2c29b48 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 4.68
-bpy.context.object.data.sensor_height = 2.633
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 4.68
+bpy.context.camera.sensor_height = 2.633
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 8e0f844e5079efa1230b9b90644fd49c39979118..d66e02e32d45761c66532209fa7a8dc3a77e37a7 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 8.5
-bpy.context.object.data.sensor_height = 4.78
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 8.5
+bpy.context.camera.sensor_height = 4.78
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 14f4abaee9003f172a04a8a66cb53590c1ead4c5..5d71a69a33da084765b1acc3e5b74c4879d266f1 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 30.0
-bpy.context.object.data.sensor_height = 15.0
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 30.0
+bpy.context.camera.sensor_height = 15.0
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index ef2708f75b21891df77b6cd0146559d2641e76eb..894aedcf9ea445536979dccd1edc18d8e010f9c5 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 11.1
-bpy.context.object.data.sensor_height = 6.24
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 11.1
+bpy.context.camera.sensor_height = 6.24
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 5ddff2746eb2f182dd848540e64669891f58cf3b..9ac84c1485a18bb5f2d2b9e8793ed60a7e4871a7 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 16.65
-bpy.context.object.data.sensor_height = 9.36
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 16.65
+bpy.context.camera.sensor_height = 9.36
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 8ab9b38cbd5f22b6ea18aa7efbfd9f853d771583..067322cd07e9f0b832f2c6eecee20ae364363f80 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 22.2
-bpy.context.object.data.sensor_height = 12.6
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 22.2
+bpy.context.camera.sensor_height = 12.6
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 35670042e48d9f72d9404438758d9bde6a745c5d..23eaea7cd27a31f86e13102e5b0d1d8b1f33b4fd 100644 (file)
@@ -1,5 +1,5 @@
 import bpy
-bpy.context.object.data.sensor_width = 4.8
-bpy.context.object.data.sensor_height = 3.6
-bpy.context.object.data.lens = 3.70
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 4.8
+bpy.context.camera.sensor_height = 3.6
+bpy.context.camera.lens = 3.70
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index ae16d4172f94db458b79a0e7e3acc84d8a0fcd62..cc929d26dacbc3b8bb8090d61642a64f128c1683 100644 (file)
@@ -1,5 +1,5 @@
 import bpy
-bpy.context.object.data.sensor_width = 4.8
-bpy.context.object.data.sensor_height = 3.6
-bpy.context.object.data.lens = 4.20
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 4.8
+bpy.context.camera.sensor_height = 3.6
+bpy.context.camera.lens = 4.20
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index b0f172206fa5de861b448d9b549cfa1648e7af56..0468deb6d4c0ee8f40565f48e7045caf287460c2 100644 (file)
@@ -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'
index 00708175b401684858f224366d7e5bf8d851b9cc..3c6b235f21e5e24d123c12d5e2d1f09c015750d5 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 6.97
-bpy.context.object.data.sensor_height = 3.92
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 6.97
+bpy.context.camera.sensor_height = 3.92
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index e187828058b438c10e16ac314ea4f797f54aae97..e62b35118368b81608118b2576aefec8f5a18529 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 24.33
-bpy.context.object.data.sensor_height = 12.83
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 24.33
+bpy.context.camera.sensor_height = 12.83
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 1e42953bf0525ac23eba45fd43e0183039dd4cf8..4ca397a7e271ae48e158221d2cb4687e8ed50a0f 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 12.52
-bpy.context.object.data.sensor_height = 7.41
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 12.52
+bpy.context.camera.sensor_height = 7.41
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 65ccb0f216c3e56b93910db07a6ec5cce7ffa768..b22ff545c684785efacbdd658b059d518014d7a1 100644 (file)
@@ -1,4 +1,4 @@
 import bpy
-bpy.context.object.data.sensor_width = 24.89
-bpy.context.object.data.sensor_height = 18.66
-bpy.context.object.data.sensor_fit = 'HORIZONTAL'
+bpy.context.camera.sensor_width = 24.89
+bpy.context.camera.sensor_height = 18.66
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index b87dda18097d4413e8ae2f6a68cf42c98e67b4d3..1e43cd11494b3078845b23fc3fb2f6c56d30c6f4 100644 (file)
@@ -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'
index ea747f339d4a34863c834f2531d33fcea000817f..1139b7395b503a475690da25a7205b077a25fcd4 100644 (file)
@@ -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 = 4.28
-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 = 4.28
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 2764788a405165d53f8b5a136150542264051f67..a6b6bbc2ec542a6e4f993bf1d08e12dcb17c0b0c 100644 (file)
@@ -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 = 4.10
-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 = 4.10
+bpy.context.camera.sensor_fit = 'HORIZONTAL'
index 4394dcce24247da76debbbe7f1b1bac40acb3906..edb065d553cb7bed54fb7f39d17fd3f1a4d4eec1 100644 (file)
@@ -1,14 +1,14 @@
 import bpy
-bpy.context.object.data.sky.atmosphere_turbidity = 4.0
-bpy.context.object.data.sky.sky_blend_type = 'ADD'
-bpy.context.object.data.sky.sky_blend = 1.0
-bpy.context.object.data.sky.horizon_brightness = 10.0
-bpy.context.object.data.sky.spread = 1.49011614159e-09
-bpy.context.object.data.sky.sky_color_space = 'SMPTE'
-bpy.context.object.data.sky.sky_exposure = 1.0
-bpy.context.object.data.sky.sun_brightness = 1.00000011921
-bpy.context.object.data.sky.sun_size = 1.00000166893
-bpy.context.object.data.sky.backscattered_light = 0.0
-bpy.context.object.data.sky.sun_intensity = 4.0
-bpy.context.object.data.sky.atmosphere_inscattering = 1.0
-bpy.context.object.data.sky.atmosphere_extinction = 1.0
+bpy.context.lamp.sky.atmosphere_turbidity = 4.0
+bpy.context.lamp.sky.sky_blend_type = 'ADD'
+bpy.context.lamp.sky.sky_blend = 1.0
+bpy.context.lamp.sky.horizon_brightness = 10.0
+bpy.context.lamp.sky.spread = 1.49011614159e-09
+bpy.context.lamp.sky.sky_color_space = 'SMPTE'
+bpy.context.lamp.sky.sky_exposure = 1.0
+bpy.context.lamp.sky.sun_brightness = 1.00000011921
+bpy.context.lamp.sky.sun_size = 1.00000166893
+bpy.context.lamp.sky.backscattered_light = 0.0
+bpy.context.lamp.sky.sun_intensity = 4.0
+bpy.context.lamp.sky.atmosphere_inscattering = 1.0
+bpy.context.lamp.sky.atmosphere_extinction = 1.0
index f68ea23845b204b1e45348e62addf5ebabe5b6fe..8dd587a6eafeacc87adbac79fc252cc72a2219d2 100644 (file)
@@ -1,14 +1,14 @@
 import bpy
-bpy.context.object.data.sky.atmosphere_turbidity = 6.0
-bpy.context.object.data.sky.sky_blend_type = 'ADD'
-bpy.context.object.data.sky.sky_blend = 1.0
-bpy.context.object.data.sky.horizon_brightness = 4.99999761581
-bpy.context.object.data.sky.spread = 1.49011614159e-09
-bpy.context.object.data.sky.sky_color_space = 'SMPTE'
-bpy.context.object.data.sky.sky_exposure = 1.0
-bpy.context.object.data.sky.sun_brightness = 1.00000011921
-bpy.context.object.data.sky.sun_size = 4.0
-bpy.context.object.data.sky.backscattered_light = 1.0
-bpy.context.object.data.sky.sun_intensity = 1.0
-bpy.context.object.data.sky.atmosphere_inscattering = 1.0
-bpy.context.object.data.sky.atmosphere_extinction = 1.0
+bpy.context.lamp.sky.atmosphere_turbidity = 6.0
+bpy.context.lamp.sky.sky_blend_type = 'ADD'
+bpy.context.lamp.sky.sky_blend = 1.0
+bpy.context.lamp.sky.horizon_brightness = 4.99999761581
+bpy.context.lamp.sky.spread = 1.49011614159e-09
+bpy.context.lamp.sky.sky_color_space = 'SMPTE'
+bpy.context.lamp.sky.sky_exposure = 1.0
+bpy.context.lamp.sky.sun_brightness = 1.00000011921
+bpy.context.lamp.sky.sun_size = 4.0
+bpy.context.lamp.sky.backscattered_light = 1.0
+bpy.context.lamp.sky.sun_intensity = 1.0
+bpy.context.lamp.sky.atmosphere_inscattering = 1.0
+bpy.context.lamp.sky.atmosphere_extinction = 1.0
index 9b81ffd4399f764fa6ab7d7b9b9ab1913e37625c..f0540af8100f160631b2d22e4f39016090e76ed9 100644 (file)
@@ -1,14 +1,14 @@
 import bpy
-bpy.context.object.data.sky.atmosphere_turbidity = 2.00000023842
-bpy.context.object.data.sky.sky_blend_type = 'ADD'
-bpy.context.object.data.sky.sky_blend = 1.0
-bpy.context.object.data.sky.horizon_brightness = 0.100000016391
-bpy.context.object.data.sky.spread = 1.0
-bpy.context.object.data.sky.sky_color_space = 'SMPTE'
-bpy.context.object.data.sky.sky_exposure = 1.0
-bpy.context.object.data.sky.sun_brightness = 1.99999988079
-bpy.context.object.data.sky.sun_size = 4.0
-bpy.context.object.data.sky.backscattered_light = -1.0
-bpy.context.object.data.sky.sun_intensity = 10.0
-bpy.context.object.data.sky.atmosphere_inscattering = 1.0
-bpy.context.object.data.sky.atmosphere_extinction = 1.0
+bpy.context.lamp.sky.atmosphere_turbidity = 2.00000023842
+bpy.context.lamp.sky.sky_blend_type = 'ADD'
+bpy.context.lamp.sky.sky_blend = 1.0
+bpy.context.lamp.sky.horizon_brightness = 0.100000016391
+bpy.context.lamp.sky.spread = 1.0
+bpy.context.lamp.sky.sky_color_space = 'SMPTE'
+bpy.context.lamp.sky.sky_exposure = 1.0
+bpy.context.lamp.sky.sun_brightness = 1.99999988079
+bpy.context.lamp.sky.sun_size = 4.0
+bpy.context.lamp.sky.backscattered_light = -1.0
+bpy.context.lamp.sky.sun_intensity = 10.0
+bpy.context.lamp.sky.atmosphere_inscattering = 1.0
+bpy.context.lamp.sky.atmosphere_extinction = 1.0
index 8b0ed7d9942c1da9917dd95ee4d73ce672587be4..f89792bea6ed46d3cb5946c86d3890ee841b818a 100644 (file)
@@ -253,7 +253,7 @@ class AddPresetCamera(AddPresetBase, Operator):
     preset_menu = "CAMERA_MT_presets"
 
     preset_defines = [
-        "cam = bpy.context.object.data"
+        "cam = bpy.context.camera"
     ]
 
     preset_subdir = "camera"
@@ -352,7 +352,7 @@ class AddPresetSunSky(AddPresetBase, Operator):
     preset_menu = "LAMP_MT_sunsky_presets"
 
     preset_defines = [
-        "sky = bpy.context.object.data.sky"
+        "sky = bpy.context.lamp.sky"
     ]
 
     preset_values = [