Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readblenentry.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c42
-rw-r--r--source/blender/blenloader/intern/writefile.c2
3 files changed, 33 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index 6f138d5df23..ccf0c226570 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -115,7 +115,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
buf[2]= buf[2]?buf[2]:' ';
buf[3]= buf[3]?buf[3]:' ';
- fprintf(fp, "['%.4s', '%s', %d, %ld ], \n", buf, name, bhead->nr, (long int)(bhead->len+sizeof(BHead)));
+ fprintf(fp, "['%.4s', '%s', %d, %ld ],\n", buf, name, bhead->nr, (long int)(bhead->len+sizeof(BHead)));
}
}
fprintf(fp, "]\n");
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);
}
}
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index c1eab70a3ee..0fa2e513ecc 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1864,7 +1864,7 @@ static void write_previews(WriteData *wd, PreviewImage *prv)
short h = prv->h[1];
unsigned int *rect = prv->rect[1];
/* don't write out large previews if not requested */
- if (!(U.flag & USER_SAVE_PREVIEWS) ) {
+ if (!(U.flag & USER_SAVE_PREVIEWS)) {
prv->w[1] = 0;
prv->h[1] = 0;
prv->rect[1] = NULL;