*warnings fixes
This commit is contained in:
@@ -101,10 +101,10 @@ returns None if not found.\n";
|
||||
struct PyMethodDef M_Image_methods[] = {
|
||||
/*{"New", ( PyCFunction ) M_Image_New, METH_VARARGS | METH_KEYWORDS,
|
||||
M_Image_New_doc}, */
|
||||
{"Get", M_Image_Get, METH_VARARGS, M_Image_Get_doc},
|
||||
{"GetCurrent", M_Image_GetCurrent, METH_NOARGS, M_Image_GetCurrent_doc},
|
||||
{"get", M_Image_Get, METH_VARARGS, M_Image_Get_doc},
|
||||
{"Load", M_Image_Load, METH_VARARGS, M_Image_Load_doc},
|
||||
{"Get", (PyCFunction) M_Image_Get, METH_VARARGS, M_Image_Get_doc},
|
||||
{"GetCurrent", (PyCFunction) M_Image_GetCurrent, METH_NOARGS, M_Image_GetCurrent_doc},
|
||||
{"get", (PyCFunction) M_Image_Get, METH_VARARGS, M_Image_Get_doc},
|
||||
{"Load", (PyCFunction) M_Image_Load, METH_VARARGS, M_Image_Load_doc},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "BKE_utildefines.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLO_readfile.h"
|
||||
#include "BLI_linklist.h"
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
@@ -191,35 +191,41 @@ static PyObject *TimeLine_getFramesMarked (BPy_TimeLine *self, PyObject *args) {
|
||||
"expected nothing, string or int as arguments.");
|
||||
if (frm>0) {
|
||||
marker_dict= PyDict_New ();
|
||||
for (marker_it= self->marker_list->first; marker_it; marker_it= marker_it->next)
|
||||
for (marker_it= self->marker_list->first; marker_it; marker_it= marker_it->next){
|
||||
if (marker_it->frame==frm) {
|
||||
if ((pyo= PyDict_GetItem ((PyObject*)marker_dict, PyInt_FromLong ((long int)marker_it->frame))) ) {
|
||||
pyo= PyDict_GetItem ((PyObject*)marker_dict, PyInt_FromLong ((long int)marker_it->frame));
|
||||
if (pyo) {
|
||||
PyList_Append (pyo, PyString_FromString (marker_it->name));
|
||||
Py_INCREF (pyo);
|
||||
}
|
||||
else {
|
||||
if (!pyo) pyo= PyList_New (0);
|
||||
}else{
|
||||
pyo = PyList_New (0);
|
||||
PyList_Append (pyo, PyString_FromString (marker_it->name));
|
||||
}
|
||||
PyDict_SetItem (marker_dict, PyInt_FromLong ((long int)marker_it->frame), pyo);
|
||||
if (pyo) { Py_DECREF (pyo); pyo= NULL; }
|
||||
if (pyo) {
|
||||
Py_DECREF (pyo);
|
||||
pyo= NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else {
|
||||
}else {
|
||||
marker_dict= PyDict_New ();
|
||||
for (marker_it= self->marker_list->first; marker_it; marker_it= marker_it->next) {
|
||||
if ((pyo=PyDict_GetItem ((PyObject*)marker_dict, PyInt_FromLong ((long int)marker_it->frame))) ) {
|
||||
pyo=PyDict_GetItem ((PyObject*)marker_dict, PyInt_FromLong ((long int)marker_it->frame));
|
||||
if (pyo) {
|
||||
PyList_Append (pyo, PyString_FromString (marker_it->name));
|
||||
Py_INCREF (pyo);
|
||||
}
|
||||
else {
|
||||
if (!pyo) pyo= PyList_New (0);
|
||||
}else{
|
||||
pyo= PyList_New (0);
|
||||
PyList_Append (pyo, PyString_FromString (marker_it->name));
|
||||
}
|
||||
PyDict_SetItem (marker_dict, PyInt_FromLong ((long int)marker_it->frame), pyo);
|
||||
if (pyo) { Py_DECREF (pyo); pyo= NULL; }
|
||||
if (pyo) {
|
||||
Py_DECREF (pyo);
|
||||
pyo= NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user