diff options
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index a10c7c6e1ed..c15acb4f5ca 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1723,6 +1723,7 @@ static void lib_link_fcurves(FileData *fd, ID *id, ListBase *list) static void direct_link_fmodifiers(FileData *fd, ListBase *list) { FModifier *fcm; + int a; for (fcm= list->first; fcm; fcm= fcm->next) { /* relink general data */ @@ -1736,6 +1737,11 @@ static void direct_link_fmodifiers(FileData *fd, ListBase *list) FMod_Generator *data= (FMod_Generator *)fcm->data; data->coefficients= newdataadr(fd, data->coefficients); + + if(fd->flags & FD_FLAGS_SWITCH_ENDIAN) { + for(a = 0; a < data->arraysize; a++) + SWITCH_INT(data->coefficients[a]); + } } break; case FMODIFIER_TYPE_ENVELOPE: @@ -2087,7 +2093,7 @@ static void lib_nodetree_do_versions_group(bNodeTree *ntree) for (node=ntree->nodes.first; node; node=node->next) { if (node->type==NODE_GROUP) { bNodeTree *ngroup= (bNodeTree*)node->id; - if (ngroup->flag & NTREE_DO_VERSIONS) + if (ngroup && (ngroup->flag & NTREE_DO_VERSIONS)) lib_node_do_versions_group(node); } } |