deleted print function, which caused crashes.
Objects are printed with the repr function.
This commit is contained in:
@@ -651,6 +651,7 @@ static int CurveSetAttr (BPy_Curve *self, char *name, PyObject *value)
|
|||||||
/* Description: This is a callback function for the BPy_Curve type. It */
|
/* Description: This is a callback function for the BPy_Curve type. It */
|
||||||
/* builds a meaninful string to 'print' curve objects. */
|
/* builds a meaninful string to 'print' curve objects. */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
/*
|
||||||
static int CurvePrint(BPy_Curve *self, FILE *fp, int flags) //print
|
static int CurvePrint(BPy_Curve *self, FILE *fp, int flags) //print
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -658,6 +659,7 @@ static int CurvePrint(BPy_Curve *self, FILE *fp, int flags) //print
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Function: CurveRepr */
|
/* Function: CurveRepr */
|
||||||
@@ -667,7 +669,7 @@ static int CurvePrint(BPy_Curve *self, FILE *fp, int flags) //print
|
|||||||
static PyObject *CurveRepr (BPy_Curve *self) //used by 'repr'
|
static PyObject *CurveRepr (BPy_Curve *self) //used by 'repr'
|
||||||
{
|
{
|
||||||
|
|
||||||
return PyString_FromString(self->curve->id.name+2);
|
return PyString_FromFormat("[Curve \"%s\"]", self->curve->id.name+2);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject* CurveCreatePyObject (struct Curve *curve)
|
PyObject* CurveCreatePyObject (struct Curve *curve)
|
||||||
|
@@ -178,7 +178,7 @@ Sets a control point "},
|
|||||||
/* Python Curve_Type callback function prototypes: */
|
/* Python Curve_Type callback function prototypes: */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
static void CurveDeAlloc (BPy_Curve *msh);
|
static void CurveDeAlloc (BPy_Curve *msh);
|
||||||
static int CurvePrint (BPy_Curve *msh, FILE *fp, int flags);
|
//static int CurvePrint (BPy_Curve *msh, FILE *fp, int flags);
|
||||||
static int CurveSetAttr (BPy_Curve *msh, char *name, PyObject *v);
|
static int CurveSetAttr (BPy_Curve *msh, char *name, PyObject *v);
|
||||||
static PyObject *CurveGetAttr (BPy_Curve *msh, char *name);
|
static PyObject *CurveGetAttr (BPy_Curve *msh, char *name);
|
||||||
static PyObject *CurveRepr (BPy_Curve *msh);
|
static PyObject *CurveRepr (BPy_Curve *msh);
|
||||||
@@ -199,7 +199,7 @@ PyTypeObject Curve_Type =
|
|||||||
0, /* tp_itemsize */
|
0, /* tp_itemsize */
|
||||||
/* methods */
|
/* methods */
|
||||||
(destructor)CurveDeAlloc, /* tp_dealloc */
|
(destructor)CurveDeAlloc, /* tp_dealloc */
|
||||||
(printfunc)CurvePrint, /* tp_print */
|
0, /* tp_print */
|
||||||
(getattrfunc)CurveGetAttr, /* tp_getattr */
|
(getattrfunc)CurveGetAttr, /* tp_getattr */
|
||||||
(setattrfunc)CurveSetAttr, /* tp_setattr */
|
(setattrfunc)CurveSetAttr, /* tp_setattr */
|
||||||
0, /* tp_compare */
|
0, /* tp_compare */
|
||||||
|
Reference in New Issue
Block a user