ScriptJob when changing active uv-set

Hey guys!

Is there a way to setup a scriptJob for when the active uvSet is changed? Or some other way to call a proc when the user selects a different uv-set?

cheers!

sure. You write some proc that says:

global proc UVsetPicked
{
if(selection = "mySetsName")
run "myProc"
}

myProc is another procedure that does whatever it is you want to do.

The scriptjob would then be:

scriptJob -kws -e "SelectionChanged" UVsetPicked;

Note that this means that the scriptjob will run whenever you pick ANYTHING, but it should be really quick, and not impact anything. I've used something similar for years and not seen any performance hit

Hey Warpcat...

Did you have success using the "SelectionChanged" event when switching UV sets? I couldn't get it to trigger. Don't know if I was doing something wrong or not?

Thanks!

Shawn

well, I didn't actually try the code with UV sets, just basing it on an example I use (when picking objects in the scene). However, I realize that it won't execute when changing UV sets. The code will execute if you physically select the UV set node though. I think I misinterpreted the original post. D'oh!