[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49979] trunk/blender/source/blender/ editors/animation/anim_deps.c: Selecting nodes (and making one active) sets active F-Curve too now
Joshua Leung
aligorith at gmail.com
Sat Aug 18 07:26:47 CEST 2012
Revision: 49979
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49979
Author: aligorith
Date: 2012-08-18 05:26:40 +0000 (Sat, 18 Aug 2012)
Log Message:
-----------
Selecting nodes (and making one active) sets active F-Curve too now
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/anim_deps.c
Modified: trunk/blender/source/blender/editors/animation/anim_deps.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_deps.c 2012-08-18 05:14:21 UTC (rev 49978)
+++ trunk/blender/source/blender/editors/animation/anim_deps.c 2012-08-18 05:26:40 UTC (rev 49979)
@@ -246,7 +246,7 @@
seq = BKE_sequwnce_get_by_name(ed->seqbasep, seq_name, FALSE);
if (seq_name) MEM_freeN(seq_name);
- /* can only add this F-Curve if it is selected */
+ /* update selection status */
if (seq) {
if (seq->flag & SELECT)
fcu->flag |= FCURVE_SELECTED;
@@ -268,12 +268,31 @@
node = nodeFindNodebyName(ntree, node_name);
if (node_name) MEM_freeN(node_name);
- /* can only add this F-Curve if it is selected */
+ /* update selection/active status */
if (node) {
+ /* update selection status */
if (node->flag & NODE_SELECT)
fcu->flag |= FCURVE_SELECTED;
else
fcu->flag &= ~FCURVE_SELECTED;
+
+ /* update active status */
+ /* XXX: this may interfere with setting bones as active if both exist at once;
+ * then again, if that's the case, production setups aren't likely to be animating
+ * nodes while working with bones?
+ */
+ if (node->flag & NODE_ACTIVE) {
+ if (*active_fcurve == NULL) {
+ fcu->flag |= FCURVE_ACTIVE;
+ *active_fcurve = fcu;
+ }
+ else {
+ fcu->flag &= ~FCURVE_ACTIVE;
+ }
+ }
+ else {
+ fcu->flag &= ~FCURVE_ACTIVE;
+ }
}
}
}
More information about the Bf-blender-cvs
mailing list