Revision: 26441
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26441
Author:   campbellbarton
Date:     2010-01-30 18:49:32 +0100 (Sat, 30 Jan 2010)

Log Message:
-----------
bugfix [#20894] Blender don't import the "eye" icon value from 2.49 files in 
the DopeSheet Editor

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/ipo.c

Modified: trunk/blender/source/blender/blenkernel/intern/ipo.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/ipo.c        2010-01-30 
17:44:57 UTC (rev 26440)
+++ trunk/blender/source/blender/blenkernel/intern/ipo.c        2010-01-30 
17:49:32 UTC (rev 26441)
@@ -1069,7 +1069,7 @@
 /* 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 @@
                                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 @@
                /* 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 @@
  *     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 @@
                        }
                        
                        /* 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 @@
                }
                
                /* 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 @@
                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 @@
                        }
                }
                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... */


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to