Skip to main content
gamedev.net
🔒 Locked

getProperty() for Blender python script [solved]

Started by V-man Jul 13, 2008 at 9:48 PM 0 replies 4.8k views
Original Post
V-man
V-man
I have to say the documentation is terrible. http://www.blender.org/documentation/246PythonDoc/Object.Object-class.html Look at getProperty(name) Return a game property from this object matching the name argument. Parameters: * name (string) - the name of the property to get. Returns: Property object The first property that matches name. I created in integer property called clo and when I call clo=object.getProperty("clo"); clo is not an integer. I don't know what the heck it is. The documentation just calls it "property". ====================== This is not related to the above. I also tried object.getMatrix() It returns something but again. I guess a "4x4 matrix". It turns out this 4x4 matrix doesn't contain translation at all? I used vertexOffset=object.getLocation(); to get the translation components. [Edited by - V-man on July 14, 2008 8:19:24 AM]
V-man
V-man
Well, I solved the properties issue. I had to do
clo=object.getProperty("clo");
integer=clo.getData();

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.