static int ChainingIterator___init__(BPy_ChainingIterator *self, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"brother", NULL}; static const char *kwlist_2[] = {"restrict_to_selection", "restrict_to_unvisited", "begin", "orientation", NULL}; PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0, *obj4 = 0; if (PyArg_ParseTupleAndKeywords(args, kwds, "O!", (char **)kwlist_1, &ChainingIterator_Type, &obj1)) { self->c_it = new ChainingIterator(*(((BPy_ChainingIterator *)obj1)->c_it)); } else if (PyErr_Clear(), (obj1 = obj2 = obj3 = obj4 = 0), PyArg_ParseTupleAndKeywords(args, kwds, "|O!O!O&O!", (char **)kwlist_2, &PyBool_Type, &obj1, &PyBool_Type, &obj2, check_begin, &obj3, &PyBool_Type, &obj4)) { bool restrict_to_selection = (!obj1) ? true : bool_from_PyBool(obj1); bool restrict_to_unvisited = (!obj2) ? true : bool_from_PyBool(obj2); ViewEdge *begin = (!obj3 || obj3 == Py_None) ? NULL : ((BPy_ViewEdge *)obj3)->ve; bool orientation = (!obj4) ? true : bool_from_PyBool(obj4); self->c_it = new ChainingIterator(restrict_to_selection, restrict_to_unvisited, begin, orientation); } else { PyErr_SetString(PyExc_TypeError, "invalid argument(s)"); return -1; } self->py_ve_it.ve_it = self->c_it; self->py_ve_it.py_it.it = self->c_it; self->c_it->py_c_it = (PyObject *)self; return 0; }
static int AdjacencyIterator_init(BPy_AdjacencyIterator *self, PyObject *args, PyObject *kwds) { static const char *kwlist_1[] = {"brother", NULL}; static const char *kwlist_2[] = {"vertex", "restrict_to_selection", "restrict_to_unvisited", NULL}; PyObject *obj1 = 0, *obj2 = 0, *obj3 = 0; if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist_1, &AdjacencyIterator_Type, &obj1)) { if (!obj1) { self->a_it = new AdjacencyIterator(); self->at_start = true; } else { self->a_it = new AdjacencyIterator(*(((BPy_AdjacencyIterator *)obj1)->a_it)); self->at_start = ((BPy_AdjacencyIterator *)obj1)->at_start; } } else if (PyErr_Clear(), (obj2 = obj3 = 0), PyArg_ParseTupleAndKeywords(args, kwds, "O!|O!O!", (char **)kwlist_2, &ViewVertex_Type, &obj1, &PyBool_Type, &obj2, &PyBool_Type, &obj3)) { bool restrictToSelection = (!obj2) ? true : bool_from_PyBool(obj2); bool restrictToUnvisited = (!obj3) ? true : bool_from_PyBool(obj3); self->a_it = new AdjacencyIterator(((BPy_ViewVertex *)obj1)->vv, restrictToSelection, restrictToUnvisited); self->at_start = ((BPy_AdjacencyIterator *)obj1)->at_start; } else { PyErr_SetString(PyExc_TypeError, "invalid argument(s)"); return -1; } self->py_it.it = self->a_it; return 0; }
static int SpatialNoiseShader___init__(BPy_SpatialNoiseShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"amount", "scale", "num_octaves", "smooth", "pure_random", NULL}; float f1, f2; int i3; PyObject *obj4 = 0, *obj5 = 0; if (!PyArg_ParseTupleAndKeywords(args, kwds, "ffiO!O!", (char **)kwlist, &f1, &f2, &i3, &PyBool_Type, &obj4, &PyBool_Type, &obj5)) { return -1; } self->py_ss.ss = new SpatialNoiseShader(f1, f2, i3, bool_from_PyBool(obj4), bool_from_PyBool(obj5)); return 0; }
static int Stroke_tips_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure)) { if (!PyBool_Check(value)) return -1; self->s->setTips(bool_from_PyBool(value)); return 0; }
static int FEdgeSmooth_face_mark_set(BPy_FEdgeSmooth *self, PyObject *value, void *UNUSED(closure)) { if (!PyBool_Check(value)) return -1; self->fes->setFaceMark(bool_from_PyBool(value)); return 0; }
static int StrokeAttribute_visible_set(BPy_StrokeAttribute *self, PyObject *value, void *UNUSED(closure)) { if (!PyBool_Check(value)) { PyErr_SetString(PyExc_TypeError, "value must be boolean"); return -1; } self->sa->setVisible(bool_from_PyBool(value)); return 0; }
static int FEdge_is_smooth_set(BPy_FEdge *self, PyObject *value, void *UNUSED(closure)) { if (!PyBool_Check(value)) { PyErr_SetString(PyExc_TypeError, "value must be boolean"); return -1; } self->fe->setSmooth(bool_from_PyBool(value)); return 0; }
static PyObject *Operators_reset(BPy_Operators * /*self*/, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"delete_strokes", NULL}; PyObject *obj1 = 0; if (PyArg_ParseTupleAndKeywords(args, kwds, "|O!", (char **)kwlist, &PyBool_Type, &obj1)) { // true is the default Operators::reset(obj1 ? bool_from_PyBool(obj1) : true); } else { PyErr_SetString(PyExc_RuntimeError, "Operators.reset() failed"); return NULL; } Py_RETURN_NONE; }
static int ThicknessVariationPatternShader___init__(BPy_ThicknessVariationPatternShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"pattern_name", "thickness_min", "thickness_max", "stretch", NULL}; const char *s1; float f2 = 1.0, f3 = 5.0; PyObject *obj4 = 0; if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|ffO!", (char **)kwlist, &s1, &f2, &f3, &PyBool_Type, &obj4)) return -1; bool b = (!obj4) ? true : bool_from_PyBool(obj4); self->py_ss.ss = new StrokeShaders::ThicknessVariationPatternShader(s1, f2, f3, b); return 0; }
static int CalligraphicShader___init__(BPy_CalligraphicShader *self, PyObject *args, PyObject *kwds) { static const char *kwlist[] = {"thickness_min", "thickness_max", "orientation", "clamp", NULL}; double d1, d2; float f3[2]; PyObject *obj4 = 0; if (!PyArg_ParseTupleAndKeywords( args, kwds, "ddO&O!", (char **)kwlist, &d1, &d2, convert_v2, f3, &PyBool_Type, &obj4)) { return -1; } Vec2f v(f3[0], f3[1]); self->py_ss.ss = new CalligraphicShader(d1, d2, v, bool_from_PyBool(obj4)); return 0; }