maya. is there a way to activate a script job by change of viewport?

there is a event called ‘ActiveViewChanged’, but it doesn’t work. i would know a alternative method to launch a action just by switching viewport in maya. example:

import maya.cmds as cmds 
def clix():
    print "you have clicked on another view" 
cmds.scriptJob (event=["ActiveViewChanged","clix()"])

Leave a Reply

Your email address will not be published. Required fields are marked *