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>2011-01-05 03:37:21 +0300
committerJoshua Leung <aligorith@gmail.com>2011-01-05 03:37:21 +0300
commit09852b9a58e49cf1c33af59a88d5dac9bbfc8697 (patch)
tree997122794671d36ec49ad679f19658ca171bb37f /source/blender/editors/animation/anim_filter.c
parent95dcf11a8865f4b3da98066175b88e5810d0fec6 (diff)
Animation data for lattices is now shown in the Animaton Editors
Diffstat (limited to 'source/blender/editors/animation/anim_filter.c')
-rw-r--r--source/blender/editors/animation/anim_filter.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 791955dcfba..e3669dd1077 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -626,6 +626,19 @@ bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, s
ale->adt= BKE_animdata_from_id(data);
}
break;
+ case ANIMTYPE_DSLAT:
+ {
+ Lattice *lt= (Lattice *)data;
+ AnimData *adt= lt->adt;
+
+ ale->flag= FILTER_LATTICE_OBJD(lt);
+
+ ale->key_data= (adt) ? adt->action : NULL;
+ ale->datatype= ALE_ACT;
+
+ ale->adt= BKE_animdata_from_id(data);
+ }
+ break;
case ANIMTYPE_DSSKEY:
{
Key *key= (Key *)data;
@@ -1583,6 +1596,14 @@ static int animdata_filter_dopesheet_obdata (bAnimContext *ac, ListBase *anim_da
expanded= FILTER_MESH_OBJD(me);
}
break;
+ case OB_LATTICE: /* ---- Lattice ---- */
+ {
+ Lattice *lt = (Lattice *)ob->data;
+
+ type= ANIMTYPE_DSLAT;
+ expanded= FILTER_LATTICE_OBJD(lt);
+ }
+ break;
}
/* special exception for drivers instead of action */
@@ -1841,6 +1862,19 @@ static int animdata_filter_dopesheet_ob (bAnimContext *ac, ListBase *anim_data,
}
}
break;
+ case OB_LATTICE: /* ------- Lattice ---------- */
+ {
+ Lattice *lt= (Lattice *)ob->data;
+
+ if ((ads->filterflag & ADS_FILTER_NOLAT) == 0) {
+ ANIMDATA_FILTER_CASES(lt,
+ { /* AnimData blocks - do nothing... */ },
+ obdata_ok= 1;,
+ obdata_ok= 1;,
+ obdata_ok= 1;)
+ }
+ }
+ break;
}
if (obdata_ok)
items += animdata_filter_dopesheet_obdata(ac, anim_data, ads, base, filter_mode);
@@ -2354,6 +2388,23 @@ static int animdata_filter_dopesheet (bAnimContext *ac, ListBase *anim_data, bDo
dataOk= !(ads->filterflag & ADS_FILTER_NOMESH);)
}
break;
+ case OB_LATTICE: /* ------- Lattice ---------- */
+ {
+ Lattice *lt= (Lattice *)ob->data;
+ dataOk= 0;
+ ANIMDATA_FILTER_CASES(lt,
+ if ((ads->filterflag & ADS_FILTER_NOLAT)==0) {
+ /* for the special AnimData blocks only case, we only need to add
+ * the block if it is valid... then other cases just get skipped (hence ok=0)
+ */
+ ANIMDATA_ADD_ANIMDATA(lt);
+ dataOk=0;
+ },
+ dataOk= !(ads->filterflag & ADS_FILTER_NOLAT);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOLAT);,
+ dataOk= !(ads->filterflag & ADS_FILTER_NOLAT);)
+ }
+ break;
default: /* --- other --- */
dataOk= 0;
break;