Notifications
Clear all

[Closed] ColorPicker Controller

How do i assign an animation controller to a colorpicker?

trying
[rollout].[colorpicker].controller
[rollout].[colorpicker].color.controller
[rollout].[colorpicker].color.r.controller

all get undefined

I’ve tried animating a colorpicker in a rollout, but it appears it doesnt work. But if i try applying animation, by using ‘auto key’ to a color picker inside a material’s custom attribute, that does work. But there again, i cant see what controller is assigned to it.

Has anyone tried this, or is there another way i have to about this?

Thanks

6 Replies
 lo1

It works in a custom attribute because what gets animated is not the value of the colorpicker, but the underlying parameter which the colorpicker is linked to.

So is the only option to build it with custom attributes? As I don’t believe i can do a “get” command on the ColorPicker inside a rollout?

Does it actually work in the Material because of the custom attribute, or is it because the Material is an actual Max Object and therefore can have controllers? Where does your rollout exist? How have you created it and the controls inside it?

-Eric

I’m not why it works on the material. It makes sense what lo said in that the data is tied to a controller already when its on a custom attributes. It just seems silly that for a rollout, max would connect you directly to the data.

I'm just doing a  simple 

    (
 global exampleRoll
 try(destroyDialog exampleRoll )catch()
 rollout exampleRoll "" width:122 height:85
 (
 	colorPicker cp_1 "" pos:[12,18] width:46 height:48
 )
 CreateDialog exampleRoll
 
 print exampleRoll.cp_1.controller
 --print exampleRoll.cp_1.color.controller
 )
    

Only Max Objects can have controllers. Dialogs aren’t Max Objects they are User Interface objects. There is no way that I know of to link a controller directly to it.

In other words have you ever seen a maxscript dialog exposed in trackview? Nope. You can see links to objects related to dialogs, but not the dialogs or controls. If you exposed it on an object or in an attribute holder it would probably work because it is exposed on a Max Object.

-Eric

Well that sucks…since it will be tied to a simulation, i guess i could attempt my own draw call, and just manipulate the data in a while loop. This should be fun.

 Unless someone knows how to get
[i]
     when[/i] <attribute> <objects> [i]change[/i][s] [ [i]id[/i]:<name> ]
     \  [[i]handleAt[/i]: [i]#redrawViews[/i]|[i]#timeChange[/i]] \  [ <object_parameter> ] [i]do[/i] <expr>
     
 to work for when a material's parameter changes.  
 
 
 I tried

     when parameters newMat changes HandleAt:#timeChange id:#matPropChange prop do
     (
     	print prop
     )
     

But couldnt get it to work. That might allow me a work around