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:
authorMaxime Curioni <maxime.curioni@gmail.com>2008-07-20 09:01:29 +0400
committerMaxime Curioni <maxime.curioni@gmail.com>2008-07-20 09:01:29 +0400
commitab722884d3684808b17f76ae742ef59dccf4f8e2 (patch)
treeaf1d982347fccef4c3121bd9bc4157716e45f335 /source/blender/freestyle/intern/python/Interface1D
parent16d7d12123d25a353043cefe2c9e4664476224d7 (diff)
soc-2008-mxcurioni: updated support for Nature class.
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface1D')
-rw-r--r--source/blender/freestyle/intern/python/Interface1D/FEdge.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp
index e8e5c6787e3..6a00ad66123 100644
--- a/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp
+++ b/source/blender/freestyle/intern/python/Interface1D/FEdge.cpp
@@ -26,6 +26,7 @@ static PyObject * FEdge_SetId( BPy_FEdge *self , PyObject *args);
static PyObject * FEdge_SetNextEdge( BPy_FEdge *self , PyObject *args);
static PyObject * FEdge_SetPreviousEdge( BPy_FEdge *self , PyObject *args);
static PyObject * FEdge_SetSmooth( BPy_FEdge *self , PyObject *args);
+static PyObject * FEdge_SetNature( BPy_FEdge *self, PyObject *args );
/*----------------------FEdge instance definitions ----------------------------*/
static PyMethodDef BPy_FEdge_methods[] = {
@@ -44,6 +45,7 @@ static PyMethodDef BPy_FEdge_methods[] = {
{"SetNextEdge", ( PyCFunction ) FEdge_SetNextEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the next FEdge. "},
{"SetPreviousEdge", ( PyCFunction ) FEdge_SetPreviousEdge, METH_VARARGS, "(FEdge e) Sets the pointer to the previous FEdge. "},
{"SetSmooth", ( PyCFunction ) FEdge_SetSmooth, METH_VARARGS, "(bool b) Sets the flag telling whether this FEdge is smooth or sharp. true for Smooth, false for Sharp. "},
+ {"SetNature", ( PyCFunction ) FEdge_SetNature, METH_VARARGS, "(Nature n) Sets the nature of this FEdge. "},
{NULL, NULL, 0, NULL}
};
@@ -298,6 +300,20 @@ PyObject *FEdge_SetSmooth( BPy_FEdge *self , PyObject *args) {
Py_RETURN_NONE;
}
+PyObject * FEdge_SetNature( BPy_FEdge *self, PyObject *args ) {
+ PyObject *py_n;
+
+ if(!( PyArg_ParseTuple(args, "O", &py_n) && BPy_Nature_Check(py_n) )) {
+ cout << "ERROR: FEdge_setNature" << endl;
+ Py_RETURN_NONE;
+ }
+
+ PyObject *i = (PyObject *) &( ((BPy_Nature *) py_n)->i );
+ ((FEdge *) self->py_if1D.if1D)->SetNature( PyInt_AsLong(i) );
+
+ Py_RETURN_NONE;
+}
+
PyObject *FEdge_getVertices( BPy_FEdge *self ) {
PyObject *py_vertices = PyList_New(NULL);