BGE: Committing patch [#31442] "API improvements: Group references python api, for better control over groups and instances" by Martin Sell (moerdn). This patch adds a member and a group property to KX_GameObject:

* KX_GameObject.member returns the list of group members if the object is a group object, otherwise None is returned
  * KX_GameObject.group returns the group object that the object belongs to or None if the object is not part of a group
This commit is contained in:
Mitchell Stokes
2012-10-07 00:09:02 +00:00
parent e7db06ad9d
commit 7beff06950
4 changed files with 140 additions and 1 deletions

View File

@@ -986,6 +986,18 @@ Types
The object's parent object. (read-only).
:type: :class:`KX_GameObject` or None
.. attribute:: members
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
Returns the group object that the object belongs to or None if the object is not part of a group.
:type: :class:`KX_GameObject` or None
.. attribute:: visible