Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Timer in Maya to run a function every x seconds?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
j.victor.ferreira
625 Views, 2 Replies

Timer in Maya to run a function every x seconds?

Hi there!

Sorry for the basic question. I am trying to find a way to run a function every x seconds, Iv tried to find a MTimer or QTimer way to do but didnt have success.

I wanted to run the function when open a simple cmds.window() and stop the function when closes this window.

Somebody knows how to do that?

thanks in advance!

2 REPLIES 2
Message 2 of 3
Kahylan
in reply to: j.victor.ferreira

Hi!

 

Since you are working in Python, you could just use the threading library to keep track of time.

 

https://docs.python.org/3/library/threading.html#timer-objects

 

I hope it helps!

Message 3 of 3
j.victor.ferreira
in reply to: Kahylan

thanksss!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report