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
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-01-31 23:57:39 +0300
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2011-01-31 23:57:39 +0300
commit949a752dddacdb8f48f9ab1d5aa99da63d1da839 (patch)
treed0215ceaec4d50ed4c1d44a65c0b8702661be8ac /source/blender/freestyle/intern/python/BPy_Freestyle.cpp
parent4e9a519e223a467a069d37eedef6f44081ba525a (diff)
Made stroke rendering stability fixes, with the aim of addressing
occasional unexpected long lines. 1. The Parameter Editor mode was extended to prevent strokes from doing quick U-turns that "enable" a known bug in strip creation that generates unexpected long lines in question. 2. A verbose warning message was added to make the existence of the strip creation bug visible to users. When the bug affects the stroke rendering, the following warning shows up in the console: > Warning: problem in strip creation (the strip is most likely doing a U-turn). 3. The extrapolation option of CurveMapping (used in alpha and thickness modifiers in the Parameter Editor mode) was identified as another source of unexpected long lines. Now the extrapolation option is unconditionally disabled (even when users enable it through the GUI).
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Freestyle.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_Freestyle.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
index 2755dea1cb7..d39efe5693f 100644
--- a/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Freestyle.cpp
@@ -172,6 +172,7 @@ static PyObject *Freestyle_evaluateColorRamp( PyObject *self, PyObject *args )
return newVectorObject( out, 4, Py_NEW, NULL);
}
+#include "DNA_color_types.h"
#include "BKE_colortools.h" /* curvemapping_evaluateF() */
static char Freestyle_evaluateCurveMappingF___doc__[] =
@@ -206,6 +207,11 @@ static PyObject *Freestyle_evaluateCurveMappingF( PyObject *self, PyObject *args
return NULL;
}
cumap = (CurveMapping *)py_srna->ptr.data;
+ /* disable extrapolation if enabled */
+ if ((cumap->cm[cur].flag & CUMA_EXTEND_EXTRAPOLATE)) {
+ cumap->cm[cur].flag &= ~( CUMA_EXTEND_EXTRAPOLATE );
+ curvemapping_changed(cumap, 0);
+ }
return PyFloat_FromDouble(curvemapping_evaluateF(cumap, cur, value));
}