diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2009-11-22 03:01:52 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2009-11-22 03:01:52 +0300 |
commit | 573be3e687c9db985b1cfdb670e038370ba30628 (patch) | |
tree | 32051d76352b6b737b155b312c97e66b5d1d6761 /source/gameengine/PyDoc | |
parent | 1dfbf3a9f6d435fab163d0badf7ea6df17d8e2e0 (diff) |
BGE: Removing OB prefix from object names - This will break scripts !!!! (also removing AC and ME :: internal changes only)
How it works now:
whenever you have to read/write object names you can do it without the prefix "OB". (it's not hard at all to fix scripts)
How it was before:
It was a mess :)
We had an inconsistent API where sometimes you had to input "OBname" and other "name" directly to assign object as data (usually in actuators).
Justification for the change:
Talking with Campbell we had since a while ago this feeling that this should be changed any time we were going to deprecate the API. So in order to deliver Blender 2.5beta0 with a more close-to-the-final API we decided that today was a good day to implement that.
Remaining issues:
1) VideoTexture uses IM or MA to identify the output material/texture. I haven't touched that, but it does look a bit off. (i.e. I didn't changed any MA, IM naming)
2) I didn't see the code of dynamic mesh. It may need to be edited as well.
Diffstat (limited to 'source/gameengine/PyDoc')
-rw-r--r-- | source/gameengine/PyDoc/GameTypes.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/gameengine/PyDoc/GameTypes.py b/source/gameengine/PyDoc/GameTypes.py index 60511f41c2b..0e4001fa669 100644 --- a/source/gameengine/PyDoc/GameTypes.py +++ b/source/gameengine/PyDoc/GameTypes.py @@ -991,7 +991,7 @@ class CListValue(CPropValue): C{val= clist[i]} CListValue supports string lookups. - C{val= scene.objects["OBCube"]} + C{val= scene.objects["Cube"]} Other operations such as C{len(clist), list(clist), clist[0:10]} are also supported. """ @@ -1504,7 +1504,6 @@ class KX_GameObject(SCA_IObject): - note: Calling ANY method or attribute on an object that has been removed from a scene will raise a SystemError, if an object may have been removed since last accessing it use the L{invalid} attribute to check. @ivar name: The object's name. (read-only) - - note: Currently (Blender 2.49) the prefix "OB" is added to all objects name. This may change in blender 2.5. @type name: string. @ivar mass: The object's mass - note: The object must have a physics controller for the mass to be applied, otherwise the mass value will be returned as 0.0 @@ -3543,7 +3542,7 @@ class KX_SCA_AddObjectActuator(SCA_IActuator): This will genereate a warning in the console: - C{ERROR: GameObject I{OBName} has a AddObjectActuator I{ActuatorName} without object (in 'nonactive' layer)} + C{ERROR: GameObject I{Name} has a AddObjectActuator I{ActuatorName} without object (in 'nonactive' layer)} """ #{Deprecated def setObject(object): @@ -3729,7 +3728,7 @@ class KX_SCA_ReplaceMeshActuator(SCA_IActuator): This will generate a warning in the console: - C{ERROR: GameObject I{OBName} ReplaceMeshActuator I{ActuatorName} without object} + C{ERROR: GameObject I{Name} ReplaceMeshActuator I{ActuatorName} without object} @ivar mesh: L{KX_MeshProxy} or the name of the mesh that will replace the current one Set to None to disable actuator @@ -3782,7 +3781,7 @@ class KX_Scene(PyObjectPlus): print obj.name # get an object named 'Cube' - obj = scene.objects["OBCube"] + obj = scene.objects["Cube"] # get the first object in the scene. obj = scene.objects[0] @@ -3874,7 +3873,7 @@ class KX_SceneActuator(SCA_IActuator): This will generate a warning in the console: - C{ERROR: GameObject I{OBName} has a SceneActuator I{ActuatorName} (SetScene) without scene} + C{ERROR: GameObject I{Name} has a SceneActuator I{ActuatorName} (SetScene) without scene} @ivar scene: the name of the scene to change to/overlay/underlay/remove/suspend/resume @type scene: string. @@ -4181,7 +4180,7 @@ class KX_TrackToActuator(SCA_IActuator): This will generate a warning in the console: - C{ERROR: GameObject I{OBName} no object in EditObjectActuator I{ActuatorName}} + C{ERROR: GameObject I{Name} no object in EditObjectActuator I{ActuatorName}} @ivar object: the object this actuator tracks. @type object: KX_GameObject or None |