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:
authorBenoit Bolsee <benoit.bolsee@online.be>2009-01-02 20:43:56 +0300
committerBenoit Bolsee <benoit.bolsee@online.be>2009-01-02 20:43:56 +0300
commitcc569504d0468ec19a1018ea804aa418c134cb0f (patch)
tree732f5d6fe3d742f63dae5f6e899aea566ae52b0f /source/gameengine/GameLogic/SCA_ILogicBrick.h
parentabd4934d1aeceafaa2fc242f00db0ba53a7e24db (diff)
BGE API Cleanup: update the python attribute definition framework.
* Value clamping to min/max is now supported as an option for integer, float and string attribute (for string clamping=trim to max length) * Post check function now take PyAttributeDef parameter so that more generic function can be written. * Definition of SCA_ILogicBrick::CheckProperty() function to check that a string attribute contains a valid property name of the parent game object. * Definition of enum attribute vi KX_PYATTRIBUTE_ENUM... macros. Enum are handled just like integer but to be totally paranoid, the sizeof() of the enum member is check at run time to match integer size. * More bricks updated to use the framework.
Diffstat (limited to 'source/gameengine/GameLogic/SCA_ILogicBrick.h')
-rw-r--r--source/gameengine/GameLogic/SCA_ILogicBrick.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/gameengine/GameLogic/SCA_ILogicBrick.h b/source/gameengine/GameLogic/SCA_ILogicBrick.h
index c28711ac0f6..38ec80d4096 100644
--- a/source/gameengine/GameLogic/SCA_ILogicBrick.h
+++ b/source/gameengine/GameLogic/SCA_ILogicBrick.h
@@ -89,6 +89,9 @@ public:
KX_PYMETHOD(SCA_ILogicBrick,SetExecutePriority);
KX_PYMETHOD_NOARGS(SCA_ILogicBrick,GetExecutePriority);
+ // check that attribute is a property
+ static int CheckProperty(void *self, const PyAttributeDef *attrdef);
+
enum KX_BOOL_TYPE {
KX_BOOL_NODEF = 0,
KX_TRUE,