BGE api added place holder docs and CListValue docs.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 7 Apr 2009 17:54:56 +0000 (17:54 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 7 Apr 2009 17:54:56 +0000 (17:54 +0000)
source/gameengine/PyDoc/BL_Shader.py [new file with mode: 0644]
source/gameengine/PyDoc/CListValue.py [new file with mode: 0644]
source/gameengine/PyDoc/KX_BlenderMaterial.py [new file with mode: 0644]
source/gameengine/PyDoc/KX_ConstraintWrapper.py [new file with mode: 0644]
source/gameengine/PyDoc/KX_GameObject.py
source/gameengine/PyDoc/KX_PhysicsObjectWrapper.py [new file with mode: 0644]
source/gameengine/PyDoc/KX_Scene.py
source/gameengine/PyDoc/KX_TouchSensor.py
source/gameengine/PyDoc/KX_VehicleWrapper.py [new file with mode: 0644]
source/gameengine/PyDoc/bge_api_validate_py.txt

diff --git a/source/gameengine/PyDoc/BL_Shader.py b/source/gameengine/PyDoc/BL_Shader.py
new file mode 100644 (file)
index 0000000..182b73d
--- /dev/null
@@ -0,0 +1,228 @@
+class BL_Shader: # (PyObjectPlus)
+       """
+       BL_Shader GLSL shaders.
+       
+       All placeholders have a __ prefix
+       """
+       
+       def __setUniformfv(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+
+       def __delSource(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getFragmentProg(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getVertexProg(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __isValid(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setAttrib(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setNumberOfPasses(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setSampler(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setSource(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniform1f(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniform1i(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniform2f(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniform2i(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniform3f(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniform3i(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniform4f(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniform4i(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniformDef(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniformMatrix3(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniformMatrix4(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setUniformiv(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __validate(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
diff --git a/source/gameengine/PyDoc/CListValue.py b/source/gameengine/PyDoc/CListValue.py
new file mode 100644 (file)
index 0000000..33e7739
--- /dev/null
@@ -0,0 +1,39 @@
+class CListValue: # (PyObjectPlus)
+       """
+       CListValue
+       
+       This is a list like object used in the game engine internally that behaves similar to a python list in most ways.
+       
+       As well as the normal index lookup.
+       C{val= clist[i]}
+       
+       CListValue supports string lookups.
+       C{val= scene.objects["OBCube"]}
+       
+       Other operations such as C{len(clist), list(clist), clist[0:10]} are also supported.
+       """
+       def append(val):
+               """
+               Add an item to the list (like pythons append)
+               
+               Warning: Appending values to the list can cause crashes when the list is used internally by the game engine.
+               """
+
+       def count(val):
+               """
+               Count the number of instances of a value in the list.
+               
+               @rtype: integer
+               @return: number of instances
+               """
+       def index(val):
+               """
+               Return the index of a value in the list.
+               
+               @rtype: integer
+               @return: The index of the value in the list.
+               """
+       def reverse(val):
+               """
+               Reverse the order of the list.
+               """
\ No newline at end of file
diff --git a/source/gameengine/PyDoc/KX_BlenderMaterial.py b/source/gameengine/PyDoc/KX_BlenderMaterial.py
new file mode 100644 (file)
index 0000000..21417db
--- /dev/null
@@ -0,0 +1,38 @@
+class KX_BlenderMaterial: # (PyObjectPlus)
+       """
+       KX_BlenderMaterial
+       
+       All placeholders have a __ prefix
+       """
+       
+       def __getShader(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+
+       def __setBlending(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getMaterialIndex(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
diff --git a/source/gameengine/PyDoc/KX_ConstraintWrapper.py b/source/gameengine/PyDoc/KX_ConstraintWrapper.py
new file mode 100644 (file)
index 0000000..5b34e16
--- /dev/null
@@ -0,0 +1,28 @@
+class KX_ConstraintWrapper: # (PyObjectPlus)
+       """
+       KX_ConstraintWrapper
+       
+       All placeholders have a __ prefix
+       """
+       def __getConstraintId(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+
+       def __testMethod(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+
index 972a15b77658451fcfd0e2e4068fc4a1500a7daf..97f6dab52bfaf83010787cb027adb3e188801bdc 100644 (file)
@@ -328,13 +328,13 @@ class KX_GameObject: # (SCA_IObject)
        def getChildren():
                """
                Return a list of immediate children of this object.
-               @rtype: list
+               @rtype: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
                @return: a list of all this objects children.
                """
        def getChildrenRecursive():
                """
                Return a list of children of this object, including all their childrens children.
-               @rtype: list
+               @rtype: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
                @return: a list of all this objects children recursivly.
                """
        def getMesh(mesh):
diff --git a/source/gameengine/PyDoc/KX_PhysicsObjectWrapper.py b/source/gameengine/PyDoc/KX_PhysicsObjectWrapper.py
new file mode 100644 (file)
index 0000000..2171cf4
--- /dev/null
@@ -0,0 +1,47 @@
+class KX_PhysicsObjectWrapper: # (PyObjectPlus)
+       """
+       KX_PhysicsObjectWrapper
+       
+       All placeholders have a __ prefix
+       """
+       def __setActive(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+
+       def __setAngularVelocity(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setLinearVelocity(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setPosition(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
index a9fd44ffc9af00b868d7bb882169fd31fa313e50..5dcd560ee96862832209a39b1d39695aef46a5d8 100644 (file)
@@ -16,14 +16,14 @@ class KX_Scene:
                scene = GameLogic.getCurrentScene()
                
                # print all the objects in the scene
-               for obj in scene.getObjectList():
-                       print obj.getName()
+               for obj in scene.objects:
+                       print obj.name
                
                # get an object named 'Cube'
-               obj = scene.getObjectList()["OBCube"]
+               obj = scene.objects["OBCube"]
                
                # get the first object in the scene.
-               obj = scene.getObjectList()[0]
+               obj = scene.objects[0]
        
        Example::
                # Get the depth of an object in the camera view.
@@ -40,7 +40,7 @@ class KX_Scene:
        @ivar name: The scene's name
        @type name: string
        @ivar objects: A list of objects in the scene.
-       @type objects: list [L{KX_GameObject}]
+       @type objects: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
        @ivar active_camera: The current active camera
        @type active_camera: L{KX_Camera}
        @ivar suspended: True if the scene is suspended.
index d7277be4c2ae2aa7d47003d1d2c54d51f061ad7a..f4fcbeefc6218717c6c0ba338a5c0e20cd2a59b4 100644 (file)
@@ -17,7 +17,7 @@ class KX_TouchSensor(SCA_ISensor):
        @ivar objectHit: The last collided object. (Read Only)
        @type objectHit: L{KX_GameObject} or None
        @ivar objectHitList: A list of colliding objects. (Read Only)
-       @type objectHitList: list
+       @type objectHitList: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
        """
                
        #--The following methods are deprecated, please use properties instead.
@@ -53,7 +53,7 @@ class KX_TouchSensor(SCA_ISensor):
                
                Only objects that have the requisite material/property are listed.
                
-               @rtype: list [L{KX_GameObject}]
+               @rtype: L{CListValue<CListValue.CListValue>} of L{KX_GameObject<KX_GameObject.KX_GameObject>}
                """
        def getTouchMaterial():
                """
diff --git a/source/gameengine/PyDoc/KX_VehicleWrapper.py b/source/gameengine/PyDoc/KX_VehicleWrapper.py
new file mode 100644 (file)
index 0000000..68240e1
--- /dev/null
@@ -0,0 +1,158 @@
+class KX_VehicleWrapper: # (PyObjectPlus)
+       """
+       KX_VehicleWrapper
+       
+       All placeholders have a __ prefix
+       """
+       
+       def __addWheel(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+
+       def __applyBraking(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __applyEngineForce(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getConstraintId(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getConstraintType(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getNumWheels(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getWheelOrientationQuaternion(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getWheelPosition(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __getWheelRotation(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setRollInfluence(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setSteeringValue(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setSuspensionCompression(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setSuspensionDamping(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setSuspensionStiffness(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
+       def __setTyreFriction(val):
+               """
+               TODO - Description
+               
+               @param val: the starting frame of the animation
+               @type val: float
+               
+               @rtype: integer
+               @return: TODO Description
+               """
index 58dfbadba15a04b7802fdc6cf09c7b5e72e0867b..0920e5d3c7db47d353964a750dc03880d3e7d78f 100644 (file)
@@ -85,7 +85,7 @@ for type_name in sorted(type_members.keys()):
                if PRINT_OK:
                        print "type: %s" % type_name
        except:
-               print "missing: %s - %s" % (type_name, str(members))
+               print "missing: %s - %s" % (type_name, str(sorted(members)))
                continue
        
        reload(mod) # incase were editing it
@@ -93,7 +93,7 @@ for type_name in sorted(type_members.keys()):
        try:
                type_class = getattr(mod, type_name)
        except:
-               print "missing class: %s.%s - %s" % (type_name, type_name, str(members))
+               print "missing class: %s.%s - %s" % (type_name, type_name, str(sorted(members)))
                continue
        
        for member in sorted(members):