[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55262] trunk/blender/source/blender/ editors/space_nla: More AnimData selection fixes
Joshua Leung
aligorith at gmail.com
Thu Mar 14 06:44:56 CET 2013
Revision: 55262
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55262
Author: aligorith
Date: 2013-03-14 05:44:56 +0000 (Thu, 14 Mar 2013)
Log Message:
-----------
More AnimData selection fixes
* Not all supported datatypes would show up in the NLA Properties Region when
selected
* Clicking on the name part of the "Active Action" tracks now selects the
AnimData block that action is attached to
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_nla/nla_buttons.c
trunk/blender/source/blender/editors/space_nla/nla_channels.c
Modified: trunk/blender/source/blender/editors/space_nla/nla_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_nla/nla_buttons.c 2013-03-14 05:01:51 UTC (rev 55261)
+++ trunk/blender/source/blender/editors/space_nla/nla_buttons.c 2013-03-14 05:44:56 UTC (rev 55262)
@@ -131,7 +131,6 @@
case ANIMTYPE_SCENE: /* Top-Level Widgets doubling up as datablocks */
case ANIMTYPE_OBJECT:
- case ANIMTYPE_FILLACTD: /* Action Expander */
case ANIMTYPE_DSMAT: /* Datablock AnimData Expanders */
case ANIMTYPE_DSLAM:
case ANIMTYPE_DSCAM:
@@ -142,6 +141,9 @@
case ANIMTYPE_DSPART:
case ANIMTYPE_DSMBALL:
case ANIMTYPE_DSARM:
+ case ANIMTYPE_DSMESH:
+ case ANIMTYPE_DSTEX:
+ case ANIMTYPE_DSLAT:
case ANIMTYPE_DSSPK:
{
/* for these channels, we only do AnimData */
Modified: trunk/blender/source/blender/editors/space_nla/nla_channels.c
===================================================================
--- trunk/blender/source/blender/editors/space_nla/nla_channels.c 2013-03-14 05:01:51 UTC (rev 55261)
+++ trunk/blender/source/blender/editors/space_nla/nla_channels.c 2013-03-14 05:44:56 UTC (rev 55262)
@@ -265,6 +265,7 @@
{
AnimData *adt = BKE_animdata_from_id(ale->id);
+ /* button area... */
if (x >= (v2d->cur.xmax - NLACHANNEL_BUTTON_WIDTH)) {
if (nlaedit_is_tweakmode_on(ac) == 0) {
/* 'push-down' action - only usable when not in TweakMode */
@@ -280,6 +281,30 @@
/* changes to NLA-Action occurred */
notifierFlags |= ND_NLA_ACTCHANGE;
}
+ /* OR rest of name... */
+ else {
+ /* NOTE: rest of NLA-Action name doubles for operating on the AnimData block
+ * - this is useful when there's no clear divider, and makes more sense in
+ * the case of users trying to use this to change actions
+ */
+
+ /* select/deselect */
+ if (selectmode == SELECT_INVERT) {
+ /* inverse selection status of this AnimData block only */
+ adt->flag ^= ADT_UI_SELECTED;
+ }
+ else {
+ /* select AnimData block by itself */
+ ANIM_deselect_anim_channels(ac, ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
+ adt->flag |= ADT_UI_SELECTED;
+ }
+
+ /* set active? */
+ if (adt->flag & ADT_UI_SELECTED)
+ adt->flag |= ADT_UI_ACTIVE;
+
+ notifierFlags |= (ND_ANIMCHAN | NA_SELECTED);
+ }
}
break;
More information about the Bf-blender-cvs
mailing list