[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16699] branches/sim_physics/source/ blender/blenloader/intern/readfile.c: * bugfix, old files ( including default cube) weren't loading up with
Matt Ebb
matt at mke3.net
Tue Sep 23 10:00:56 CEST 2008
Revision: 16699
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16699
Author: broken
Date: 2008-09-23 10:00:55 +0200 (Tue, 23 Sep 2008)
Log Message:
-----------
* bugfix, old files (including default cube) weren't loading up with
correctly initialised volume settings
Modified Paths:
--------------
branches/sim_physics/source/blender/blenloader/intern/readfile.c
Modified: branches/sim_physics/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/sim_physics/source/blender/blenloader/intern/readfile.c 2008-09-23 07:44:25 UTC (rev 16698)
+++ branches/sim_physics/source/blender/blenloader/intern/readfile.c 2008-09-23 08:00:55 UTC (rev 16699)
@@ -7720,7 +7720,6 @@
Scene *sce= main->scene.first;
Sequence *seq;
Editing *ed;
- Material *ma;
while(sce) {
ed= sce->ed;
@@ -7735,17 +7734,6 @@
sce= sce->id.next;
}
-
- for(ma=main->mat.first; ma; ma= ma->id.next) {
- /* trigger for non-volumetric file */
- if (ma->vol_shade_stepsize < 0.0001f) {
- ma->vol_shade_stepsize = 0.2f;
- ma->vol_stepsize = 0.2f;
- ma->vol_absorption = 1.0f;
- ma->vol_scattering = 1.0f;
- ma->vol_absorption_col[0] = ma->vol_absorption_col[1] = ma->vol_absorption_col[2] = 0.0f;
- }
- }
}
/*fix broken group lengths in id properties*/
@@ -7869,7 +7857,23 @@
la->skyblendtype= MA_RAMP_ADD;
la->skyblendfac= 1.0f;
}
+
}
+
+ if (main->versionfile <= 247) {
+ Material *ma;
+
+ for(ma=main->mat.first; ma; ma= ma->id.next) {
+ /* trigger for non-volumetric file */
+ if (ma->vol_shade_stepsize < 0.0001f) {
+ ma->vol_shade_stepsize = 0.2f;
+ ma->vol_stepsize = 0.2f;
+ ma->vol_absorption = 1.0f;
+ ma->vol_scattering = 1.0f;
+ ma->vol_absorption_col[0] = ma->vol_absorption_col[1] = ma->vol_absorption_col[2] = 0.0f;
+ }
+ }
+ }
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
More information about the Bf-blender-cvs
mailing list