Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2014-07-18 13:34:35 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-07-18 13:37:57 +0400
commitcf3bb40c625716ea083ee453e5263cc9e759ee18 (patch)
treecfb3a85ce25bda3891ca113f39c7f2f8309a4eb8 /release/scripts/startup/bl_operators/presets.py
parent813ece7f7973cf094e92136fbbda17a98ef7e734 (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/startup/bl_operators/presets.py')
-rw-r--r--release/scripts/startup/bl_operators/presets.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py
index 8b0ed7d9942..f89792bea6e 100644
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@ -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 = [