[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13549] trunk/blender/source/blender/ render/intern/source/convertblender.c: fix for bug [#8065] Crash when baking.

Campbell Barton ideasman42 at gmail.com
Sun Feb 3 21:57:56 CET 2008


Revision: 13549
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13549
Author:   campbellbarton
Date:     2008-02-03 21:57:52 +0100 (Sun, 03 Feb 2008)

Log Message:
-----------
fix for bug [#8065] Crash when baking.
http://projects.blender.org/tracker/index.php?func=detail&aid=8065&group_id=9&atid=125

Lamp ray_samp_method could be an invalid value while rendering because a check was only done in the user interface.

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/convertblender.c

Modified: trunk/blender/source/blender/render/intern/source/convertblender.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/convertblender.c	2008-02-03 19:25:43 UTC (rev 13548)
+++ trunk/blender/source/blender/render/intern/source/convertblender.c	2008-02-03 20:57:52 UTC (rev 13549)
@@ -3391,6 +3391,13 @@
 	lar->area_sizez= la->area_sizez;
 
 	lar->area_shape= la->area_shape;
+	
+	/* Annoying, lamp UI does this, but the UI might not have been used? - add here too.
+	 * make sure this matches buttons_shading.c's logic */
+	if(ELEM4(la->type, LA_AREA, LA_SPOT, LA_SUN, LA_LOCAL) && (la->mode & LA_SHAD_RAY))
+		if (ELEM3(la->type, LA_SPOT, LA_SUN, LA_LOCAL))
+			if (la->ray_samp_method == LA_SAMP_CONSTANT) la->ray_samp_method = LA_SAMP_HALTON;
+	
 	lar->ray_samp_method= la->ray_samp_method;
 	lar->ray_samp_type= la->ray_samp_type;
 	





More information about the Bf-blender-cvs mailing list