loop command and work maya?

28 views
Skip to first unread message

maya2000

unread,
Nov 18, 2014, 12:04:06 PM11/18/14
to python_in...@googlegroups.com
hi...
how run this command(example):
for i in range(1,100):
    mc.polyCube(n=i)
and when running it,... maya dont stop...and maya work,real....

maya2000

unread,
Nov 18, 2014, 1:07:25 PM11/18/14
to python_in...@googlegroups.com
example program..;
imprt time
for i in range(1,100): 
    rime.sleep(0.2)
    mc.polyCube(n=i) 

Marcus Ottosson

unread,
Nov 18, 2014, 1:10:12 PM11/18/14
to python_in...@googlegroups.com
Put yourself in our shoes. How would you respond to this question? :) 

I can't see a problem in any of your examples, and I don't know what you mean by "maya dont stop" or "maya work, real".

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ddeac828-2d9b-4f2c-a553-1c91aced2035%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

maya2000

unread,
Nov 18, 2014, 1:45:30 PM11/18/14
to python_in...@googlegroups.com

excuse me...
when run this script:
import time
for i in range(1,50):
    time.sleep(0.2)
    mc.polyCube(n='c'+str(i)) 
or example,this script:
import time
for i in range(1,50):
    time.sleep(0.2)
    print "test"
maya ten secend,stop and dont work....
i want,when my (example)program running,maya dont stop and it work...!!
sorry...my english is not good!

Justin Israel

unread,
Nov 18, 2014, 3:27:41 PM11/18/14
to python_in...@googlegroups.com
Hi,

The sleep is not going to help you here because ultimately you are just blocking Maya the whole time until your loop is done. I suppose what you are looking for is to call refresh() at intervals in your loop


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages