cw: Thanks, that's cleaner. I actually needed to do some different things than set a basic property in my real function, but your reply set me down the path to a cleaner solution. Strangely, 'hasProperty' will return false if you're querying about a custom attribute. 'isProperty', however, will work just fine. I ran into…
O I see what he was trying to do....now I look like an idiot :( Sounds like a nifty script... just confused as to why you have to use the execute command within the function
I can't seem to figure out how to write this. I want a function to be able to modify a property. fn myFunc n attribute value = (n.attribute = value)myFunc $ height 50 It will tell me that my object n doesn't have a property called 'attribute'. What's the syntax for this?
haiddasalami: You have to use "execute" because you're assembling a command as a string. You have to pass the variables to the function as strings because you can't just access the node properties for any generic attribute (since height on its own is just a variable name, not a property of an object).