[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57745] branches/soc-2013-bge/source/ blender/blenloader/intern: Levels of detail are now properly saved and loaded.
Daniel Stokes
kupomail at gmail.com
Tue Jun 25 23:06:36 CEST 2013
Revision: 57745
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57745
Author: kupoman
Date: 2013-06-25 21:06:35 +0000 (Tue, 25 Jun 2013)
Log Message:
-----------
Levels of detail are now properly saved and loaded.
Modified Paths:
--------------
branches/soc-2013-bge/source/blender/blenloader/intern/readfile.c
branches/soc-2013-bge/source/blender/blenloader/intern/writefile.c
Modified: branches/soc-2013-bge/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2013-bge/source/blender/blenloader/intern/readfile.c 2013-06-25 21:00:00 UTC (rev 57744)
+++ branches/soc-2013-bge/source/blender/blenloader/intern/readfile.c 2013-06-25 21:06:35 UTC (rev 57745)
@@ -4493,6 +4493,13 @@
ob->rigidbody_constraint->ob1 = newlibadr(fd, ob->id.lib, ob->rigidbody_constraint->ob1);
ob->rigidbody_constraint->ob2 = newlibadr(fd, ob->id.lib, ob->rigidbody_constraint->ob2);
}
+
+ {
+ LodLevel *level;
+ for (level = ob->lodlevels.first; level; level = level->next) {
+ level->source = newlibadr(fd, ob->id.lib, level->source);
+ }
+ }
}
}
@@ -5018,6 +5025,9 @@
if (ob->sculpt) {
ob->sculpt = MEM_callocN(sizeof(SculptSession), "reload sculpt session");
}
+
+ link_list(fd, &ob->lodlevels);
+ ob->currentlod = ob->lodlevels.first;
}
/* ************ READ SCENE ***************** */
@@ -9520,7 +9530,7 @@
LodLevel *base;
for (ob = main->object.first; ob; ob = ob->id.next) {
- if (BLI_countlist(&ob->lodlevels) == 0) {
+ if (!ob->lodlevels.first) {
BKE_object_lod_add(ob);
base = BLI_findlink(&ob->lodlevels, 0);
base->distance = 0.0;
Modified: branches/soc-2013-bge/source/blender/blenloader/intern/writefile.c
===================================================================
--- branches/soc-2013-bge/source/blender/blenloader/intern/writefile.c 2013-06-25 21:00:00 UTC (rev 57744)
+++ branches/soc-2013-bge/source/blender/blenloader/intern/writefile.c 2013-06-25 21:06:35 UTC (rev 57745)
@@ -1529,6 +1529,8 @@
write_particlesystems(wd, &ob->particlesystem);
write_modifiers(wd, &ob->modifiers);
+
+ writelist(wd, DATA, "LodLevel", &ob->lodlevels);
}
ob= ob->id.next;
}
More information about the Bf-blender-cvs
mailing list