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>2010-02-09 14:59:02 +0300
committerJoshua Leung <aligorith@gmail.com>2010-02-09 14:59:02 +0300
commit3f529256ebeb99536a52d6dd9cb20c69ced8c164 (patch)
tree8335116ca1c12f9267d01ee7695e86bf3d6fce35 /source/blender/editors/animation/anim_channels_defines.c
parent0e7c973e06c9e3cb42a68350a60d96c3d3a82e6d (diff)
More bugfixes for setting visibility of anim channels using VKEY:
* Fixed problem where selecting an individual F-Curve would not set the selection correctly. Group channels still needed a separate selection check before they get included in the filtered list. I had removed this in an earlier fixing commit today, but overlooked that expanded groups wouldn't get this check. Therefore, group channels would also be flushed on, turning all channels of group on. * Removed the 'curvesonly' test from deciding whether the selection status + collapsed group fix, from the earlier commit, since this was making a few cases get overlooked (namely for setting visibility toggles, where selected F-Curves in closed and deselected groups still managed to get through) * Added a debugging print API call for helping with debugging this sort of error in future. It just prints the types of channels being operated on, to easily see what's going on...
Diffstat (limited to 'source/blender/editors/animation/anim_channels_defines.c')
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 81d8ef5fa5a..afcab9cea07 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -2302,6 +2302,36 @@ bAnimChannelType *ANIM_channel_get_typeinfo (bAnimListElem *ale)
/* --------------------------- */
+/* Print debug info string for the given channel */
+void ANIM_channel_debug_print_info (bAnimListElem *ale, short indent_level)
+{
+ bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
+
+ /* print indents */
+ for (; indent_level > 0; indent_level--)
+ printf(" ");
+
+ /* print info */
+ if (acf) {
+ char name[256]; /* hopefully this will be enough! */
+
+ /* get UI name */
+ if (acf->name)
+ acf->name(ale, name);
+ else
+ sprintf(name, "<No name>");
+
+ /* print type name + ui name */
+ printf("ChanType: <%s> Name: \"%s\"\n", acf->channel_type_name, name);
+ }
+ else if (ale)
+ printf("ChanType: <Unknown - %d>\n", ale->type);
+ else
+ printf("<Invalid channel - NULL>\n");
+}
+
+/* --------------------------- */
+
/* Check if some setting for a channel is enabled
* Returns: 1 = On, 0 = Off, -1 = Invalid
*/