In MAYA 2009, is it possible to capture the cube rotate event?
- by Rahul2047
I need to call a function ( Maya-Python ) based on cube rotationX. For that I have to capture the event, programmatically.
I tried using while loop but It stucks in the loop, Nothing can be done in that time.
I tried theading (python), still same.
Can it be done this or other way? If yes, How?
Maya 2009 in Windows XP
Some failed code references:
import maya.cmds as cmds
while (count < 90):
lock = cmds.getAttr('pCube1.rotateX',lock=False)
print lock
count = count + 1
Here Python wise:
#!/usr/bin/python
import thread
import time
# Define a function for the thread
def cubeRotateX( threadName, delay):
count = 0
while count < 5:
time.sleep(delay)
count += 1
try:
thread.start_new_thread( cubeRotateX, ("Thread-1", 2, ) )
except:
print "Error: unable to start thread"
while 1:
pass