stuh505
04-08-2006, 01:53 AM
I have spent several hours very confused over this bug. I have finally realized that it is NOT a bug in my code, but a bug in the Max API functions....this particular bug is resulting in NON-LINEAR evaluation of commands!!
I find this pretty shocking...
Given this particular function, it will sometimes evaluate properly but many times it won't. If the commands are called individually one at a time from the listener they work fine, but when called in a program they do not work. It is not an issue with having the proper object selected or anything like that.
Under the exact same circumstances it can be evaluated multiple times being called from the listener with different results. If you evaluate it on an object and it does not work, evaluate again and it usually does work the second time. Some objects work the first time.
If I put a "convert to poly" command after it, it frequently is converted BEFORE some of the other lines have executed (or finished executing).
I have tried to force it into working by placing sleep commands but they also seem to interrupt the computations non-linearly...if anyone can find a solution to make this work I would be much obliged
"flattenMapNoParams()" is what causes the problem
fn test obj=
(
uvmod = unwrap_uvw()
addModifier obj uvmod
obj.unwrap_uvw.flattenMapNoParams()
obj.unwrap_uvw.pack 0 0.02 true false false
convertToPoly obj
)
I find this pretty shocking...
Given this particular function, it will sometimes evaluate properly but many times it won't. If the commands are called individually one at a time from the listener they work fine, but when called in a program they do not work. It is not an issue with having the proper object selected or anything like that.
Under the exact same circumstances it can be evaluated multiple times being called from the listener with different results. If you evaluate it on an object and it does not work, evaluate again and it usually does work the second time. Some objects work the first time.
If I put a "convert to poly" command after it, it frequently is converted BEFORE some of the other lines have executed (or finished executing).
I have tried to force it into working by placing sleep commands but they also seem to interrupt the computations non-linearly...if anyone can find a solution to make this work I would be much obliged
"flattenMapNoParams()" is what causes the problem
fn test obj=
(
uvmod = unwrap_uvw()
addModifier obj uvmod
obj.unwrap_uvw.flattenMapNoParams()
obj.unwrap_uvw.pack 0 0.02 true false false
convertToPoly obj
)
