[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49078] trunk/blender/source/blender/ editors/animation/keyframes_draw.c: Keyframes from lib-linked actions are now drawn ghosted ( just like those of
Joshua Leung
aligorith at gmail.com
Fri Jul 20 14:18:46 CEST 2012
Revision: 49078
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49078
Author: aligorith
Date: 2012-07-20 12:18:45 +0000 (Fri, 20 Jul 2012)
Log Message:
-----------
Keyframes from lib-linked actions are now drawn ghosted (just like those of
protected/unmodifiable channels),
Modified Paths:
--------------
trunk/blender/source/blender/editors/animation/keyframes_draw.c
Modified: trunk/blender/source/blender/editors/animation/keyframes_draw.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframes_draw.c 2012-07-20 11:45:26 UTC (rev 49077)
+++ trunk/blender/source/blender/editors/animation/keyframes_draw.c 2012-07-20 12:18:45 UTC (rev 49078)
@@ -674,15 +674,15 @@
if (keys) {
/* locked channels are less strongly shown, as feedback for locked channels in DopeSheet */
/* TODO: allow this opacity factor to be themed? */
- float kalpha = (channelLocked) ? 0.35f : 1.0f;
-
+ float kalpha = (channelLocked) ? 0.25f : 1.0f;
+
for (ak = keys->first; ak; ak = ak->next) {
/* optimization: if keyframe doesn't appear within 5 units (screenspace) in visible area, don't draw
* - this might give some improvements, since we current have to flip between view/region matrices
*/
if (IN_RANGE_INCL(ak->cfra, v2d->cur.xmin, v2d->cur.xmax) == 0)
continue;
-
+
/* draw using OpenGL - uglier but faster */
/* NOTE1: a previous version of this didn't work nice for some intel cards
* NOTE2: if we wanted to go back to icons, these are icon = (ak->sel & SELECT) ? ICON_SPACE2 : ICON_SPACE3; */
@@ -753,6 +753,10 @@
{
DLRBT_Tree keys, blocks;
+ short locked = (fcu->flag & FCURVE_PROTECTED) ||
+ ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ||
+ ((adt && adt->action) && (adt->action->id.lib));
+
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
@@ -761,7 +765,7 @@
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, (fcu->flag & FCURVE_PROTECTED));
+ draw_keylist(v2d, &keys, &blocks, ypos, locked);
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
@@ -771,6 +775,9 @@
{
DLRBT_Tree keys, blocks;
+ short locked = (agrp->flag & AGRP_PROTECTED) ||
+ ((adt && adt->action) && (adt->action->id.lib));
+
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
@@ -779,7 +786,7 @@
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, (agrp->flag & AGRP_PROTECTED));
+ draw_keylist(v2d, &keys, &blocks, ypos, locked);
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
@@ -789,6 +796,8 @@
{
DLRBT_Tree keys, blocks;
+ short locked = (act->id.lib != 0);
+
BLI_dlrbTree_init(&keys);
BLI_dlrbTree_init(&blocks);
@@ -797,7 +806,7 @@
BLI_dlrbTree_linkedlist_sync(&keys);
BLI_dlrbTree_linkedlist_sync(&blocks);
- draw_keylist(v2d, &keys, &blocks, ypos, 0);
+ draw_keylist(v2d, &keys, &blocks, ypos, locked);
BLI_dlrbTree_free(&keys);
BLI_dlrbTree_free(&blocks);
More information about the Bf-blender-cvs
mailing list