View Single Post
# 2 22-03-2004 , 01:53 AM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
You need to wrap your loop in a procedure and then call that procedure from the button in your UI. The procedure would be something like this:

Code:
global proc myShaveWriteProcedure()
{
   insert loop here...;
}
The button would then get an extra flag:

Code:
button -c "myShaveWriteProcedure";
The window script will also need to be put into a procedure:

Code:
global proc myShaveWindow()
{
   window stuff here...'
}
Save all this in a called myShaveWindow.mel and then you can run "myShaveWindow" from within Maya to bring up the window.


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job