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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-10-20 20:48:48 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-10-20 20:48:48 +0400
commit55015daa43f0ab45341e316abcf11f23c87b5ebe (patch)
tree3156892b6d807d9ba513d444adb870b0ae358e7a /source/blender/editors/animation/anim_filter.c
parent1fe70c07a008185c4e5925aff2c214c93ff396b7 (diff)
parenta9e2e2279780ec2fb58e6820b9cad95ba03f4cad (diff)
Merged changes in the trunk up to revision 51448.
Conflicts resolved: source/blender/blenkernel/CMakeLists.txt source/blender/blenloader/intern/readfile.c source/blender/editors/mesh/editmesh_tools.c source/blender/makesrna/intern/rna_main_api.c
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r--source/blender/editors/animation/anim_filter.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index eb7bc68ff8f..9b88c307cb6 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -994,6 +994,27 @@ static short skip_fcurve_with_name(bDopeSheet *ads, FCurve *fcu, ID *owner_id)
return 1;
}
+/* Check if F-Curve has errors and/or is disabled
+ * > returns: (bool) True if F-Curve has errors/is disabled
+ */
+static short fcurve_has_errors(FCurve *fcu)
+{
+ /* F-Curve disabled - path eval error */
+ if (fcu->flag & FCURVE_DISABLED) {
+ return 1;
+ }
+
+ /* driver? */
+ if (fcu->driver) {
+ /* for now, just check if the entire thing got disabled... */
+ if (fcu->driver->flag & DRIVER_FLAG_INVALID)
+ return 1;
+ }
+
+ /* no errors found */
+ return 0;
+}
+
/* find the next F-Curve that is usable for inclusion */
static FCurve *animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, bActionGroup *grp, int filter_mode, ID *owner_id)
{
@@ -1032,6 +1053,13 @@ static FCurve *animfilter_fcurve_next(bDopeSheet *ads, FCurve *first, bActionGro
continue;
}
+ /* error-based filtering... */
+ if ((ads) && (ads->filterflag & ADS_FILTER_ONLY_ERRORS)) {
+ /* skip if no errors... */
+ if (fcurve_has_errors(fcu) == 0)
+ continue;
+ }
+
/* this F-Curve can be used, so return it */
return fcu;
}