Commit: 28d4cdaffc6a02352478522672bddb7992c23324
Author: Julian Eisel
Date:   Mon Aug 1 01:48:12 2016 +0200
Branches: HMD_viewport
https://developer.blender.org/rB28d4cdaffc6a02352478522672bddb7992c23324

Reset writefile.c to earlier state to avoid merge hell

Was caused by whitespace auto-cleaning.

===================================================================

M       source/blender/blenloader/intern/writefile.c

===================================================================

diff --git a/source/blender/blenloader/intern/writefile.c 
b/source/blender/blenloader/intern/writefile.c
index 8c64fdd..124b1ef 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -294,7 +294,7 @@ typedef struct {
 
        unsigned char *buf;
        MemFile *compare, *current;
-
+       
        int tot, count, error;
 
        /* Wrap writing, so we can use zlib or
@@ -358,7 +358,7 @@ static void writedata_free(WriteData *wd)
  * \param len Length of new chunk of data
  * \warning Talks to other functions with global parameters
  */
-
+ 
 #define MYWRITE_FLUSH          NULL
 
 static void mywrite(WriteData *wd, const void *adr, int len)
@@ -375,7 +375,7 @@ static void mywrite(WriteData *wd, const void *adr, int len)
        }
 
        wd->tot+= len;
-
+       
        /* if we have a single big chunk, write existing data in
         * buffer and write out big chunk in smaller pieces */
        if (len>MYWRITE_MAX_CHUNK) {
@@ -422,7 +422,7 @@ static WriteData *bgnwrite(WriteWrap *ww, MemFile *compare, 
MemFile *current)
        wd->current= current;
        /* this inits comparing */
        memfile_chunk_add(compare, NULL, NULL, 0);
-
+       
        return wd;
 }
 
@@ -440,7 +440,7 @@ static int endwrite(WriteData *wd)
                writedata_do_write(wd, wd->buf, wd->count);
                wd->count= 0;
        }
-
+       
        err= wd->error;
        writedata_free(wd);
 
@@ -506,7 +506,7 @@ static void writedata(WriteData *wd, int filecode, int len, 
const void *adr)  /*
 static void writelist(WriteData *wd, int filecode, const char *structname, 
ListBase *lb)
 {
        Link *link = lb->first;
-
+       
        while (link) {
                writestruct(wd, filecode, structname, 1, link);
                link = link->next;
@@ -618,25 +618,25 @@ static void write_previews(WriteData *wd, PreviewImage 
*prv)
 static void write_fmodifiers(WriteData *wd, ListBase *fmodifiers)
 {
        FModifier *fcm;
-
+       
        /* Write all modifiers first (for faster reloading) */
        writelist(wd, DATA, "FModifier", fmodifiers);
-
+       
        /* Modifiers */
        for (fcm= fmodifiers->first; fcm; fcm= fcm->next) {
                const FModifierTypeInfo *fmi= fmodifier_get_typeinfo(fcm);
-
+               
                /* Write the specific data */
                if (fmi && fcm->data) {
                        /* firstly, just write the plain fmi->data struct */
                        writestruct(wd, DATA, fmi->structName, 1, fcm->data);
-
+                       
                        /* do any modifier specific stuff */
                        switch (fcm->type) {
                                case FMODIFIER_TYPE_GENERATOR:
                                {
                                        FMod_Generator *data= (FMod_Generator 
*)fcm->data;
-
+                                       
                                        /* write coefficients array */
                                        if (data->coefficients)
                                                writedata(wd, DATA, 
sizeof(float)*(data->arraysize), data->coefficients);
@@ -646,7 +646,7 @@ static void write_fmodifiers(WriteData *wd, ListBase 
*fmodifiers)
                                case FMODIFIER_TYPE_ENVELOPE:
                                {
                                        FMod_Envelope *data= (FMod_Envelope 
*)fcm->data;
-
+                                       
                                        /* write envelope data */
                                        if (data->data)
                                                writestruct(wd, DATA, 
"FCM_EnvelopeData", data->totvert, data->data);
@@ -656,7 +656,7 @@ static void write_fmodifiers(WriteData *wd, ListBase 
*fmodifiers)
                                case FMODIFIER_TYPE_PYTHON:
                                {
                                        FMod_Python *data = (FMod_Python 
*)fcm->data;
-
+                                       
                                        /* Write ID Properties -- and copy this 
comment EXACTLY for easy finding
                                         * of library blocks that implement 
this.*/
                                        IDP_WriteProperty(data->prop, wd);
@@ -671,7 +671,7 @@ static void write_fmodifiers(WriteData *wd, ListBase 
*fmodifiers)
 static void write_fcurves(WriteData *wd, ListBase *fcurves)
 {
        FCurve *fcu;
-
+       
        writelist(wd, DATA, "FCurve", fcurves);
        for (fcu=fcurves->first; fcu; fcu=fcu->next) {
                /* curve data */
@@ -679,20 +679,20 @@ static void write_fcurves(WriteData *wd, ListBase 
*fcurves)
                        writestruct(wd, DATA, "BezTriple", fcu->totvert, 
fcu->bezt);
                if (fcu->fpt)
                        writestruct(wd, DATA, "FPoint", fcu->totvert, fcu->fpt);
-
+                       
                if (fcu->rna_path)
                        writedata(wd, DATA, strlen(fcu->rna_path)+1, 
fcu->rna_path);
-
+               
                /* driver data */
                if (fcu->driver) {
                        ChannelDriver *driver= fcu->driver;
                        DriverVar *dvar;
-
+                       
                        writestruct(wd, DATA, "ChannelDriver", 1, driver);
-
+                       
                        /* variables */
                        writelist(wd, DATA, "DriverVar", &driver->variables);
-                       for (dvar= driver->variables.first; dvar; dvar= 
dvar->next) {
+                       for (dvar= driver->variables.first; dvar; dvar= 
dvar->next) {                           
                                DRIVER_TARGETS_USED_LOOPER(dvar)
                                {
                                        if (dtar->rna_path)
@@ -701,7 +701,7 @@ static void write_fcurves(WriteData *wd, ListBase *fcurves)
                                DRIVER_TARGETS_LOOPER_END
                        }
                }
-
+               
                /* write F-Modifiers */
                write_fmodifiers(wd, &fcu->modifiers);
        }
@@ -712,24 +712,24 @@ static void write_actions(WriteData *wd, ListBase *idbase)
        bAction *act;
        bActionGroup *grp;
        TimeMarker *marker;
-
+       
        for (act=idbase->first; act; act= act->id.next) {
                if (act->id.us>0 || wd->current) {
                        writestruct(wd, ID_AC, "bAction", 1, act);
                        if (act->id.properties) 
IDP_WriteProperty(act->id.properties, wd);
-
+                       
                        write_fcurves(wd, &act->curves);
-
+                       
                        for (grp=act->groups.first; grp; grp=grp->next) {
                                writestruct(wd, DATA, "bActionGroup", 1, grp);
                        }
-
+                       
                        for (marker=act->markers.first; marker; 
marker=marker->next) {
                                writestruct(wd, DATA, "TimeMarker", 1, marker);
                        }
                }
        }
-
+       
        /* flush helps the compression for undo-save */
        mywrite(wd, MYWRITE_FLUSH, 0);
 }
@@ -738,16 +738,16 @@ static void write_keyingsets(WriteData *wd, ListBase 
*list)
 {
        KeyingSet *ks;
        KS_Path *ksp;
-
+       
        for (ks= list->first; ks; ks= ks->next) {
                /* KeyingSet */
                writestruct(wd, DATA, "KeyingSet", 1, ks);
-
+               
                /* Paths */
                for (ksp= ks->paths.first; ksp; ksp= ksp->next) {
                        /* Path */
                        writestruct(wd, DATA, "KS_Path", 1, ksp);
-
+                       
                        if (ksp->rna_path)
                                writedata(wd, DATA, strlen(ksp->rna_path)+1, 
ksp->rna_path);
                }
@@ -757,13 +757,13 @@ static void write_keyingsets(WriteData *wd, ListBase 
*list)
 static void write_nlastrips(WriteData *wd, ListBase *strips)
 {
        NlaStrip *strip;
-
+       
        writelist(wd, DATA, "NlaStrip", strips);
        for (strip= strips->first; strip; strip= strip->next) {
                /* write the strip's F-Curves and modifiers */
                write_fcurves(wd, &strip->fcurves);
                write_fmodifiers(wd, &strip->modifiers);
-
+               
                /* write the strip's children */
                write_nlastrips(wd, &strip->strips);
        }
@@ -772,12 +772,12 @@ static void write_nlastrips(WriteData *wd, ListBase 
*strips)
 static void write_nladata(WriteData *wd, ListBase *nlabase)
 {
        NlaTrack *nlt;
-
+       
        /* write all the tracks */
        for (nlt= nlabase->first; nlt; nlt= nlt->next) {
                /* write the track first */
                writestruct(wd, DATA, "NlaTrack", 1, nlt);
-
+               
                /* write the track's strips */
                write_nlastrips(wd, &nlt->strips);
        }
@@ -786,13 +786,13 @@ static void write_nladata(WriteData *wd, ListBase 
*nlabase)
 static void write_animdata(WriteData *wd, AnimData *adt)
 {
        AnimOverride *aor;
-
+       
        /* firstly, just write the AnimData block */
        writestruct(wd, DATA, "AnimData", 1, adt);
-
+       
        /* write drivers */
        write_fcurves(wd, &adt->drivers);
-
+       
        /* write overrides */
        // FIXME: are these needed?
        for (aor= adt->overrides.first; aor; aor= aor->next) {
@@ -800,9 +800,9 @@ static void write_animdata(WriteData *wd, AnimData *adt)
                writestruct(wd, DATA, "AnimOverride", 1, aor);
                writedata(wd, DATA, strlen(aor->rna_path)+1, aor->rna_path);
        }
-
+       
        // TODO write the remaps (if they are needed)
-
+       
        /* write NLA data */
        write_nladata(wd, &adt->nla_tracks);
 }
@@ -827,14 +827,14 @@ static void write_node_socket(WriteData *wd, bNodeTree 
*UNUSED(ntree), bNode *no
 #ifdef USE_NODE_COMPAT_CUSTOMNODES
        /* forward compatibility code, so older blenders still open */
        sock->stack_type = 1;
-
+       
        if (node->type == NODE_GROUP) {
                bNodeTree *ngroup = (bNodeTree *)node->id;
                if (ngroup) {
                        /* for node groups: look up the deprecated groupsock 
pointer */
                        sock->groupsock = ntreeFindSocketInterface(ngroup, 
sock->in_out, sock->identifier);
                        BLI_assert(sock->groupsock != NULL);
-
+                       
                        /* node group sockets now use the generic identifier 
string to verify group nodes,
                         * old blender uses the own_index.
                         */
@@ -848,7 +848,7 @@ static void write_node_socket(WriteData *wd, bNodeTree 
*UNUSED(ntree), bNode *no
 
        if (sock->prop)
                IDP_WriteProperty(sock->prop, wd);
-
+       
        if (sock->default_value)
                writedata(wd, DATA, MEM_allocN_len(sock->default_value), 
sock->default_value);
 }
@@ -857,7 +857,7 @@ static void write_node_socket_interface(WriteData *wd, 
bNodeTree *UNUSED(ntree),
 #ifdef USE_NODE_COMPAT_CUSTOMNODES
        /* forward compatibility code, so older blenders still open */
        sock->stack_type = 1;
-
+       
        /* Reconstruct the deprecated default_value structs in socket interface 
DNA. */
        if (sock->default_value == NULL && sock->typeinfo) {
                node_socket_init_default_value(sock);
@@ -869,7 +869,7 @@ static void write_node_socket_interface(WriteData *wd, 
bNodeTree *UNUSED(ntree),
 
        if (sock->prop)
                IDP_WriteProperty(sock->prop, wd);
-
+       
        if (sock->default_value)
                writedata(wd, DATA, MEM_allocN_len(sock->default_value), 
sock->default_value);
 }
@@ -879,11 +879,11 @@ static void write_nodetree(WriteData *wd, bNodeTree 
*ntree)
        bNode *node;
        bNodeSocket *sock;
        bNodeLink *link;
-
+       
        /* for link_list() speed, we write per list */
-
+       
        if (ntree->adt) write_animdata(wd, ntree->adt);
-
+       
        for (node = ntree->nodes.first; node; node = node->next) {
                writestruct(wd, DATA, "bNode", 1, node);
 
@@ -894,7 +894,7 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
                        write_node_socket(wd, ntree, node, sock);
                for (sock= node->outputs.first; sock; sock= sock->next)
                        write_node_socket(wd, ntree, node, sock);
-
+               
                for (link = node->internal_links.first; link; link = link->next)
                        writestruct(wd, DATA, "bNodeLink", 1, link);
                if (node->storage) {
@@ -917,7 +917,7 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
                        else
                                writestruct(wd, DATA, 
node->typeinfo->storagename, 1, node->storage);
                }
-
+               
                if (node->type==CMP_NODE_OUTPUT_FILE) {
                        /* inputs have own storage data */
                        for (sock = node->inputs.first; sock; sock = sock->next)
@@ -929,10 +929,10 @@ static void write_nodetree(WriteData *wd, bNodeTree 
*ntree)
                                writestruct(wd, DATA, "NodeImageLayer", 1, 
sock->storage);
                }
        }
-
+       
        for (link= ntre

@@ Diff output truncated at 10240 characters. @@

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

Reply via email to