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:
authorDaniel Genrich <daniel.genrich@gmx.net>2007-10-04 15:22:54 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2007-10-04 15:22:54 +0400
commit0efce1fa795e2f6c75ff25b88b3aff785ad71ca6 (patch)
treeb54240fb68d5265da7fd4067a5a4e74cb0518d02 /source/blender/blenloader/intern
parent626edd8de8c3ce237c0ece95f99fb56f1b90bbe8 (diff)
parenta41da4fe110410394b964400bb1b5f49fa569f3b (diff)
Merge with trunk: svn merge -r 12182:12207 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r--source/blender/blenloader/intern/readblenentry.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c68
2 files changed, 38 insertions, 32 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index dfa06ebdeb8..ef287428a19 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -233,7 +233,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype)
for (bhead= blo_firstbhead(fd); bhead; bhead= blo_nextbhead(fd, bhead)) {
if (bhead->code==ofblocktype) {
ID *id= (ID*) (bhead+1);
- if (GS(id->name) == ID_MA) {
+ if ( (GS(id->name) == ID_MA) || (GS(id->name) == ID_TE)) {
new_prv = MEM_callocN(sizeof(PreviewImage), "newpreview");
BLI_linklist_prepend(&previews, new_prv);
looking = 1;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 38e11928c7d..c3ba4b9e292 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6516,7 +6516,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if(main->versionfile <= 244) {
Scene *sce;
bScreen *sc;
- Object *ob;
Lamp *la;
World *wrld;
@@ -6566,12 +6565,43 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
- if (main->versionfile != 244 || main->subversionfile < 3) {
- for(ob = main->object.first; ob; ob= ob->id.next) {
+ if (main->versionfile != 244 || main->subversionfile < 3) {
+ /* constraints recode version patch used to be here. Moved to 245 now... */
+
+
+ for(wrld=main->world.first; wrld; wrld= wrld->id.next) {
+ if (wrld->mode & WO_AMB_OCC)
+ wrld->ao_samp_method = WO_AOSAMP_CONSTANT;
+ else
+ wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY;
+
+ wrld->ao_adapt_thresh = 0.005;
+ }
+
+ for(la=main->lamp.first; la; la= la->id.next) {
+ if (la->type == LA_AREA)
+ la->ray_samp_method = LA_SAMP_CONSTANT;
+ else
+ la->ray_samp_method = LA_SAMP_HALTON;
+
+ la->adapt_thresh = 0.001;
+ }
+ }
+ }
+ if(main->versionfile <= 245) {
+ bScreen *sc;
+ Object *ob;
+ Image *ima;
+ Lamp *la;
+ Material *ma;
+
+ /* unless the file was created 2.44.3 but not 2.45, update the constraints */
+ if (!(main->versionfile==244 && main->subversionfile==3)) {
+ for (ob = main->object.first; ob; ob= ob->id.next) {
ListBase *list;
list = &ob->constraints;
- /* fix up constraints due to constraint recode changes */
+ /* fix up constraints due to constraint recode changes (originally at 2.44.3) */
if (list) {
bConstraint *curcon;
for (curcon = list->first; curcon; curcon=curcon->next) {
@@ -6605,7 +6635,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* correctly initialise constinv matrix */
Mat4One(ob->constinv);
-
+
if (ob->type == OB_ARMATURE) {
if (ob->pose) {
bConstraint *curcon;
@@ -6647,31 +6677,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
}
-
- for(wrld=main->world.first; wrld; wrld= wrld->id.next) {
- if (wrld->mode & WO_AMB_OCC)
- wrld->ao_samp_method = WO_AOSAMP_CONSTANT;
- else
- wrld->ao_samp_method = WO_AOSAMP_HAMMERSLEY;
-
- wrld->ao_adapt_thresh = 0.005;
- }
-
- for(la=main->lamp.first; la; la= la->id.next) {
- if (la->type == LA_AREA)
- la->ray_samp_method = LA_SAMP_CONSTANT;
- else
- la->ray_samp_method = LA_SAMP_HALTON;
-
- la->adapt_thresh = 0.001;
- }
}
- }
- if(main->versionfile <= 245) {
- bScreen *sc;
- Image* ima;
- Lamp *la;
- Material *ma;
/* fix all versions before 2.45 */
if (main->versionfile != 245) {
@@ -6687,7 +6693,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
sa= sc->areabase.first;
while(sa) {
SpaceLink *sl;
-
+
for (sl= sa->spacedata.first; sl; sl= sl->next) {
if(sl->spacetype==SPACE_IMASEL) {
SpaceImaSel *simasel= (SpaceImaSel*) sl;
@@ -6716,7 +6722,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
simasel->flag = 7; /* ??? elubie */
strcpy (simasel->dir, U.textudir); /* TON */
strcpy (simasel->file, "");
-
+
simasel->returnfunc = 0;
simasel->title[0] = 0;
}