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:
authorJulian Eisel <julian@blender.org>2022-11-10 15:17:42 +0300
committerJulian Eisel <julian@blender.org>2022-11-10 15:17:42 +0300
commit7246c387435769a169ac24c91434c615df6434b4 (patch)
tree61842e3e0ce85e80720fdd7476d44d2e629f59fd /source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
parentc5f55d17096d373791363e46004176e3f7f7ae52 (diff)
parent0b4bd3ddc016298e868169a541cf6c132b10c587 (diff)
Merge branch 'master' into asset-browser-grid-viewasset-browser-grid-view
Diffstat (limited to 'source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp')
-rw-r--r--source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp93
1 files changed, 45 insertions, 48 deletions
diff --git a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
index 2b6d40e1710..655f9cdce1e 100644
--- a/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
+++ b/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp
@@ -123,7 +123,7 @@ PyDoc_STRVAR(CurvePoint_first_svertex_doc,
"\n"
":type: :class:`SVertex`");
-static PyObject *CurvePoint_first_svertex_get(BPy_CurvePoint *self, void *UNUSED(closure))
+static PyObject *CurvePoint_first_svertex_get(BPy_CurvePoint *self, void * /*closure*/)
{
SVertex *A = self->cp->A();
if (A) {
@@ -132,9 +132,7 @@ static PyObject *CurvePoint_first_svertex_get(BPy_CurvePoint *self, void *UNUSED
Py_RETURN_NONE;
}
-static int CurvePoint_first_svertex_set(BPy_CurvePoint *self,
- PyObject *value,
- void *UNUSED(closure))
+static int CurvePoint_first_svertex_set(BPy_CurvePoint *self, PyObject *value, void * /*closure*/)
{
if (!BPy_SVertex_Check(value)) {
PyErr_SetString(PyExc_TypeError, "value must be an SVertex");
@@ -149,7 +147,7 @@ PyDoc_STRVAR(CurvePoint_second_svertex_doc,
"\n"
":type: :class:`SVertex`");
-static PyObject *CurvePoint_second_svertex_get(BPy_CurvePoint *self, void *UNUSED(closure))
+static PyObject *CurvePoint_second_svertex_get(BPy_CurvePoint *self, void * /*closure*/)
{
SVertex *B = self->cp->B();
if (B) {
@@ -158,9 +156,7 @@ static PyObject *CurvePoint_second_svertex_get(BPy_CurvePoint *self, void *UNUSE
Py_RETURN_NONE;
}
-static int CurvePoint_second_svertex_set(BPy_CurvePoint *self,
- PyObject *value,
- void *UNUSED(closure))
+static int CurvePoint_second_svertex_set(BPy_CurvePoint *self, PyObject *value, void * /*closure*/)
{
if (!BPy_SVertex_Check(value)) {
PyErr_SetString(PyExc_TypeError, "value must be an SVertex");
@@ -176,7 +172,7 @@ PyDoc_STRVAR(CurvePoint_fedge_doc,
"\n"
":type: :class:`FEdge`");
-static PyObject *CurvePoint_fedge_get(BPy_CurvePoint *self, void *UNUSED(closure))
+static PyObject *CurvePoint_fedge_get(BPy_CurvePoint *self, void * /*closure*/)
{
SVertex *A = self->cp->A();
Interface0D *B = (Interface0D *)self->cp->B();
@@ -192,12 +188,12 @@ PyDoc_STRVAR(CurvePoint_t2d_doc,
"\n"
":type: float");
-static PyObject *CurvePoint_t2d_get(BPy_CurvePoint *self, void *UNUSED(closure))
+static PyObject *CurvePoint_t2d_get(BPy_CurvePoint *self, void * /*closure*/)
{
return PyFloat_FromDouble(self->cp->t2d());
}
-static int CurvePoint_t2d_set(BPy_CurvePoint *self, PyObject *value, void *UNUSED(closure))
+static int CurvePoint_t2d_set(BPy_CurvePoint *self, PyObject *value, void * /*closure*/)
{
float scalar;
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
@@ -225,44 +221,45 @@ static PyGetSetDef BPy_CurvePoint_getseters[] = {
};
/*-----------------------BPy_CurvePoint type definition ------------------------------*/
+
PyTypeObject CurvePoint_Type = {
- PyVarObject_HEAD_INIT(nullptr, 0) "CurvePoint", /* tp_name */
- sizeof(BPy_CurvePoint), /* tp_basicsize */
- 0, /* tp_itemsize */
- nullptr, /* tp_dealloc */
- 0, /* tp_vectorcall_offset */
- nullptr, /* tp_getattr */
- nullptr, /* tp_setattr */
- nullptr, /* tp_reserved */
- nullptr, /* tp_repr */
- nullptr, /* tp_as_number */
- nullptr, /* tp_as_sequence */
- nullptr, /* tp_as_mapping */
- nullptr, /* tp_hash */
- nullptr, /* tp_call */
- nullptr, /* tp_str */
- nullptr, /* tp_getattro */
- nullptr, /* tp_setattro */
- nullptr, /* tp_as_buffer */
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- CurvePoint_doc, /* tp_doc */
- nullptr, /* tp_traverse */
- nullptr, /* tp_clear */
- nullptr, /* tp_richcompare */
- 0, /* tp_weaklistoffset */
- nullptr, /* tp_iter */
- nullptr, /* tp_iternext */
- nullptr, /* tp_methods */
- nullptr, /* tp_members */
- BPy_CurvePoint_getseters, /* tp_getset */
- &Interface0D_Type, /* tp_base */
- nullptr, /* tp_dict */
- nullptr, /* tp_descr_get */
- nullptr, /* tp_descr_set */
- 0, /* tp_dictoffset */
- (initproc)CurvePoint_init, /* tp_init */
- nullptr, /* tp_alloc */
- nullptr, /* tp_new */
+ /*tp_name*/ PyVarObject_HEAD_INIT(nullptr, 0) "CurvePoint",
+ /*tp_basicsize*/ sizeof(BPy_CurvePoint),
+ /*tp_itemsize*/ 0,
+ /*tp_dealloc*/ nullptr,
+ /*tp_vectorcall_offset*/ 0,
+ /*tp_getattr*/ nullptr,
+ /*tp_setattr*/ nullptr,
+ /*tp_as_async*/ nullptr,
+ /*tp_repr*/ nullptr,
+ /*tp_as_number*/ nullptr,
+ /*tp_as_sequence*/ nullptr,
+ /*tp_as_mapping*/ nullptr,
+ /*tp_hash*/ nullptr,
+ /*tp_call*/ nullptr,
+ /*tp_str*/ nullptr,
+ /*tp_getattro*/ nullptr,
+ /*tp_setattro*/ nullptr,
+ /*tp_as_buffer*/ nullptr,
+ /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ /*tp_doc*/ CurvePoint_doc,
+ /*tp_traverse*/ nullptr,
+ /*tp_clear*/ nullptr,
+ /*tp_richcompare*/ nullptr,
+ /*tp_weaklistoffset*/ 0,
+ /*tp_iter*/ nullptr,
+ /*tp_iternext*/ nullptr,
+ /*tp_methods*/ nullptr,
+ /*tp_members*/ nullptr,
+ /*tp_getset*/ BPy_CurvePoint_getseters,
+ /*tp_base*/ &Interface0D_Type,
+ /*tp_dict*/ nullptr,
+ /*tp_descr_get*/ nullptr,
+ /*tp_descr_set*/ nullptr,
+ /*tp_dictoffset*/ 0,
+ /*tp_init*/ (initproc)CurvePoint_init,
+ /*tp_alloc*/ nullptr,
+ nullptr, /*tp_new*/
};
///////////////////////////////////////////////////////////////////////////////////////////