Revision: 26549
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26549
Author:   campbellbarton
Date:     2010-02-02 15:50:43 +0100 (Tue, 02 Feb 2010)

Log Message:
-----------
- lamp bias of 0.0 was allowed when it should not be.
- enable floating point exceptions in debug mode on linux, makes nan's easy to 
track.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_lamp.c
    trunk/blender/source/creator/creator.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_lamp.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_lamp.c     2010-02-02 
13:58:42 UTC (rev 26548)
+++ trunk/blender/source/blender/makesrna/intern/rna_lamp.c     2010-02-02 
14:50:43 UTC (rev 26549)
@@ -665,7 +665,7 @@
 
        prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, 
PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "bias");
-       RNA_def_property_range(prop, 0.0f, 5.0f);
+       RNA_def_property_range(prop, 0.001f, 5.0f);
        RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Shadow buffer 
sampling bias.");
        RNA_def_property_update(prop, 0, "rna_Lamp_update");
 

Modified: trunk/blender/source/creator/creator.c
===================================================================
--- trunk/blender/source/creator/creator.c      2010-02-02 13:58:42 UTC (rev 
26548)
+++ trunk/blender/source/creator/creator.c      2010-02-02 14:50:43 UTC (rev 
26549)
@@ -29,13 +29,16 @@
 #include <stdlib.h>
 #include <string.h>
 
-
 /* for setuid / getuid */
 #ifdef __sgi
 #include <sys/types.h>
 #include <unistd.h>
 #endif
 
+#ifdef __linux__
+#include <fenv.h>
+#endif
+
 /* This little block needed for linking to Blender... */
 
 #include "MEM_guardedalloc.h"
@@ -944,6 +947,12 @@
        setuid(getuid()); /* end superuser */
 #endif
 
+#ifdef __linux__
+       /* zealous but makes float issues a heck of a lot easier to find! */
+       if(G.f & G_DEBUG)
+               feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
+#endif
+
        /* for all platforms, even windos has it! */
        if(G.background) signal(SIGINT, blender_esc);   /* ctrl c out bg render 
*/
        


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to