rename BGE KX_GameObject attrs
authorCampbell Barton <ideasman42@gmail.com>
Tue, 9 Oct 2012 06:03:57 +0000 (06:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 9 Oct 2012 06:03:57 +0000 (06:03 +0000)
* group -> group_parent
* members -> group_children

so its more clear what direction the relationship is.

doc/python_api/rst/bge.types.rst
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h

index e628db07e8335c4d18b41c495ebe0f75d32d2454..a173137e50c5a41da70c6bb427c85a7bb7668c32 100644 (file)
@@ -989,13 +989,13 @@ Types
 
       :type: :class:`KX_GameObject` or None
          
-   .. attribute:: members
+   .. attribute:: group_children
 
       Returns the list of group members if the object is a group object, otherwise None is returned.
 
       :type: :class:`CListValue` of :class:`KX_GameObject` or None
 
-   .. attribute:: group
+   .. attribute:: group_parent
 
       Returns the group object that the object belongs to or None if the object is not part of a group.
 
index a8f3c54508ce0b121580a37ebf6e4bac4fdf6064..3cfb670d227fafd31708f88e25de4835f7fd67e3 100644 (file)
@@ -1681,8 +1681,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("members",   KX_GameObject, pyattr_get_instance_objects),
-       KX_PYATTRIBUTE_RO_FUNCTION("group",             KX_GameObject, pyattr_get_dupli_group_object),
+       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("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),
@@ -1979,7 +1979,7 @@ PyObject *KX_GameObject::pyattr_get_parent(void *self_v, const KX_PYATTRIBUTE_DE
        Py_RETURN_NONE;
 }
 
-PyObject *KX_GameObject::pyattr_get_instance_objects(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
+PyObject *KX_GameObject::pyattr_get_group_children(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
 {
        KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
        CListValue* instances = self->GetInstanceObjects();
@@ -2000,7 +2000,7 @@ PyObject* KX_GameObject::pyattr_get_scene(void *self_v, const KX_PYATTRIBUTE_DEF
        Py_RETURN_NONE;
 }
 
-PyObject *KX_GameObject::pyattr_get_dupli_group_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
+PyObject *KX_GameObject::pyattr_get_group_parent(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef)
 {
        KX_GameObject* self= static_cast<KX_GameObject*>(self_v);
        KX_GameObject* pivot = self->GetDupliGroupObject();
index 4fa3472ba103d100810ec46979896b9211a11f8a..621dd988e008eab1beb891864a9d680678a58b0c 100644 (file)
@@ -978,8 +978,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_dupli_group_object(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);
-       static PyObject*        pyattr_get_instance_objects(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_scene(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
 
        static PyObject*        pyattr_get_life(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef);