Talk:User Properties

From K-3D

Jump to: navigation, search

How does one refer to a user property from within a scripted node that has had such a property added to it.


If I have a Int32SourceScript with a user property called s that is a k3d::double_t how do I refer to that scalar while converting it to an k3d::int32_t

You can access any property (including user properties) by name, so "node.s" to get the value of the "s" property. You can convert it using the normal builtin Python casting operators. Tshead 03:30, 9 October 2009 (UTC)

Is that Node.s or node.s ?

Depends on context. I meant "node" as in "whatever you happen to call your node" ... from within a scripted node, you're right that it's "Node". Tshead 01:56, 10 October 2009 (UTC)