2017-04-11 12 views

답변

1

은 토론 마야 파이썬 그룹의이 같은 전에 일이 있습니다. 여기에 당신이 마야의 장인 브러시의, 특히

from PySide import QtGui, QtCore 

def print_mouse_position(): 

    point = QtGui.QCursor().pos() 
    print "x: %s; y: %s" % (point.x(), point.y()) 

timer = QtCore.QTimer() 
timer.setInterval(1000.0/25) # Print 25 times per second 
timer.timeout.connect(print_mouse_position) 
timer.start() 

#when ever you want to stop it uncomment below line 
#timer.stop() 
+0

고마워, 나는 확실히 그것을 줄 것이다! Maya의 기본 브러시 도구에 대한 피드백을 검색하는 방법이 필요했습니다. 움켜 잡는 방법이 있는지 궁금해했다. \ –

+0

아, 멋지다.하지만 모니터의 2D 공간에서 X와 Y를 반환하기위한 것이다. 3D 세계 공간에서 Maya의 기본 브러시 도구 인 XYZ에 대한 피드백을 검색 할 수있는 방법이 필요했습니다. :) –

+0

이런 경우에는 사용자가 할 수 있습니다. draggerContext http://help.autodesk.com/cloudhelp/2017/CHS/Maya-Tech-Docs/Commands/draggerContext.html 훨씬 쉽습니다. – Achayan