diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-30 20:49:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-30 20:49:32 +0300 |
commit | d6611d9844d7235b64b81838fcd280f25ce27a2e (patch) | |
tree | 17c729a2f137028f3e127c9ac387e11952a369ba /source/blender | |
parent | 41861eecd14225015aaaac6e83b29158acbe4cf0 (diff) |
bugfix [#20894] Blender don't import the "eye" icon value from 2.49 files in the DopeSheet Editor
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/ipo.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index c43b1791035..d216cefe8f8 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1069,7 +1069,7 @@ static ChannelDriver *idriver_to_cdriver (IpoDriver *idriver) /* Add F-Curve to the correct list * - grpname is needed to be used as group name where relevant, and is usually derived from actname */ -static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, char *grpname) +static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, char *grpname, int muteipo) { /* If we're adding to an action, we will have groups to write to... */ if (groups && grpname) { @@ -1096,6 +1096,8 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c agrp= MEM_callocN(sizeof(bActionGroup), "bActionGroup"); agrp->flag = AGRP_SELECTED; + if(muteipo) agrp->flag |= AGRP_MUTED; + BLI_snprintf(agrp->name, 64, grpname); BLI_addtail(&tmp_act.groups, agrp); @@ -1107,6 +1109,9 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c /* WARNING: this func should only need to look at the stuff we initialised, if not, things may crash */ action_groups_add_channel(&tmp_act, agrp, fcu); + if(agrp->flag & AGRP_MUTED) /* flush down */ + fcu->flag |= FCURVE_MUTED; + /* set the output lists based on the ones in the temp action */ groups->first= tmp_act.groups.first; groups->last= tmp_act.groups.last; @@ -1124,7 +1129,7 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c * actname: name of Action-Channel (if applicable) that IPO-Curve's IPO-block belonged to * constname: name of Constraint-Channel (if applicable) that IPO-Curve's IPO-block belonged to */ -static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, char *actname, char *constname) +static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, char *actname, char *constname, int muteipo) { AdrBit2Path *abp; FCurve *fcu; @@ -1240,7 +1245,7 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha } /* add new F-Curve to list */ - fcurve_add_to_list(groups, list, fcurve, actname); + fcurve_add_to_list(groups, list, fcurve, actname, muteipo); } } else { @@ -1314,7 +1319,7 @@ static void icu_to_fcurves (ListBase *groups, ListBase *list, IpoCurve *icu, cha } /* add new F-Curve to list */ - fcurve_add_to_list(groups, list, fcu, actname); + fcurve_add_to_list(groups, list, fcu, actname, muteipo); } } @@ -1355,7 +1360,7 @@ static void ipo_to_animato (Ipo *ipo, char actname[], char constname[], ListBase if (icu->driver) { /* Blender 2.4x allowed empty drivers, but we don't now, since they cause more trouble than they're worth */ if ((icu->driver->ob) || (icu->driver->type == IPO_DRIVER_TYPE_PYTHON)) { - icu_to_fcurves(NULL, drivers, icu, actname, constname); + icu_to_fcurves(NULL, drivers, icu, actname, constname, ipo->muteipo); } else { MEM_freeN(icu->driver); @@ -1363,7 +1368,7 @@ static void ipo_to_animato (Ipo *ipo, char actname[], char constname[], ListBase } } else - icu_to_fcurves(animgroups, anim, icu, actname, constname); + icu_to_fcurves(animgroups, anim, icu, actname, constname, ipo->muteipo); } /* if this IPO block doesn't have any users after this one, free... */ |