* Drivers view in Graph Editor now displays drivers only, instead of displaying normal Animation data.

* 'Materials' channel is now only shown under an Object when there are Materials with animation data...

* Hid more debug prints behind debug flag. These should be removed...
This commit is contained in:
Joshua Leung
2009-01-30 08:10:31 +00:00
parent e7d62464b7
commit 59caae4384
10 changed files with 238 additions and 60 deletions

View File

@@ -1886,6 +1886,7 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
printf("do Action Constraint %s - Ob %s Pchan %s \n", con->name, cob->ob->id.name+2, (cob->pchan)?cob->pchan->name:NULL);
/* Get the appropriate information from the action */
// XXX probably we might need some special filtering methods to make this more efficient
if (cob->type == CONSTRAINT_OBTYPE_BONE) {
Object workob;
bPose *pose;

View File

@@ -20,6 +20,7 @@
#include "BKE_fcurve.h"
#include "BKE_curve.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
#include "BKE_utildefines.h"
@@ -489,6 +490,7 @@ static float driver_get_driver_value (ChannelDriver *driver, short target)
/* error check for missing pointer... */
if (id == NULL) {
printf("Error: driver doesn't have any valid target to use \n");
if (G.f & G_DEBUG) printf("\tpath = %s [%d] \n", path, index);
driver->flag |= DRIVER_FLAG_INVALID;
return 0.0f;
}

View File

@@ -646,7 +646,7 @@ void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, int mode
if(key->from==NULL) return;
printf("do_rel_key() \n");
if (G.f & G_DEBUG) printf("do_rel_key() \n");
if( GS(key->from->name)==ID_ME ) {
ofs[0]= sizeof(MVert);
@@ -683,14 +683,14 @@ void do_rel_key(int start, int end, int tot, char *basispoin, Key *key, int mode
if(kb!=key->refkey) {
float icuval= kb->curval;
printf("\tdo rel key %s : %s = %f \n", key->id.name+2, kb->name, icuval);
if (G.f & G_DEBUG) printf("\tdo rel key %s : %s = %f \n", key->id.name+2, kb->name, icuval);
/* only with value, and no difference allowed */
if(!(kb->flag & KEYBLOCK_MUTE) && icuval!=0.0f && kb->totelem==tot) {
KeyBlock *refb;
float weight, *weights= kb->weights;
printf("\t\tnot skipped \n");
if (G.f & G_DEBUG) printf("\t\tnot skipped \n");
poin= basispoin;
from= kb->data;
@@ -762,7 +762,7 @@ static void do_key(int start, int end, int tot, char *poin, Key *key, KeyBlock *
if(key->from==0) return;
printf("do_key() \n");
if (G.f & G_DEBUG) printf("do_key() \n");
if( GS(key->from->name)==ID_ME ) {
ofs[0]= sizeof(MVert);
@@ -1024,10 +1024,10 @@ static int do_mesh_key(Scene *scene, Object *ob, Mesh *me)
/* prevent python from screwing this up? anyhoo, the from pointer could be dropped */
me->key->from= (ID *)me;
printf("do mesh key ob:%s me:%s ke:%s \n", ob->id.name+2, me->id.name+2, me->key->id.name+2);
if (G.f & G_DEBUG) printf("do mesh key ob:%s me:%s ke:%s \n", ob->id.name+2, me->id.name+2, me->key->id.name+2);
if(me->key->slurph && me->key->type!=KEY_RELATIVE ) {
printf("\tslurph key\n");
if (G.f & G_DEBUG) printf("\tslurph key\n");
delta= me->key->slurph;
delta/= me->totvert;
@@ -1071,7 +1071,7 @@ static int do_mesh_key(Scene *scene, Object *ob, Mesh *me)
if(me->key->type==KEY_RELATIVE) {
KeyBlock *kb;
printf("\tdo relative \n");
if (G.f & G_DEBUG) printf("\tdo relative \n");
for(kb= me->key->block.first; kb; kb= kb->next)
kb->weights= get_weights_array(ob, kb->vgroup);
@@ -1084,7 +1084,7 @@ static int do_mesh_key(Scene *scene, Object *ob, Mesh *me)
}
}
else {
printf("\tdo absolute \n");
if (G.f & G_DEBUG) printf("\tdo absolute \n");
ctime= bsystem_time(scene, ob, (float)scene->r.cfra, 0.0f); // xxx old cruft

View File

@@ -1028,6 +1028,12 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
act->flag ^= ACT_COLLAPSED;
}
break;
case ANIMTYPE_FILLDRIVERS:
{
AnimData *adt= (AnimData* )ale->data;
adt->flag ^= ADT_DRIVERS_COLLAPSED;
}
break;
case ANIMTYPE_FILLMATD:
{
Object *ob= (Object *)ale->data;
@@ -1126,6 +1132,11 @@ static void mouse_anim_channels (bAnimContext *ac, float x, int channel_index, s
else {
/* select/deselect */
fcu->flag ^= FCURVE_SELECTED;
if (fcu->flag & FCURVE_SELECTED)
fcu->flag |= FCURVE_ACTIVE;
else
fcu->flag &= ~FCURVE_ACTIVE;
}
}
break;

View File

@@ -221,7 +221,7 @@ static short graphedit_get_context (bAnimContext *ac, SpaceIpo *sipo)
sipo->ads->source= (ID *)ac->scene;
sipo->ads->filterflag |= ADS_FILTER_ONLYDRIVERS;
ac->datatype= ANIMCONT_FCURVES;
ac->datatype= ANIMCONT_DRIVERS;
ac->data= sipo->ads;
ac->mode= sipo->mode;
@@ -306,6 +306,9 @@ short ANIM_animdata_get_context (const bContext *C, bAnimContext *ac)
/* quick macro to test if AnimData is usable */
#define ANIMDATA_HAS_KEYS(id) ((id)->adt && (id)->adt->action)
/* quick macro to test if AnimData is usable for drivers */
#define ANIMDATA_HAS_DRIVERS(id) ((id)->adt && (id)->adt->drivers.first)
/* ----------- 'Private' Stuff --------------- */
/* this function allocates memory for a new bAnimListElem struct for the
@@ -351,6 +354,17 @@ bAnimListElem *make_new_animlistelem (void *data, short datatype, void *owner, s
ale->datatype= ALE_ACT;
}
break;
case ANIMTYPE_FILLDRIVERS:
{
AnimData *adt= (AnimData *)data;
ale->flag= adt->flag;
// XXX... drivers don't show summary for now
ale->key_data= NULL;
ale->datatype= ALE_NONE;
}
break;
case ANIMTYPE_FILLMATD:
{
Object *ob= (Object *)data;
@@ -694,9 +708,29 @@ static int animdata_filter_gpencil (ListBase *anim_data, bScreen *sc, int filter
static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads, Base *base, int filter_mode)
{
ListBase mats = {NULL, NULL};
LinkData *ld;
bAnimListElem *ale=NULL;
Object *ob= base->object;
int items = 0;
int items=0, a=0;
/* firstly check that we actuallly have some materials, by gathering all materials in a temp list */
for (a=0; a < ob->totcol; a++) {
Material *ma= give_current_material(ob, a);
/* for now, if no material returned, skip (this shouldn't confuse the user I hope) */
if (ELEM3(NULL, ma, ma->adt, ma->adt->action)) continue;
/* make a temp list elem for this */
ld= MEM_callocN(sizeof(LinkData), "DopeSheet-MaterialCache");
ld->data= ma;
BLI_addtail(&mats, ld);
}
/* if there were no channels found, no need to carry on */
if (mats.first == NULL)
return 0;
/* include materials-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
@@ -709,14 +743,9 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads,
/* add materials? */
if (FILTER_MAT_OBJC(ob) || (filter_mode & ANIMFILTER_CURVESONLY)) {
short a;
/* for each material, either add channels separately, or as ipo-block */
for (a=0; a<ob->totcol; a++) {
Material *ma= give_current_material(ob, a);
/* for now, if no material returned, skip (this shouldn't confuse the user I hope) */
if (ELEM3(NULL, ma, ma->adt, ma->adt->action)) continue;
/* for each material in cache, add channels */
for (ld= mats.first; ld; ld= ld->next) {
Material *ma= (Material *)ld->data;
/* include material-expand widget? */
// hmm... do we need to store the index of this material in the array anywhere?
@@ -728,7 +757,7 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads,
}
}
/* add material's ipo-curve channels? */
/* add material's F-Curve channels? */
if (FILTER_MAT_OBJD(ma) || (filter_mode & ANIMFILTER_CURVESONLY)) {
//items += animdata_filter_ipocurves(anim_data, ma->ipo, filter_mode, base, ANIMTYPE_OBJECT, (ID *)ma);
// XXX the 'owner' info here is still subject to improvement
@@ -737,6 +766,9 @@ static int animdata_filter_dopesheet_mats (ListBase *anim_data, bDopeSheet *ads,
}
}
/* free cache */
BLI_freelistN(&mats);
/* return the number of items added to the list */
return items;
}
@@ -746,6 +778,7 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
bAnimListElem *ale=NULL;
Object *ob= base->object;
IdAdtTemplate *iat= ob->data;
AnimData *adt= iat->adt;
short type=0, expanded=0;
int items= 0;
@@ -777,6 +810,10 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
break;
}
/* special exception for drivers instead of action */
if (ads->filterflag & ADS_FILTER_ONLYDRIVERS)
expanded= EXPANDED_DRVD(adt);
/* include data-expand widget? */
if ((filter_mode & ANIMFILTER_CURVESONLY) == 0) {
ale= make_new_animlistelem(iat, type, base, ANIMTYPE_OBJECT, (ID *)iat);
@@ -785,8 +822,15 @@ static int animdata_filter_dopesheet_obdata (ListBase *anim_data, bDopeSheet *ad
/* add object-data animation channels? */
if ((expanded) || (filter_mode & ANIMFILTER_CURVESONLY)) {
// XXX the 'owner' info here is still subject to improvement
items += animdata_filter_action(anim_data, iat->adt->action, filter_mode, iat, type, (ID *)iat);
/* Action or Drivers? */
if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) {
// XXX the 'owner' info here is still subject to improvement
items += animdata_filter_action(anim_data, iat->adt->action, filter_mode, iat, type, (ID *)iat);
}
else {
// need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, iat, type, filter_mode, (ID *)iat);
}
}
/* return the number of items added to the list */
@@ -817,40 +861,88 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
if ( (EXPANDED_OBJC(ob) == 0) && !(filter_mode & ANIMFILTER_CURVESONLY) )
return items;
/* Action? */
if (ANIMDATA_HAS_KEYS(ob) /*&& !(ads->filterflag & ADS_FILTER_NOACTS)*/) {
AnimData *adt= ob->adt;
/* include action-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, base, ANIMTYPE_OBJECT, (ID *)ob);
if (ale) {
BLI_addtail(anim_data, ale);
items++;
/* Action or Drivers */
if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) {
/* Action? */
if (ANIMDATA_HAS_KEYS(ob) /*&& !(ads->filterflag & ADS_FILTER_NOACTS)*/) {
AnimData *adt= ob->adt;
/* include action-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLACTD, base, ANIMTYPE_OBJECT, (ID *)ob);
if (ale) {
BLI_addtail(anim_data, ale);
items++;
}
}
/* add F-Curve channels? */
if (EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) {
// need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
items += animdata_filter_action(anim_data, adt->action, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
}
}
/* add F-Curve channels? */
if (EXPANDED_ACTC(adt->action) || !(filter_mode & ANIMFILTER_CHANNELS)) {
// need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
items += animdata_filter_action(anim_data, adt->action, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
}
else {
/* Drivers */
if (ANIMDATA_HAS_DRIVERS(ob)) {
AnimData *adt= ob->adt;
/* include drivers-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
ale= make_new_animlistelem(adt->action, ANIMTYPE_FILLDRIVERS, base, ANIMTYPE_OBJECT, (ID *)ob);
if (ale) {
BLI_addtail(anim_data, ale);
items++;
}
}
/* add F-Curve channels (drivers are F-Curves) */
if (EXPANDED_DRVD(adt) || !(filter_mode & ANIMFILTER_CHANNELS)) {
// need to make the ownertype normal object here... (maybe type should be a separate one for clarity?)
items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, ob, ANIMTYPE_OBJECT, filter_mode, (ID *)ob);
}
}
}
/* ShapeKeys? */
if ((key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS)) {
/* include shapekey-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
if (ale) {
BLI_addtail(anim_data, ale);
items++;
/* Animation or Drivers */
if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS) == 0) {
/* include shapekey-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
if (ale) {
BLI_addtail(anim_data, ale);
items++;
}
}
/* add channels */
if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) {
items += animdata_filter_shapekey(anim_data, key, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
}
}
/* add channels */
if (FILTER_SKE_OBJD(key) || (filter_mode & ANIMFILTER_CURVESONLY)) {
items += animdata_filter_shapekey(anim_data, key, filter_mode, ob, ANIMTYPE_OBJECT, (ID *)ob);
else {
/* Drivers */
if (ANIMDATA_HAS_DRIVERS(key)) {
AnimData *adt= key->adt;
/* include shapekey-expand widget? */
if ((filter_mode & ANIMFILTER_CHANNELS) && !(filter_mode & ANIMFILTER_CURVESONLY)) {
ale= make_new_animlistelem(key, ANIMTYPE_DSSKEY, base, ANIMTYPE_OBJECT, (ID *)ob);
if (ale) {
BLI_addtail(anim_data, ale);
items++;
}
}
/* add F-Curve channels (drivers are F-Curves) */
if (FILTER_SKE_OBJD(key)/*EXPANDED_DRVD(adt)*/ || !(filter_mode & ANIMFILTER_CHANNELS)) {
// XXX owner info is messed up now...
items += animdata_filter_fcurves(anim_data, adt->drivers.first, NULL, ob, ANIMTYPE_OBJECT, filter_mode, (ID *)key);
}
}
}
}
@@ -864,22 +956,49 @@ static int animdata_filter_dopesheet_ob (ListBase *anim_data, bDopeSheet *ads, B
case OB_CAMERA: /* ------- Camera ------------ */
{
Camera *ca= (Camera *)ob->data;
if (ANIMDATA_HAS_KEYS(ca) && !(ads->filterflag & ADS_FILTER_NOCAM))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
if ((ads->filterflag & ADS_FILTER_NOCAM) == 0) {
if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
if (ANIMDATA_HAS_KEYS(ca))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
}
else {
if (ANIMDATA_HAS_DRIVERS(ca))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
}
}
}
break;
case OB_LAMP: /* ---------- Lamp ----------- */
{
Lamp *la= (Lamp *)ob->data;
if (ANIMDATA_HAS_KEYS(la) && !(ads->filterflag & ADS_FILTER_NOLAM))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
if ((ads->filterflag & ADS_FILTER_NOLAM) == 0) {
if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
if (ANIMDATA_HAS_KEYS(la))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
}
else {
if (ANIMDATA_HAS_DRIVERS(la))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
}
}
}
break;
case OB_CURVE: /* ------- Curve ---------- */
{
Curve *cu= (Curve *)ob->data;
if (ANIMDATA_HAS_KEYS(cu) && !(ads->filterflag & ADS_FILTER_NOCUR))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
if ((ads->filterflag & ADS_FILTER_NOCUR) == 0) {
if ((ads->filterflag & ADS_FILTER_ONLYDRIVERS)==0) {
if (ANIMDATA_HAS_KEYS(cu))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
}
else {
if (ANIMDATA_HAS_DRIVERS(cu))
items += animdata_filter_dopesheet_obdata(anim_data, ads, base, filter_mode);
}
}
}
break;
}
@@ -942,26 +1061,41 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
#endif
/* check filters for datatypes */
actOk= (ANIMDATA_HAS_KEYS(ob) /*&& !(ads->filterflag & ADS_FILTER_NOACTS)*/);
keyOk= ((key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS));
if (ads->filterflag & ADS_FILTER_ONLYDRIVERS) {
actOk= (ANIMDATA_HAS_DRIVERS(ob));
keyOk= ((key) && ANIMDATA_HAS_DRIVERS(key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS));
}
else {
actOk= (ANIMDATA_HAS_KEYS(ob) /*&& !(ads->filterflag & ADS_FILTER_NOACTS)*/);
keyOk= ((key) && ANIMDATA_HAS_KEYS(key) && !(ads->filterflag & ADS_FILTER_NOSHAPEKEYS));
}
switch (ob->type) {
case OB_CAMERA: /* ------- Camera ------------ */
{
Camera *ca= (Camera *)ob->data;
dataOk= (ANIMDATA_HAS_KEYS(ca) && !(ads->filterflag & ADS_FILTER_NOCAM));
if (ads->filterflag & ADS_FILTER_ONLYDRIVERS)
dataOk= (ANIMDATA_HAS_DRIVERS(ca) && !(ads->filterflag & ADS_FILTER_NOCAM));
else
dataOk= (ANIMDATA_HAS_KEYS(ca) && !(ads->filterflag & ADS_FILTER_NOCAM));
}
break;
case OB_LAMP: /* ---------- Lamp ----------- */
{
Lamp *la= (Lamp *)ob->data;
dataOk= (ANIMDATA_HAS_KEYS(la) && !(ads->filterflag & ADS_FILTER_NOLAM));
if (ads->filterflag & ADS_FILTER_ONLYDRIVERS)
dataOk= (ANIMDATA_HAS_DRIVERS(la) && !(ads->filterflag & ADS_FILTER_NOLAM));
else
dataOk= (ANIMDATA_HAS_KEYS(la) && !(ads->filterflag & ADS_FILTER_NOLAM));
}
break;
case OB_CURVE: /* -------- Curve ---------- */
{
Curve *cu= (Curve *)ob->data;
dataOk= (ANIMDATA_HAS_KEYS(cu) && !(ads->filterflag & ADS_FILTER_NOCUR));
if (ads->filterflag & ADS_FILTER_ONLYDRIVERS)
dataOk= (ANIMDATA_HAS_DRIVERS(cu) && !(ads->filterflag & ADS_FILTER_NOCUR));
else
dataOk= (ANIMDATA_HAS_KEYS(cu) && !(ads->filterflag & ADS_FILTER_NOCUR));
}
break;
default: /* --- other --- */
@@ -988,13 +1122,13 @@ static int animdata_filter_dopesheet (ListBase *anim_data, bDopeSheet *ads, int
case OB_LAMP: /* ---------- Lamp ----------- */
{
Lamp *la= (Lamp *)ob->data;
dataOk= ANIMDATA_HAS_KEYS(la);
dataOk= ANIMDATA_HAS_KEYS(la);
}
break;
case OB_CURVE: /* -------- Curve ---------- */
{
Curve *cu= (Curve *)ob->data;
dataOk= ANIMDATA_HAS_KEYS(cu);
dataOk= ANIMDATA_HAS_KEYS(cu);
}
break;
default: /* --- other --- */

View File

@@ -138,6 +138,7 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* Property Name is straightforward */
propname= (char *)RNA_property_ui_name(&ptr, prop);
/* Array Index - only if applicable */
if (RNA_property_array_length(&ptr, prop)) {
// XXX the format of these is not final... we don't know how this will go yet
static char *vectoritem[4]= {".X", ".Y", ".Z", ".W"};
@@ -160,6 +161,10 @@ void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
arrayname= &arrayindbuf[0];
}
}
else {
/* no array index */
arrayname= "";
}
/* putting this all together into the buffer */
// XXX we need to check for invalid names...

View File

@@ -112,6 +112,7 @@ typedef enum eAnim_ChannelType {
ANIMTYPE_FCURVE,
ANIMTYPE_FILLACTD,
ANIMTYPE_FILLDRIVERS,
ANIMTYPE_FILLMATD,
ANIMTYPE_DSMAT,
@@ -171,6 +172,8 @@ typedef enum eAnimFilter_Flags {
/* 'Sub-object/Action' channels (flags stored in Action) */
#define SEL_ACTC(actc) ((actc->flag & ACT_SELECTED))
#define EXPANDED_ACTC(actc) ((actc->flag & ACT_COLLAPSED)==0)
/* 'Sub-AnimData' chanenls */
#define EXPANDED_DRVD(adt) ((adt->flag & ADT_DRIVERS_COLLAPSED)==0)
/* Actions (also used for Dopesheet) */
/* Action Channel Group */

View File

@@ -749,6 +749,22 @@ void graph_draw_channel_names(bAnimContext *ac, SpaceIpo *sipo, ARegion *ar)
strcpy(name, "Action");
}
break;
case ANIMTYPE_FILLDRIVERS: /* drivers widget */
{
AnimData *adt= (AnimData *)ale->data;
group = 4;
indent= 1;
special= ICON_IPO_DEHLT;
if (EXPANDED_DRVD(adt))
expand= ICON_TRIA_DOWN;
else
expand= ICON_TRIA_RIGHT;
strcpy(name, "Drivers");
}
break;
case ANIMTYPE_FILLMATD: /* object materials (dopesheet) expand widget */
{
Object *ob = (Object *)ale->data;

View File

@@ -132,8 +132,11 @@ static void graph_free(SpaceLink *sl)
/* spacetype; init callback */
static void graph_init(struct wmWindowManager *wm, ScrArea *sa)
{
//SpaceIpo *si= (SpaceIpo *)sa->spacedata.first;
SpaceIpo *sipo= (SpaceIpo *)sa->spacedata.first;
/* init dopesheet data if non-existant (i.e. for old files) */
if (sipo->ads == NULL)
sipo->ads= MEM_callocN(sizeof(bDopeSheet), "GraphEdit DopeSheet");
}
static SpaceLink *graph_duplicate(SpaceLink *sl)

View File

@@ -496,6 +496,9 @@ enum {
ADT_NLA_EVAL_OFF = (1<<1),
/* don't execute drivers */
ADT_DRIVERS_DISABLED = (1<<2),
/* drivers expanded in UI */
ADT_DRIVERS_COLLAPSED = (1<<10),
} eAnimData_Flag;
/* Animation Data recalculation settings (to be set by depsgraph) */