Fixes for bugs noticed during previous fix:
authorJoshua Leung <aligorith@gmail.com>
Sun, 8 May 2011 05:41:57 +0000 (05:41 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sun, 8 May 2011 05:41:57 +0000 (05:41 +0000)
- In Drivers mode of Graph Editor, expanders for sub-object data were
not working at all. This was because they were getting overriden by an
errant ob-level drivers check
- Adding drivers from py-api didn't update Graph Editor

source/blender/editors/animation/anim_filter.c
source/blender/python/intern/bpy_rna_anim.c

index 71893cee89aaee148ac8d33b54cd935fe49a9aaa..967002131c274ec1481c84afc8b6701a682cc8d4 100644 (file)
@@ -1645,10 +1645,6 @@ static int animdata_filter_dopesheet_obdata (bAnimContext *ac, ListBase *anim_da
                        break;
        }
        
-       /* special exception for drivers instead of action */
-       if (ads->filterflag & ADS_FILTER_ONLYDRIVERS)
-               expanded= EXPANDED_DRVD(adt);
-       
        /* include data-expand widget? */
        if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) {       
                /* check if filtering by active status */
index 5e53d4101f6dbbfda561e99cbb51f032ba4d735d..30d83e196ba1858fc752ed9b8be98297c4ab7db0 100644 (file)
@@ -44,6 +44,9 @@
 
 #include "RNA_access.h"
 
+#include "WM_api.h"
+#include "WM_types.h"
+
 #include "bpy_rna.h"
 #include "bpy_util.h"
 #include "bpy_rna_anim.h"
@@ -320,6 +323,8 @@ PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args)
                                RNA_pointer_create(id, &RNA_FCurve, fcu, &tptr);
                                ret= pyrna_struct_CreatePyObject(&tptr);
                        }
+                       
+                       WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION|ND_FCURVES_ORDER, NULL);
                }
                else {
                        /* XXX, should be handled by reports, */
@@ -371,6 +376,8 @@ PyObject *pyrna_struct_driver_remove(BPy_StructRNA *self, PyObject *args)
 
                if(BPy_reports_to_error(&reports, PyExc_RuntimeError, TRUE) == -1)
                        return NULL;
+               
+               WM_event_add_notifier(BPy_GetContext(), NC_ANIMATION|ND_FCURVES_ORDER, NULL);
 
                return PyBool_FromLong(result);
        }