Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
Script run from button slowdown

Script run from button slowdown

2003-11-26       - By Andy Walker

 Back
Reply:     1     2     3  

I'm running a mel script executed by a button.  The script bakes a
polygon mesh every frame.  Without thte GUI, the script takes 5 seconds
a frame.  With the GUI it takes 30 seconds.  Same script, just with a
button instead of command line execution..  very odd.

Has anyone else had this trouble?  The GUI script is below.  This is the
specific command:


button     -label Ok
               -c     (
               "bakePoly " + "`intFieldGrp -query -value1 start`" + " "
+ "`intFieldGrp -query -value1 end`" + " " +                            
               "`optionMenuGrp -q -v rig`" + ";\n" +
               "deleteUI -window bakePolyGUI;\n"
                )
ok;

Cheers,

Andy.


===============================

//Andy Walker. 19/11/03. GUI for bakePoly.

global proc int bakeChainPolyGUI()
{

   source bakeChainPoly;

   if (`window -exists bakePolyGUI`) deleteUI bakePolyGUI;
       
       int $bakeStart;
       int $bakeEnd;
       string $rig = "anim";
       
       window    -iconName "bakePolyGUI"
           -title "bakePoly GUI"
           -widthHeight 100 100
           bakePolyGUI;
   
           formLayout humdrum;
               intFieldGrp -numberOfFields 1 -label Start -cw 1 40 start;
               intFieldGrp -numberOfFields 1 -label End -cw 1 40 end;
               optionMenuGrp     -cw 1 40
                       -label Rig
                       rig;
                   menuItem -label "anim";
                   menuItem -label "anim62";
                   menuItem -label "anim73";
                   menuItem -label "muscle";

               button     -label Ok
                   -c     (
                           "bakePoly " + "`intFieldGrp -query -value1
start`" + " " + "`intFieldGrp -query -value1 end`" + " " +
"`optionMenuGrp -q -v rig`" + ";\n" +
                           "deleteUI -window bakePolyGUI;\n"
                       )
                   ok;

               button -label Cancel -command "deleteUI -window
bakePolyGUI" cancel;

           formLayout -edit
               -attachForm start "top" 5
               -attachPosition start "left" 0 5
               
               -attachOppositeControl end "top" 25 start
               -attachPosition end "left" 0 5

               -attachOppositeControl rig "top" 25 end
               -attachPosition rig "left" 0 5
               
               -attachOppositeControl ok "top" 40 rig
               -attachPosition ok "left" 0 5
               
               -attachOppositeControl cancel "top" 40 rig
               -attachOppositeControl cancel "left" 25 ok
           humdrum;
           
       showWindow bakePolyGUI;
       
     return 0;
}



-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
List-help: <mailto:listar@(protected)?Subject=help>
List-unsubscribe: <http://www.highend3d.com/maya/listserver/>
List-subscribe: <http://www.highend3d.com/maya/listserver/>
List-archive: <http://www.highend3d.com/maya/archive/>