Message 1 of 3
GetUserProp Issues (not relating to L or P)

Not applicable
08-26-2008
09:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, being new here i HAVE searched about this, i have read all the documentation i could find but alas, this still is broken.
Maxscript is not new to me, but using it in max 9 is. What i found is that it executes things on the getUserProp function instead of fetching them or have i misinterpreted.
What i am trying to achieve is the following :
Lets say i have Entity information for a game such as :
EntityVersion = 2.0
This is in the user defined properties tab (and was created by a max 7 tool which is obsolete) so, my understanding of the system and the maxscript function dictates that i can say :
Now, it gets to the undefined code, because using print and debugging ALWAYS returns OK.
When i have no entity information at all (ie, blank user properties) is still returns ok. The docs say that it returns a string so perhaps i am confused. I tried EntityVersion = "2.0" as someone mentioned elsewhere, and i tried a good number of alternative ideas on getting the properties. Including a textstream and using getUserPropBufffer (as this also returns OK.
Any help is appreciated. I am currently working in Max 9.0 (no SP atm, about to install SP2) , so i will post if that works but i doubt it.
Thanks.
FuzzYspo0N
Maxscript is not new to me, but using it in max 9 is. What i found is that it executes things on the getUserProp function instead of fetching them or have i misinterpreted.
What i am trying to achieve is the following :
Lets say i have Entity information for a game such as :
EntityVersion = 2.0
This is in the user defined properties tab (and was created by a max 7 tool which is obsolete) so, my understanding of the system and the maxscript function dictates that i can say :
if selection.count == 1 then
(
ver = getUserProp selection "EntityVersion"
if ver != "undefined" then
(
lblEntityVersion.text = "Entity Version : 1.0"
lblEntityInformation.text = "Old Version (MAX7)"
) -- otherwise its a version 2 entity and can be exported
)
Now, it gets to the undefined code, because using print and debugging ALWAYS returns OK.
When i have no entity information at all (ie, blank user properties) is still returns ok. The docs say that it returns a string so perhaps i am confused. I tried EntityVersion = "2.0" as someone mentioned elsewhere, and i tried a good number of alternative ideas on getting the properties. Including a textstream and using getUserPropBufffer (as this also returns OK.
Any help is appreciated. I am currently working in Max 9.0 (no SP atm, about to install SP2) , so i will post if that works but i doubt it.
Thanks.
FuzzYspo0N