Notifications
Clear all

[Closed] Subanim type, range, etc?

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?

11 Replies
  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 [b]show[/b] 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
   */
      

Thanks denis, I’ll try that!

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.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

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.

Ok, thanks anyways!

 lo1

I’m pretty sure it will be easy with UIAccessor.

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

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…

 lo1

not the least bit elegant

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?

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

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

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.