I've posted this problem a month ago but no solution was found. So i ask this question again :
i'm working under blender 2.25 and i use python, but i can't access the value of my object's property (define in Real time button).
I've tried many python script but no solution. I think it should start like this:
ow = GameLogic.getCurrentController().getOwner()
print ow.pousse ("pousse" is the name of the property)
but it doesn't work.
Please help me 'cause i really need to solve my problem.
thanks a lot.
do you get an attribute error? maybe the property name does not match (but i do not think so). first, use a to find out if your object really has this property. second use
if hasattr(ow, "pousse"):
because it could be that the object is not 'prepared'.
you should also keep in mind that property names are case sensitive.
hope that helps
thanx for your help. I've tried you suggestion with my camera which has a property (created in the real times button) called "perso". I wrota that :
from Blender import *
ow = Object.Get("Camera")
if hasattr(ow, "perso"):
but the property wasn"t found . So that is not the solution to get a property. Probably i have to change the second line of my code. But how can I get my object in python in order to access his properties ???