How to get from Maya event of a change highlight objects in the scene?

后端 未结 3 1492
北荒
北荒 2021-01-17 02:39

I\'m using: Maya2014 + pyqt4.8 + python2.7

I\'m doing an application which allows you to speed up and simplify the selection of items in Maya. Is a selector which th

3条回答
  •  不要未来只要你来
    2021-01-17 03:05

    until I found just such a solution based on maya api:

    self.sJob = cmds.scriptJob(event=['SelectionChanged', self.myFnc])
    

    This mechanism creates Maya event that calls my function when there is a change object selection.

    Perhaps there is a more correct option. For example to get identifokator window maya and it make your event. Although I think that the use of maya api also not a bad option. The only downside is that you have to follow and remove scriptJob when closing a window, but it's a solvable problem.

提交回复
热议问题