remove uneeded checks and testMethod from KX_ConstraintWrapper, typo in import_obj

This commit is contained in:
Campbell Barton 2009-04-29 10:24:12 +00:00
parent f004c36e41
commit 3bc02088e8
2 changed files with 3 additions and 33 deletions

@ -587,7 +587,7 @@ def load_obj(filepath, CLAMP_SIZE= 0.0, CREATE_FGONS= True, CREATE_SMOOTH_GROUPS
# so we need to know weather
multi_line_face= False
print '\tpassing obj file "%s"...' % filepath,
print '\tparsing obj file "%s"...' % filepath,
time_sub= sys.time()
file= open(filepath, 'rU')
for line in file: #.xreadlines():

@ -48,20 +48,12 @@ KX_ConstraintWrapper::KX_ConstraintWrapper(
KX_ConstraintWrapper::~KX_ConstraintWrapper()
{
}
//python integration methods
PyObject* KX_ConstraintWrapper::PyTestMethod(PyObject* args, PyObject* kwds)
{
Py_RETURN_NONE;
}
PyObject* KX_ConstraintWrapper::PyGetConstraintId(PyObject* args, PyObject* kwds)
{
return PyInt_FromLong(m_constraintId);
}
//python specific stuff
PyTypeObject KX_ConstraintWrapper::Type = {
PyObject_HEAD_INIT(NULL)
@ -97,35 +89,13 @@ PyObject* KX_ConstraintWrapper::py_getattro_dict() {
py_getattro_dict_up(PyObjectPlus);
}
int KX_ConstraintWrapper::py_setattro(PyObject *attr,PyObject* pyobj)
int KX_ConstraintWrapper::py_setattro(PyObject *attr,PyObject* value)
{
int result = 1;
/* what the heck is this supposed to do?, needs attention */
if (PyList_Check(pyobj))
{
result = 0;
}
if (PyFloat_Check(pyobj))
{
result = 0;
}
if (PyInt_Check(pyobj))
{
result = 0;
}
if (PyString_Check(pyobj))
{
result = 0;
}
if (result)
result = PyObjectPlus::py_setattro(attr,pyobj);
return result;
py_setattro_up(PyObjectPlus);
};
PyMethodDef KX_ConstraintWrapper::Methods[] = {
{"testMethod",(PyCFunction) KX_ConstraintWrapper::sPyTestMethod, METH_VARARGS},
{"getConstraintId",(PyCFunction) KX_ConstraintWrapper::sPyGetConstraintId, METH_VARARGS},
{NULL,NULL} //Sentinel
};