Example #1
0
static PyObject *KX_PythonSeq_getIter(KX_PythonSeq *self)
{
	if(BGE_PROXY_REF(self->base)==NULL) {
		PyErr_SetString(PyExc_SystemError, "for i in seq: "BGE_PROXY_ERROR_MSG);
		return NULL;
	}
	
	/* create a new iterator if were already using this one */
	if (self->iter == -1) {
		self->iter = 0;
		Py_INCREF(self);
		return (PyObject *)self;
	} else {
		return KX_PythonSeq_CreatePyObject(self->base, self->type);
 	}
 }
PyObject *BL_ArmatureObject::pyattr_get_constraints(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
	return KX_PythonSeq_CreatePyObject((static_cast<BL_ArmatureObject*>(self_v))->m_proxy, KX_PYGENSEQ_OB_TYPE_CONSTRAINTS);
}
PyObject *BL_ArmatureObject::pyattr_get_channels(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
	BL_ArmatureObject* self = static_cast<BL_ArmatureObject*>(self_v);
	self->LoadChannels(); // make sure we have the channels
	return KX_PythonSeq_CreatePyObject((static_cast<BL_ArmatureObject*>(self_v))->m_proxy, KX_PYGENSEQ_OB_TYPE_CHANNELS);
}
Example #4
0
PyObject* SCA_IController::pyattr_get_actuators(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
{
	return KX_PythonSeq_CreatePyObject((static_cast<SCA_IController*>(self_v))->m_proxy, KX_PYGENSEQ_CONT_TYPE_ACTUATORS);	
}