diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-12-28 08:45:15 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-12-28 08:45:15 +0300 |
commit | 71da1e96d174fe23da58af3119ccc7c653357585 (patch) | |
tree | 77b398687fdc61a72867bfcf1884934ec047f284 /source/blender/python | |
parent | 24ae6f8c91f598581b6f0cd7cc49182e7dcf3959 (diff) |
Drivers Code Cleanups and UI Tweaks:
- Adding drivers from the UI (not from py-scripts though) will now
automatically add a "Transform Channel" driver variable to the newly
created drivers. This makes setting up drivers a bit more convenient
for the most commonly used case.
- Drivers now report their errors using the Reports system instead of
writing these directly to the console.
- Clarified some comments to be more insightful about the "why's" of
some design decisions, and related formatting/cleanup tweaks
- Reduced scope of "path" vars to just the scope they're required in
- Removed some unused defines from a failed experiment in the original
Keying Sets code ("templates" and "template flags") which was
superseeded by the more flexible + nicer "Builtin KeyingSets"
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/intern/bpy_rna.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 2463041cda8..d00c593d150 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -2241,7 +2241,7 @@ static PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args) if(pyrna_struct_anim_args_parse(&self->ptr, "bpy_struct.driver_add():", path, &path_full, &index) < 0) return NULL; - if(ANIM_add_driver((ID *)self->ptr.id.data, path_full, index, 0, DRIVER_TYPE_PYTHON)) { + if(ANIM_add_driver(/*ReportList*/NULL, (ID *)self->ptr.id.data, path_full, index, 0, DRIVER_TYPE_PYTHON)) { ID *id= self->ptr.id.data; AnimData *adt= BKE_animdata_from_id(id); FCurve *fcu; @@ -2300,7 +2300,7 @@ static PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args) if(pyrna_struct_anim_args_parse(&self->ptr, "bpy_struct.driver_remove():", path, &path_full, &index) < 0) return NULL; - ret= PyBool_FromLong(ANIM_remove_driver((ID *)self->ptr.id.data, path_full, index, 0)); + ret= PyBool_FromLong(ANIM_remove_driver(/*ReportList*/NULL, (ID *)self->ptr.id.data, path_full, index, 0)); MEM_freeN(path_full); |