[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20225] branches/sim_physics/source/ blender/render/intern/source/voxeldata.c: * Fix for simple bug in voxel data texture

Matt Ebb matt at mke3.net
Sat May 16 15:17:21 CEST 2009


Revision: 20225
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20225
Author:   broken
Date:     2009-05-16 15:17:21 +0200 (Sat, 16 May 2009)

Log Message:
-----------
* Fix for simple bug in voxel data texture

Modified Paths:
--------------
    branches/sim_physics/source/blender/render/intern/source/voxeldata.c

Modified: branches/sim_physics/source/blender/render/intern/source/voxeldata.c
===================================================================
--- branches/sim_physics/source/blender/render/intern/source/voxeldata.c	2009-05-16 12:56:09 UTC (rev 20224)
+++ branches/sim_physics/source/blender/render/intern/source/voxeldata.c	2009-05-16 13:17:21 UTC (rev 20225)
@@ -355,14 +355,14 @@
 	
 	if (!vd) return;
 	
+	if (!BLI_exists(vd->source_path)) return;
+	fp = fopen(vd->source_path,"rb");
+	if (!fp) return;
+	
 	read_voxeldata_header(fp, vd);
 	size = (vd->resolX)*(vd->resolY)*(vd->resolZ);
 	vd->dataset = MEM_mallocN(sizeof(float)*size, "voxel dataset");
 	
-	if (!BLI_exists(vd->source_path)) return;
-	fp = fopen(vd->source_path,"rb");
-	if (!fp) return;
-	
 	//here improve the dataset loading function for more dataset types
 	if (vd->still) load_frame(fp, vd->dataset, size, vd->still_frame, sizeof(VoxelDataHeader));
 	else load_frame(fp, vd->dataset, size, re->r.cfra, sizeof(VoxelDataHeader));





More information about the Bf-blender-cvs mailing list