diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-04-01 02:09:43 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-04-01 02:09:43 +0400 |
commit | 4c36a26af5d1093badc88401bfebf8454fdf0f34 (patch) | |
tree | 2e82fc5ff893651982d20ffdd15d4c69bfcbe7b8 /source/blender/blenloader/intern/readfile.c | |
parent | 3b711a6ed009b35bb69cd0ca878eeb8d55fa0e77 (diff) | |
parent | 8f949dd58decac45fd49f9a93152f2cddc98d901 (diff) |
Merged changes in the trunk up to revision 45308.
Conflicts resolved:
source/blender/editors/interface/resources.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/space_view3d/drawobject.c
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4771f04cc6a..3150da24754 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -545,7 +545,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *filepat char *libname= (m->curlib)?m->curlib->filepath:m->name; if (BLI_path_cmp(name1, libname) == 0) { - if (G.f & G_DEBUG) printf("blo_find_main: found library %s\n", libname); + if (G.debug & G_DEBUG) printf("blo_find_main: found library %s\n", libname); return m; } } @@ -561,7 +561,7 @@ static Main *blo_find_main(FileData *fd, ListBase *mainlist, const char *filepat read_file_version(fd, m); - if (G.f & G_DEBUG) printf("blo_find_main: added new lib %s\n", filepath); + if (G.debug & G_DEBUG) printf("blo_find_main: added new lib %s\n", filepath); return m; } @@ -1680,7 +1680,7 @@ static void direct_link_brush(FileData *fd, Brush *brush) static void direct_link_script(FileData *UNUSED(fd), Script *script) { script->id.us = 1; - SCRIPT_SET_NULL(script) + SCRIPT_SET_NULL(script); } @@ -3709,7 +3709,7 @@ static void lib_link_mesh(FileData *fd, Main *main) /*check if we need to convert mfaces to mpolys*/ if (me->totface && !me->totpoly) { - convert_mfaces_to_mpolys(me); + BKE_mesh_convert_mfaces_to_mpolys(me); } /* @@ -5338,7 +5338,7 @@ static void lib_link_screen(FileData *fd, Main *main) if (scpt->script) { scpt->script= newlibadr(fd, sc->id.lib, scpt->script); if (scpt->script) { - SCRIPT_SET_NULL(scpt->script) + SCRIPT_SET_NULL(scpt->script); } } } @@ -5574,6 +5574,10 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) sima->image= restore_pointer_by_name(newmain, (ID *)sima->image, 1); + /* this will be freed, not worth attempting to find same scene, + * since it gets initialized later */ + sima->iuser.scene = NULL; + sima->scopes.waveform_1 = NULL; sima->scopes.waveform_2 = NULL; sima->scopes.waveform_3 = NULL; @@ -5609,7 +5613,7 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene) /*sc->script = NULL; - 2.45 set to null, better re-run the script */ if (scpt->script) { - SCRIPT_SET_NULL(scpt->script) + SCRIPT_SET_NULL(scpt->script); } } else if (sl->spacetype==SPACE_OUTLINER) { @@ -7438,7 +7442,7 @@ static void versions_gpencil_add_main(ListBase *lb, ID *id, const char *name) new_id(lb, id, name); /* alphabetic insterion: is in new_id */ - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("Converted GPencil to ID: %s\n", id->name+2); } @@ -7995,7 +7999,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) { /* WATCH IT!!!: pointers from libdata have not been converted */ - if (G.f & G_DEBUG) + if (G.debug & G_DEBUG) printf("read file %s\n Version %d sub %d svn r%d\n", fd->relabase, main->versionfile, main->subversionfile, main->revision); if (main->versionfile == 100) { @@ -13518,6 +13522,22 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } } + + if (main->versionfile < 262 || (main->versionfile == 262 && main->subversionfile < 3)) + { + Object *ob; + ModifierData *md; + + for(ob = main->object.first; ob; ob = ob->id.next) { + for(md=ob->modifiers.first; md; md=md->next) { + if(md->type == eModifierType_Lattice) { + LatticeModifierData *lmd = (LatticeModifierData *)md; + lmd->strength = 1.0f; + } + } + } + } + { /* Default for old files is to save particle rotations to pointcache */ @@ -13863,7 +13883,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) if (id==NULL) { read_libblock(fd, ptr, bhead, LIB_READ+LIB_INDIRECT, NULL); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand_doit: other lib %s\n", lib->name); + // if (G.debug & G_DEBUG) printf("expand_doit: other lib %s\n", lib->name); /* for outliner dependency only */ ptr->curlib->parent= mainvar->curlib; @@ -13883,7 +13903,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) change_idid_adr_fd(fd, bhead->old, id); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand_doit: already linked: %s lib: %s\n", id->name, lib->name); + // if (G.debug & G_DEBUG) printf("expand_doit: already linked: %s lib: %s\n", id->name, lib->name); } MEM_freeN(lib); @@ -13899,7 +13919,7 @@ static void expand_doit(FileData *fd, Main *mainvar, void *old) happens which invokes same ID... in that case the lookup table needs this entry */ oldnewmap_insert(fd->libmap, bhead->old, id, 1); // commented because this can print way too much - // if (G.f & G_DEBUG) printf("expand: already read %s\n", id->name); + // if (G.debug & G_DEBUG) printf("expand: already read %s\n", id->name); } } } |