PyObject *BL_ArmatureActuator::pyattr_get_object(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef) { BL_ArmatureActuator* actuator = static_cast<BL_ArmatureActuator*>(self); KX_GameObject *target = (attrdef->m_name == "target") ? actuator->m_gametarget : actuator->m_gamesubtarget; if (!target) Py_RETURN_NONE; else return target->GetProxy(); }
PyObject* KX_PythonComponent::pyattr_get_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { KX_PythonComponent *self = static_cast<KX_PythonComponent *>(self_v); KX_GameObject *gameobj = self->GetGameObject(); if (gameobj) { return gameobj->GetProxy(); } else { Py_RETURN_NONE; } }