View Full Version : Using MaxScript to exceed 100 extrude segments
06-04-2008, 06:06 AM
I'm working on a script that requires a lot of extrude segments, and the limit of 100 isn't enough. However, I've found that MaxScript can set any number of segments, which is great, and suggests the limit is simply placed on the UI. I just want to make sure no one here can think of a reason why this might be screwing something up under the hood. If it's just a UI limit that MaxScript can circumvent, that's fine. But if that limit is expected elsewhere in the program's internals, I'm afraid I might overwrite some memory at some point, cause a memory leak, or whatever.
06-04-2008, 06:33 AM
I wouldn't think so. The limitation is purely because the spinner UI needs an upper limit, and 100 was deemed enough I guess! :D
06-04-2008, 12:38 PM
these limits are almost always arbitrary and set in the UI.
Some limits are set internally - so that changing them via script will (typically) just yield the maximum allowed value.
You won't get any buffer overflows or anything of the sort when going over a particular value.
You *may* run into trouble with values of zero (direct or derived) and values that change signs from the expected.
For example, if internal code performs "1 / value" and the cap is placed in the UI at 0.1, you can certainly change that to 0.01 and you'll be fine. Change it to 0.0 and the code suddenly performs a divide-by-zero if that's not checked against somewhere.
Similarly, you can invert the Spherify modifier's strength by specifying a negative value via script (might be able to do that via the UI, not sure). But there may be code out there that works with complex numbers and goes nuts with a negative value when it expects a positive one .. and vice/versa.
They'd all have one thing in common, though - if they fail, they fail catastrophically and immediately.. so you'll know not to do that :)
06-04-2008, 12:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.