static PyObject *UnaryPredicate1D___call__(BPy_UnaryPredicate1D *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"inter", NULL}; PyObject *py_if1D; if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist, &Interface1D_Type, &py_if1D)) return NULL; Interface1D *if1D = ((BPy_Interface1D *)py_if1D)->if1D; if (!if1D) { string class_name(Py_TYPE(self)->tp_name); PyErr_SetString(PyExc_RuntimeError, (class_name + " has no Interface1D").c_str()); return NULL; } if (typeid(*(self->up1D)) == typeid(UnaryPredicate1D)) { PyErr_SetString(PyExc_TypeError, "__call__ method not properly overridden"); return NULL; } if (self->up1D->operator()(*if1D) < 0) { if (!PyErr_Occurred()) { string class_name(Py_TYPE(self)->tp_name); PyErr_SetString(PyExc_RuntimeError, (class_name + " __call__ method failed").c_str()); } return NULL; } return PyBool_from_bool(self->up1D->result); }
PyObject *BPy_directedViewEdge_from_directedViewEdge(ViewVertex::directedViewEdge& dve) { PyObject *py_dve = PyTuple_New(2); PyTuple_SET_ITEM(py_dve, 0, BPy_ViewEdge_from_ViewEdge(*(dve.first))); PyTuple_SET_ITEM(py_dve, 1, PyBool_from_bool(dve.second)); return py_dve; }
static PyObject *AdjacencyIterator_is_incoming_get(BPy_AdjacencyIterator *self, void *UNUSED(closure)) { if (self->a_it->isEnd()) { PyErr_SetString(PyExc_RuntimeError, "iteration has stopped"); return NULL; } return PyBool_from_bool(self->a_it->isIncoming()); }
static PyObject *StrokeAttribute_has_attribute_vec3(BPy_StrokeAttribute *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"name", NULL}; char *attr; if (!PyArg_ParseTupleAndKeywords(args, kwds, "s", (char **)kwlist, &attr)) return NULL; return PyBool_from_bool(self->sa->isAttributeAvailableVec3f(attr)); }
static PyObject *Id_RichCompare(BPy_Id *o1, BPy_Id *o2, int opid) { switch (opid) { case Py_LT: return PyBool_from_bool(o1->id->operator<(*(o2->id))); break; case Py_LE: return PyBool_from_bool(o1->id->operator<(*(o2->id)) || o1->id->operator==(*(o2->id))); break; case Py_EQ: return PyBool_from_bool(o1->id->operator==(*(o2->id))); break; case Py_NE: return PyBool_from_bool(o1->id->operator!=(*(o2->id))); break; case Py_GT: return PyBool_from_bool(!(o1->id->operator<(*(o2->id)) || o1->id->operator==(*(o2->id)))); break; case Py_GE: return PyBool_from_bool(!(o1->id->operator<(*(o2->id)))); break; } Py_RETURN_NONE; }
static PyObject *StrokeAttribute_visible_get(BPy_StrokeAttribute *self, void *UNUSED(closure)) { return PyBool_from_bool(self->sa->isVisible()); }
static PyObject *Stroke_tips_get(BPy_Stroke *self, void *UNUSED(closure)) { return PyBool_from_bool(self->s->hasTips()); }
static PyObject *ViewEdge_is_closed_get(BPy_ViewEdge *self, void *UNUSED(closure)) { return PyBool_from_bool(self->ve->isClosed()); }
static PyObject *FEdge_is_smooth_get(BPy_FEdge *self, void *UNUSED(closure)) { return PyBool_from_bool(self->fe->isSmooth()); }
static PyObject *ChainingIterator_is_incrementing_get(BPy_ChainingIterator *self, void *UNUSED(closure)) { return PyBool_from_bool(self->c_it->isIncrementing()); }
static PyObject *FEdgeSmooth_face_mark_get(BPy_FEdgeSmooth *self, void *UNUSED(closure)) { return PyBool_from_bool(self->fes->faceMark()); }