forked from bartvdbraak/blender
BGE: Renaming KX_GameObject.group_parent and group_children to groupObject and groupMembers to be a bit more descriptive and match the rest of the BGE Py API. KX_MeshProxy.transform_uv has also been renamed to transformUV. It would be nice to switch to PEP8 names for the BGE Python API, but for now, consistency is better.
This commit is contained in:
parent
a7bee65d38
commit
590dbb87e7
@ -1693,8 +1693,8 @@ PyMethodDef KX_GameObject::Methods[] = {
|
||||
PyAttributeDef KX_GameObject::Attributes[] = {
|
||||
KX_PYATTRIBUTE_RO_FUNCTION("name", KX_GameObject, pyattr_get_name),
|
||||
KX_PYATTRIBUTE_RO_FUNCTION("parent", KX_GameObject, pyattr_get_parent),
|
||||
KX_PYATTRIBUTE_RO_FUNCTION("group_children", KX_GameObject, pyattr_get_group_children),
|
||||
KX_PYATTRIBUTE_RO_FUNCTION("group_parent", KX_GameObject, pyattr_get_group_parent),
|
||||
KX_PYATTRIBUTE_RO_FUNCTION("groupMembers", KX_GameObject, pyattr_get_group_members),
|
||||
KX_PYATTRIBUTE_RO_FUNCTION("groupObject", KX_GameObject, pyattr_get_group_object),
|
||||
KX_PYATTRIBUTE_RO_FUNCTION("scene", KX_GameObject, pyattr_get_scene),
|
||||
KX_PYATTRIBUTE_RO_FUNCTION("life", KX_GameObject, pyattr_get_life),
|
||||
KX_PYATTRIBUTE_RW_FUNCTION("mass", KX_GameObject, pyattr_get_mass, pyattr_set_mass),
|
||||
@ -1991,7 +1991,7 @@ PyObject *KX_GameObject::pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DE
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *KX_GameObject::pyattr_get_group_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
|
||||
PyObject *KX_GameObject::pyattr_get_group_members(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
|
||||
{
|
||||
KX_GameObject* self = static_cast<KX_GameObject*>(self_v);
|
||||
CListValue* instances = self->GetInstanceObjects();
|
||||
@ -2012,7 +2012,7 @@ PyObject* KX_GameObject::pyattr_get_scene(void *self_v, const KX_PYATTRIBUTE_DEF
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
PyObject *KX_GameObject::pyattr_get_group_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
|
||||
PyObject *KX_GameObject::pyattr_get_group_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
|
||||
{
|
||||
KX_GameObject* self = static_cast<KX_GameObject*>(self_v);
|
||||
KX_GameObject* pivot = self->GetDupliGroupObject();
|
||||
|
@ -989,8 +989,8 @@ public:
|
||||
static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
||||
static PyObject* pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
||||
|
||||
static PyObject* pyattr_get_group_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
||||
static PyObject* pyattr_get_group_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
||||
static PyObject* pyattr_get_group_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
||||
static PyObject* pyattr_get_group_members(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
||||
static PyObject* pyattr_get_scene(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
||||
|
||||
static PyObject* pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
|
||||
|
@ -76,7 +76,7 @@ PyMethodDef KX_MeshProxy::Methods[] = {
|
||||
{"getVertex", (PyCFunction)KX_MeshProxy::sPyGetVertex,METH_VARARGS},
|
||||
{"getPolygon", (PyCFunction)KX_MeshProxy::sPyGetPolygon,METH_VARARGS},
|
||||
{"transform", (PyCFunction)KX_MeshProxy::sPyTransform,METH_VARARGS},
|
||||
{"transform_uv", (PyCFunction)KX_MeshProxy::sPyTransformUV,METH_VARARGS},
|
||||
{"transformUV", (PyCFunction)KX_MeshProxy::sPyTransformUV,METH_VARARGS},
|
||||
//{"getIndexArrayLength", (PyCFunction)KX_MeshProxy::sPyGetIndexArrayLength,METH_VARARGS},
|
||||
{NULL,NULL} //Sentinel
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user