Validate value of property
Hello everyone.
My task is to find out valid integer range of some property. For example some material has an integer property and I need to know which values are valid for this property. The problem is that if I set invalid value (for example valid range is 0-2 and I set it to 3) then 3dsMax can even crash.
One man told me that I can get ParamBlockDesc2 from paramblock, with GetDesc(), then call GetParamDef, and it has max/min values. But it's for C++.
Can this be achieved in maxscript anyway?
Comments
.
Sure. Google ParamDef Struct Reference (in c++ sdk reference) for more info on param checking
One more question. How to get
One more question.
How to get classof ParamDef value? I need to know is it float or integer because then I need to get "paramDef.rangeLow.F" or "paramDef.rangeLow.I".
I know how to get class of maxscript value, but not dotnet value.
.
Do you know a way to determine if a paramdef is of spinner type? I tried without any luck.
Here's the SpinType enum.
You can simply use paramdef.SpinType == paramdef.SpinType.float to determine the type
Thx again :)
Thx again :)
Thanks a lot
Thanks a lot