PDA

View Full Version : Keeping something highlighten in a textScrollList


DeadlyNightshade
11-21-2012, 11:42 PM
I have a textScrollList for displaying all UV-sets on a mesh (similiar in structure as the default one in the UV Set Editor -window).

One problem with it is that it doesn't keep the active UV set highlighted: if the user selects some other UV, face or edge - or switches selection type - it loses it's highlighting.

I assume one could add something for this via a scriptJob - but there doesn't seem to be any flag or anything for just highlighting an item in a textScrollbar.

NaughtyNathan
11-22-2012, 11:09 AM
sure there is:
textScrollList -edit -selectItem "map1" myTextScrollList;
you simply need to create a scriptJob that fires off on SelectionChanged event, and the function it calls then checks the relevent UV set and highlights the appropriate one in your TextScrollList (or repopulates the entire list, which it probably should be doing anyway)

don't forget to always parent your scriptJobs to the UI that creates them (if any) so they don't hang around after the user has finished with and closed your tool.

DeadlyNightshade
11-22-2012, 11:12 AM
Alright great.
Thanks again Nathan. You are a walking MEL-library of knowledge.

Yea I got all my scriptJobs parented to my UI stuff already. :)

CGTalk Moderation
11-22-2012, 11:12 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.