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>2010-05-23 02:21:15 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-05-23 02:21:15 +0400
commitb85985535dd420e50cc906bd6e7dd352cc2b8b97 (patch)
tree79c4e7703d218855b7460bd5b32e85ee3926d885 /source/blender/freestyle/intern/python/BPy_Nature.cpp
parentdbcb73c033fc15fc0df2ab0a05ac0b2c4a9a31b1 (diff)
New option for detecting feature edges at material boundaries.
A checkbox "Material Boundaries" has been added to the Freestyle options in the Layers tab of the Render buttons. By enabling the option, any edge between two faces with different materials is detected as a feature edge. In style modules, edges at material boundaries can be tested with pyNatureUP1D(Nature.MATERIAL_BOUNDARY).
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Nature.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_Nature.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Nature.cpp b/source/blender/freestyle/intern/python/BPy_Nature.cpp
index 3907ea75a66..be038d424e6 100644
--- a/source/blender/freestyle/intern/python/BPy_Nature.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Nature.cpp
@@ -174,6 +174,10 @@ static PyLongObject _Nature_SUGGESTIVE_CONTOUR = {
PyVarObject_HEAD_INIT(&Nature_Type, 1)
{ Nature::SUGGESTIVE_CONTOUR }
};
+static PyLongObject _Nature_MATERIAL_BOUNDARY = {
+ PyVarObject_HEAD_INIT(&Nature_Type, 1)
+ { Nature::MATERIAL_BOUNDARY }
+};
#define BPy_Nature_POINT ((PyObject *)&_Nature_POINT)
#define BPy_Nature_S_VERTEX ((PyObject *)&_Nature_S_VERTEX)
@@ -188,6 +192,7 @@ static PyLongObject _Nature_SUGGESTIVE_CONTOUR = {
#define BPy_Nature_RIDGE ((PyObject *)&_Nature_RIDGE)
#define BPy_Nature_VALLEY ((PyObject *)&_Nature_VALLEY)
#define BPy_Nature_SUGGESTIVE_CONTOUR ((PyObject *)&_Nature_SUGGESTIVE_CONTOUR)
+#define BPy_Nature_MATERIAL_BOUNDARY ((PyObject *)&_Nature_MATERIAL_BOUNDARY)
//-------------------MODULE INITIALIZATION--------------------------------
int Nature_Init( PyObject *module )
@@ -216,6 +221,7 @@ int Nature_Init( PyObject *module )
PyDict_SetItemString( Nature_Type.tp_dict, "RIDGE", BPy_Nature_RIDGE );
PyDict_SetItemString( Nature_Type.tp_dict, "VALLEY", BPy_Nature_VALLEY );
PyDict_SetItemString( Nature_Type.tp_dict, "SUGGESTIVE_CONTOUR", BPy_Nature_SUGGESTIVE_CONTOUR );
+ PyDict_SetItemString( Nature_Type.tp_dict, "MATERIAL_BOUNDARY", BPy_Nature_MATERIAL_BOUNDARY );
return 0;
}