PDA

View Full Version : Subanim type, range, etc?


ivanisavich
07-15-2011, 07:42 PM
In a spinner control on a max rollout, you can define the spinner's range and type (ex, range:[-100,100,0] type:#float)

Is there a way to find out the range/type of a particular subAnim?

For example, take the first spinner in a Turbosmooth modifier: iterations. Its value can be a minimum of 0, and its type is an integer. How can I determine this with maxscript?

denisT
07-15-2011, 08:49 PM
In a spinner control on a max rollout, you can define the spinner's range and type (ex, range:[-100,100,0] type:#float)

Is there a way to find out the range/type of a particular subAnim?

For example, take the first spinner in a Turbosmooth modifier: iterations. Its value can be a minimum of 0, and its type is an integer. How can I determine this with maxscript?

there is no way to get the range of a paramblock parameter (subanim).
there is only one way that I know to get the type of a paramblock parameter - it's to call show properties with output display to the stream, and paste this steam after that to get a property type:

showproperties <turbosmooth> "iterations" to:<stream>
/*
.iterations : integer
*/

ivanisavich
07-15-2011, 10:06 PM
Thanks denis, I'll try that!

ivanisavich
07-16-2011, 02:14 AM
Ok the script you posted works like a charm for getting the value type.

Here's another question: can you get the value of a spinner of a modifier, rather than the value of its controller?

Take "Turbosmooth" for example. By accessing the iterations subanim of the modifier directly, you can set its value to -100. But the modifer panel GUI will show the value as 0 since the spinner's minimum range value is 0.

I was thinking that by creating an instance of a modifier, settings its spinner controllers all to -1000000 and then grabbing the value that the spinners get clamped to, I could thus find the minimum range value of the spinners.

denisT
07-16-2011, 02:47 PM
Here's another question: can you get the value of a spinner of a modifier, rather than the value of its controller?


i don't think so. the max spinner is a combined control of two types (custEdit and SpinnerControl). all range and type limitations are probably are implemented in the code. i don't see any system messages to get these parameters.

ivanisavich
07-16-2011, 06:55 PM
Ok, thanks anyways!

lo
07-17-2011, 07:55 AM
I'm pretty sure it will be easy with UIAccessor.

denisT
07-17-2011, 10:32 AM
I'm pretty sure it will be easy with UIAccessor.
what will be easy? set over-max/min value of parameter - open modifier panel - and check the value of its control? yes. it's not a problem. but the method is... hmm...

lo
07-17-2011, 11:21 AM
but the method is... hmm...

not the least bit elegant :D

MattRennie
10-19-2011, 05:24 PM
I just saw this thread and it looks like the UIAccessor solution is just what I'm after (needing to query minimum and maximum values on spinner custom attributes), but having looked at the maxscript help for the UIAccessor control I'm completely lost!

Does anyone have any examples of it they can show me to help me get my head around how to use it?

denisT
10-20-2011, 03:03 AM
I just saw this thread and it looks like the UIAccessor solution is just what I'm after (needing to query minimum and maximum values on spinner custom attributes), but having looked at the maxscript help for the UIAccessor control I'm completely lost!

Does anyone have any examples of it they can show me to help me get my head around how to use it?

before you get an answer could you tell why do you need it? ... because i hope there is a workaround.

MattRennie
10-20-2011, 09:02 AM
I am writing a data exporter which exports expressions to a custom format so they can be recreated on other assets, but in order to recreate them properly elsewhere I need to know the ranges of any custom attribute spinners.

CGTalk Moderation
10-20-2011, 09:02 AM
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.