[Closed] UserProperties on rootNode
Using set/get UserProp or UserPropBuffer on the rootNode or $<root> via script generates:
No ““setUserProp”” function for $<root>
No ““getUserProp”” function for $<root>
No ““setUserPropBuffer”” function for $<root>
No ““getUserPropBuffer”” function for $<root>
Anyone have a way to handle this?
According to the help it says that you can’t preform other node operation on it other then checking the .children property.
Thanks PEN, I’ve read the help. Help also says that you can not assign a spine to a bevel profile mod, but I have a way around that.
Just wondering if anyone has figured out how to get to this data, sdk can assign and read user prop data on the rootNode.
Yeah, that’s right. You can assign user properties to the rootNode using the SDK functions.
I’ve created a set of functions (an extension) for that, although it’s not as flexible as MAXScript functions. For example, as in the SDK, with these functions you can only assign strings, integers, floats and booleans data types.
Here is the function set:
[ul]
[li]<String|undefined> getUserPropertyString <node|rootNode> <key_string>
[/li][li]<Integer|undefined> getUserPropertyInt <node|rootNode> <key_string>
[/li][li]<Float|undefined> getUserPropertyFloat <node|rootNode> <key_string>
[/li][li]<Bool|undefined> getUserPropertyBool <node|rootNode> <key_string>
[/li][li]<ok> setUserProperty <node|rootNode> <key_string> <value: String|Integer|Float|Bool>
[/li][li]<String> getUserPropertyBuffer <node|rootNode>
[/li][li]<ok> setUserPropertyBuffer <node|rootNode> <String>
[/li][li]<Bool> userPropertyExists <node|rootNode> <key_string>
[/li][/ul]
Anyway you could set time values (or other unsupported values) using the setUserPropertyBuffer function.
I’ve included the source code file along with the compiled plugin.
By the way, the function deleteVisibilityTrack is still there plus some other functions. Hmmm…I should document the extension!
Hope that Helps.
Thanks Jonathan, this works wonderfully. Also thanks for the source, one day it may stick and I’ll find myself being able to exspose these kinds of things.
Does it work on Max 9?
I don’t want to invest time in using this, if I’m going to lose this functionality in a few months…
Thanks
Keith Morrison
Hi.
I don’t own a copy of MAX9 yet so I can’t recompile the extension. I’ll see if a friend of mine can do it for me, if not we’ll have to wait a bit more.
Thanks.