Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-04-12 18:22:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-04-12 18:22:51 +0400
commit332032fb9925091da49efa2e9c3653bdb3e68cba (patch)
treeb482f26a2fe9fa953fbc501ddf39cb927ac0c2a6 /source/gameengine/Ketsji/KX_Scene.h
parentee24c829b56ebddb47ae2bcfe30db5d857610450 (diff)
BGE Python API
Support for assigning any Type to a KX_GameObject so you can do... gameOb.follow = otherGameOb gameOb[otherGameOb] = distanceTo gameOb["path"] = [(x,y,x), (x,y,x)] del gameOb[mesh] * types that cannot be converted into CValue types are written into the KX_GameObject dict * the KX_GameObject dict is only initialized when needed * Python properties in this dict cannot be accessed by logic bricks * dir(ob) and ob.getPropertyNames() return items from both CValue and Py dictionary properties. Also found that CType was converting python lists to CType Lists but very buggy, would crash after printing the list most times. Use python lists instead since logic bricks dont deal with lists.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.h')
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index b70c6d3e8d3..55e7afa4957 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -603,6 +603,7 @@ public:
ret= PY_SET_ATTR_SUCCESS;
}
else {
+ PyErr_Format(PyExc_AttributeError, "failed assigning value to KX_Scenes internal dictionary");
ret= PY_SET_ATTR_FAIL;
}
}