Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-02-02 17:50:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-02 17:50:43 +0300
commit396770a63af57a85f2306c7b9775734c1daffff7 (patch)
tree5aa8ba330411bd9e1c3ab85dca8598ad90afe965 /source
parent25183b87471b78bfda58d224e8d4a70d468142fd (diff)
- 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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c2
-rw-r--r--source/creator/creator.c11
2 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 47d7b5fadb7..56913d6275c 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -665,7 +665,7 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
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");
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 6244032bbcf..7939ea30721 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -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 @@ int main(int argc, char **argv)
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 */