Setting up an attribute slider

Hi people!

I want to set up a slider to change an attribute in a custom node that i have connected to some transform nodes. My problem lies in that I dont know how to make the slider update it's value (or dim if there is no node connected) every time I change the selection.

Click node1 - slider goes to 40
Click node2 - slider goes to 20
Click node3 - slider dims
and so on...

I'd rather not have to setup a script job. Does anyone know another way?

Thanks guys! Cheers!

There's no way for the slider to know the selection has changed without a using a scriptJob.
Don't be scared, scriptJobs aren't that nasty =)

Oh yeah? I have purpously avoided using them since I have heard that they are hell on earth and can easily get out of hand. But I haven't used them at all... so I guess I will have to give it a go then.

Thanks!

They arent hell on earth they are hell on earth because people insist on using them in totaly superfluous places! I mean some people just cant figure any oother way to do anything.

Run them indefinetly on bad hooks (such as cheking for something scriptjob cant catch so they catch everything instead!).

uuumm, script jobs are great... they work perfectly. you've just gotta remember to make scripts that know how to clean up after themselves.

if you just want a script job to update a UI, just parent the scriptjob to the UI... works perfectly. alias use them all over the maya interface, and countless other scripters have used them for updating their UIs too.

sure, they can create propblems if u go creating them for stupid reasons as joojaa said, but... if u apply even just a little bit of intelligence its pretty hard to bollocks up...

Yes yes mee too... but i dont advise them for people with little or no understanding of how maya works!

If you are sure you know how the push and pull works, and how espressions and how to setup coplext links... then its okay! As long as you taek extra care to do it in a roboust (such as chek for conflicta and make them cleaning, test thorogly and dont hook it up so it cheks forvere all sorts of things!)