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>2013-02-24 06:39:38 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-02-24 06:39:38 +0400
commit3df023ae82eef0ea105dc61c9730af87b59a07d1 (patch)
tree2d2a4e753c1129fc91f360f0457d30859cd38737 /source/blender/freestyle/intern/python/BPy_Interface0D.cpp
parentd38a335d47f1632000db5172877499ff0184d114 (diff)
Freestyle Python API improvements - part 8.
* Proper handling of keyword arguments was implemented in Operators and ContextFunctions, as well as in methods of Interface0D, Interface1D, Iterator, their subclasses, Noise and IntegrationType. * Operators' methods and functions in the ContextFunctions module were renamed from CamelCase to lower cases + underscores. Style modules were updated accordingly. * Additional code clean-up was also made.
Diffstat (limited to 'source/blender/freestyle/intern/python/BPy_Interface0D.cpp')
-rw-r--r--source/blender/freestyle/intern/python/BPy_Interface0D.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
index 5b7fdfbbd4a..bbfe99ebbf0 100644
--- a/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
+++ b/source/blender/freestyle/intern/python/BPy_Interface0D.cpp
@@ -57,32 +57,32 @@ int Interface0D_Init(PyObject *module)
return -1;
Py_INCREF(&Interface0D_Type);
PyModule_AddObject(module, "Interface0D", (PyObject *)&Interface0D_Type);
-
+
if (PyType_Ready(&CurvePoint_Type) < 0)
return -1;
Py_INCREF(&CurvePoint_Type);
PyModule_AddObject(module, "CurvePoint", (PyObject *)&CurvePoint_Type);
-
+
if (PyType_Ready(&SVertex_Type) < 0)
return -1;
Py_INCREF(&SVertex_Type);
PyModule_AddObject(module, "SVertex", (PyObject *)&SVertex_Type);
-
+
if (PyType_Ready(&ViewVertex_Type) < 0)
return -1;
Py_INCREF(&ViewVertex_Type);
PyModule_AddObject(module, "ViewVertex", (PyObject *)&ViewVertex_Type);
-
+
if (PyType_Ready(&StrokeVertex_Type) < 0)
return -1;
Py_INCREF(&StrokeVertex_Type);
PyModule_AddObject(module, "StrokeVertex", (PyObject *)&StrokeVertex_Type);
-
+
if (PyType_Ready(&NonTVertex_Type) < 0)
return -1;
Py_INCREF(&NonTVertex_Type);
PyModule_AddObject(module, "NonTVertex", (PyObject *)&NonTVertex_Type);
-
+
if (PyType_Ready(&TVertex_Type) < 0)
return -1;
Py_INCREF(&TVertex_Type);
@@ -137,11 +137,12 @@ PyDoc_STRVAR(Interface0D_get_fedge_doc,
" :return: The FEdge lying between the two 0D elements.\n"
" :rtype: :class:`FEdge`");
-static PyObject *Interface0D_get_fedge(BPy_Interface0D *self, PyObject *args)
+static PyObject *Interface0D_get_fedge(BPy_Interface0D *self, PyObject *args, PyObject *kwds)
{
+ static const char *kwlist[] = {"inter", NULL};
PyObject *py_if0D;
- if (!PyArg_ParseTuple(args, "O!", &Interface0D_Type, &py_if0D))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface0D_Type, &py_if0D))
return NULL;
FEdge *fe = self->if0D->getFEdge(*(((BPy_Interface0D *)py_if0D)->if0D));
if (PyErr_Occurred())
@@ -152,7 +153,7 @@ static PyObject *Interface0D_get_fedge(BPy_Interface0D *self, PyObject *args)
}
static PyMethodDef BPy_Interface0D_methods[] = {
- {"get_fedge", (PyCFunction)Interface0D_get_fedge, METH_VARARGS, Interface0D_get_fedge_doc},
+ {"get_fedge", (PyCFunction)Interface0D_get_fedge, METH_VARARGS | METH_KEYWORDS, Interface0D_get_fedge_doc},
{NULL, NULL, 0, NULL}
};