Curve/Nurbs/Font Animation Bugfixes:

* NURBS and Font animation data now appear in the animation editors. 

* Fixed depsgraph tagging code for determining if the AnimData attached to object data blocks (i.e. animation for curve or lamp data) needs to be tagged for updates on frame changes. This means that animating curve settings now works.
This commit is contained in:
Joshua Leung
2009-12-27 23:37:13 +00:00
parent 351f5d1837
commit 310d417334
5 changed files with 32 additions and 2 deletions

View File

@@ -65,6 +65,7 @@
#include "BLI_ghash.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_effect.h"
#include "BKE_global.h"
@@ -2027,6 +2028,7 @@ static void dag_object_time_update_flags(Object *ob)
if((ob->pose) && (ob->pose->flag & POSE_CONSTRAINTS_TIMEDEPEND)) ob->recalc |= OB_RECALC_DATA;
{
AnimData *adt= BKE_animdata_from_id((ID *)ob->data);
Mesh *me;
Curve *cu;
Lattice *lt;
@@ -2068,6 +2070,11 @@ static void dag_object_time_update_flags(Object *ob)
if(ob->transflag & OB_DUPLI) ob->recalc |= OB_RECALC_DATA;
break;
}
if(animdata_use_time(adt)) {
ob->recalc |= OB_RECALC_DATA;
adt->recalc |= ADT_RECALC_ANIM;
}
if(ob->particlesystem.first) {
ParticleSystem *psys= ob->particlesystem.first;

View File

@@ -66,6 +66,7 @@
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_key.h"
@@ -1303,7 +1304,17 @@ static bAnimChannelType ACF_DSCAM=
// TODO: just get this from RNA?
static int acf_dscur_icon(bAnimListElem *ale)
{
return ICON_CURVE_DATA;
Curve *cu= (Curve *)ale->data;
short obtype= curve_type(cu);
switch (obtype) {
case OB_FONT:
return ICON_FONT_DATA;
case OB_SURF:
return ICON_SURFACE_DATA;
default:
return ICON_CURVE_DATA;
}
}
/* get the appropriate flag(s) for the setting when it is valid */

View File

@@ -1323,6 +1323,8 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
}
break;
case OB_CURVE: /* ------- Curve ---------- */
case OB_SURF: /* ------- Nurbs Surface ---------- */
case OB_FONT: /* ------- Text Curve ---------- */
{
Curve *cu= (Curve *)ob->data;
@@ -1540,6 +1542,8 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
}
break;
case OB_CURVE: /* ------- Curve ---------- */
case OB_SURF: /* ------- Nurbs Surface ---------- */
case OB_FONT: /* ------- Text Curve ---------- */
{
Curve *cu= (Curve *)ob->data;
@@ -1962,6 +1966,8 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bAnimContext *ac, bDo
}
break;
case OB_CURVE: /* ------- Curve ---------- */
case OB_SURF: /* ------- Nurbs Surface ---------- */
case OB_FONT: /* ------- Text Curve ---------- */
{
Curve *cu= (Curve *)ob->data;
dataOk= 0;
@@ -2082,7 +2088,9 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bAnimContext *ac, bDo
dataOk= ANIMDATA_HAS_KEYS(la);
}
break;
case OB_CURVE: /* -------- Curve ---------- */
case OB_CURVE: /* ------- Curve ---------- */
case OB_SURF: /* ------- Nurbs Surface ---------- */
case OB_FONT: /* ------- Text Curve ---------- */
{
Curve *cu= (Curve *)ob->data;
dataOk= ANIMDATA_HAS_KEYS(cu);

View File

@@ -797,6 +797,8 @@ void ob_to_keylist(bDopeSheet *ads, Object *ob, DLRBT_Tree *keys, DLRBT_Tree *bl
}
break;
case OB_CURVE: /* ------- Curve ---------- */
case OB_SURF: /* ------- Nurbs Surface ---------- */
case OB_FONT: /* ------- Text Curve ---------- */
{
Curve *cu= (Curve *)ob->data;

View File

@@ -254,6 +254,8 @@ static short ob_keys_bezier_loop(BeztEditData *bed, Object *ob, BeztEditFunc bez
}
break;
case OB_CURVE: /* ------- Curve ---------- */
case OB_SURF: /* ------- Nurbs Surface ---------- */
case OB_FONT: /* ------- Text Curve ---------- */
{
Curve *cu= (Curve *)ob->data;