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:
authorJoshua Leung <aligorith@gmail.com>2013-09-03 04:28:23 +0400
committerJoshua Leung <aligorith@gmail.com>2013-09-03 04:28:23 +0400
commitbebaa410474fd79fc6f3b4ebeaea82cb170aa364 (patch)
tree5a1019d456fa28fb6cc58aef1c65d31d1d638e59 /source/blender/python/intern
parent67a3b8be9086a187bc008f2536f11018195b42fa (diff)
Tweaks to New Driver creation behaviour
* 'Show Debug' now enabled for all newly created drivers. For most users, it is useful to be able to see this to help figure out what's going on * Removed failed experiment of creating new drivers with Generator FModifiers. I had hoped that this would make it easier to create drivers that doubled or halved the input values, but that has proved to not be the case, and instead made harder for most users to set things up (as they'd have to remove these first). Now, when adding drivers from the UI, these get created with two keyframes (at (0,0) and (1,1) for a 1-1 mapping), which can be easily tweaked normally. However, for backwards compatability of scripts (notably rigify, and perhaps some others out there), when creating drivers from scripts, they will still get created with Generator FModifiers for now. We can review this situation again for 2.7, but for now it seems ok.
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index 6e78a543481..e473af9fac8 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -312,7 +312,8 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args)
BKE_reports_init(&reports, RPT_STORE);
- result = ANIM_add_driver(&reports, (ID *)self->ptr.id.data, path_full, index, 0, DRIVER_TYPE_PYTHON);
+ result = ANIM_add_driver(&reports, (ID *)self->ptr.id.data, path_full, index,
+ CREATEDRIVER_WITH_FMODIFIER, DRIVER_TYPE_PYTHON);
if (BPy_reports_to_error(&reports, PyExc_RuntimeError, true) == -1)
return NULL;