diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-18 15:26:11 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-02-18 15:26:11 +0400 |
commit | 910f04ca6373510f463de2541576b479671dc2ef (patch) | |
tree | 544499dbbab4c371052e54cc1a32e7a60e64206a /source/blender/blenloader/intern/readfile.c | |
parent | f261d58b6dfd68ae936ed8b76c8399df7a34a071 (diff) | |
parent | f3bef40b0cf2a10bcffedae6c5235e3f5537670f (diff) |
Merged changes in the trunk up to revision 44221.
Conflicts resolved:
release/datafiles/blender_icons.png
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 48 |
1 files changed, 30 insertions, 18 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 0f1a7caf96a..f46543e9b55 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3839,7 +3839,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh) if((fd->flags & FD_FLAGS_SWITCH_ENDIAN) && mesh->tface) { TFace *tf= mesh->tface; - unsigned int i; + int i; for (i=0; i< (mesh->totface); i++, tf++) { SWITCH_INT(tf->col[0]); @@ -6064,6 +6064,8 @@ static void direct_link_movieclip(FileData *fd, MovieClip *clip) MovieTracking *tracking= &clip->tracking; MovieTrackingObject *object; + clip->adt= newdataadr(fd, clip->adt); + if(fd->movieclipmap) clip->cache= newmclipadr(fd, clip->cache); else clip->cache= NULL; @@ -6101,6 +6103,9 @@ static void lib_link_movieclip(FileData *fd, Main *main) clip= main->movieclip.first; while(clip) { if(clip->id.flag & LIB_NEEDLINK) { + if (clip->adt) + lib_link_animdata(fd, &clip->id, clip->adt); + clip->gpd= newlibadr_us(fd, clip->id.lib, clip->gpd); clip->id.flag -= LIB_NEEDLINK; @@ -7681,15 +7686,16 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree) void do_versions_image_settings_2_60(Scene *sce) { - /* note: rd->subimtype is moved into indervidual settings now and no longer + /* note: rd->subimtype is moved into individual settings now and no longer * exists */ RenderData *rd= &sce->r; ImageFormatData *imf= &sce->r.im_format; - imf->imtype= rd->imtype; - imf->planes= rd->planes; - imf->compress= rd->quality; - imf->quality= rd->quality; + /* we know no data loss happens here, the old values were in char range */ + imf->imtype= (char)rd->imtype; + imf->planes= (char)rd->planes; + imf->compress= (char)rd->quality; + imf->quality= (char)rd->quality; /* default, was stored in multiple places, may override later */ imf->depth= R_IMF_CHAN_DEPTH_8; @@ -13251,20 +13257,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } - - /* put compatibility code here until next subversion bump */ + + if (main->versionfile < 262) { - { - Object *ob; - for(ob=main->object.first; ob; ob= ob->id.next) { - ModifierData *md; + Object *ob; + for(ob=main->object.first; ob; ob= ob->id.next) { + ModifierData *md; - for (md=ob->modifiers.first; md; md=md->next) { - if (md->type==eModifierType_Cloth) { - ClothModifierData *clmd = (ClothModifierData*) md; - if(clmd->sim_parms) - clmd->sim_parms->vel_damping = 1.0f; - } + for (md=ob->modifiers.first; md; md=md->next) { + if (md->type==eModifierType_Cloth) { + ClothModifierData *clmd = (ClothModifierData*) md; + if(clmd->sim_parms) + clmd->sim_parms->vel_damping = 1.0f; } } } @@ -14301,6 +14305,11 @@ static void expand_sound(FileData *fd, Main *mainvar, bSound *snd) expand_doit(fd, mainvar, snd->ipo); // XXX depreceated - old animation system } +static void expand_movieclip(FileData *fd, Main *mainvar, MovieClip *clip) +{ + if (clip->adt) + expand_animdata(fd, mainvar, clip->adt); +} static void expand_linestyle(FileData *fd, Main *mainvar, FreestyleLineStyle *linestyle) { LineStyleModifier *m; @@ -14404,6 +14413,9 @@ static void expand_main(FileData *fd, Main *mainvar) case ID_PA: expand_particlesettings(fd, mainvar, (ParticleSettings *)id); break; + case ID_MC: + expand_movieclip(fd, mainvar, (MovieClip *)id); + break; case ID_LS: expand_linestyle(fd, mainvar, (FreestyleLineStyle *)id); break; |