Author : jdvi


Reply
Reply
 
Thread Tools Display Modes
sama.van's Avatar
Old (#1)
Here is the problem :

I created a mel script for exporting very lot of objects at the same time.

But I need to edit each Collada file and to replace the content of some line...

Problem is after exported the object I added a function for opening the exported file one more time and edit some lines after parsing of the content...

But...

Sometime the exporter doesn't have time to create the exported file and my script is already trying to edit the file content -__-...


Does someone knows how to freeze the script while one second or more when exporting an object...
or... how to detect the current object have been exported and I can edit it....

I did a research with "delay" "time" "wait" words in the Mel Scirpt documentation, but I didn't found anything for that...
This is strange because 3 years ago on a script I found something like that in the documentation...


I'm on Maya 2009.


Thank a lot for help.....

Last edited by sama.van; 10-05-2009 at 11:22 PM..
Offline , polygon, 659 Posts, Join Date Mar 2007, Location Mie-Tsu (Japan) Send a message via MSN to sama.van  
   Reply With Quote

Lamont's Avatar
Old (#2)
Can you post what you wrote?

Oh and try:
pause -sec NUMBEROFSECONDS;
Lamont G.- Environment Artist - UbiSoft Osaka
CGBYLG.com
Offline , card carrying polycounter, 2,295 Posts, Join Date Dec 2008, Location Japan Send a message via MSN to Lamont  
   Reply With Quote

sama.van's Avatar
Old (#3)
-__- I didn't tried "pause" in the documentation -__- ...

But strange it seems to stop the process...

Maybe I need to do that once all objects are exported and it could delete some conflicts....

raaaaa... not funny >_<
Offline , polygon, 659 Posts, Join Date Mar 2007, Location Mie-Tsu (Japan) Send a message via MSN to sama.van  
   Reply With Quote

Lamont's Avatar
Old (#4)
Depends on how you want to run the process. It may be faster for Maya to export all and after export do the check, not check as you go. Also, if you use some sort of counter, then Maya knows it is done with the export and you do not need a pause ... maybe.
Lamont G.- Environment Artist - UbiSoft Osaka
CGBYLG.com
Offline , card carrying polycounter, 2,295 Posts, Join Date Dec 2008, Location Japan Send a message via MSN to Lamont  
   Reply With Quote

sama.van's Avatar
Old (#5)
oh it's ok... I change some function...

And I finally keep the lsit of the all file exported in the process....
Then I create a last function it's editing all files one by one... but at the end!

Now collada is clean... this is crazy all the informations nobody mather there are in this export -___-...

About the Pause function it's seems to be a real pause of the script. and Maya is "sleeping" a little time...
This is funny, can follow your most crazy scripts with slow speed!
Offline , polygon, 659 Posts, Join Date Mar 2007, Location Mie-Tsu (Japan) Send a message via MSN to sama.van  
   Reply With Quote

Lamont's Avatar
Old (#6)
Quote:
Originally Posted by sama.van View Post
oh it's ok... I change some function...

And I finally keep the lsit of the all file exported in the process....
Then I create a last function it's editing all files one by one... but at the end!
This is how I would have done it. After export, open one by one and perform whatever task. It's easier and saves headaches.
Lamont G.- Environment Artist - UbiSoft Osaka
CGBYLG.com
Offline , card carrying polycounter, 2,295 Posts, Join Date Dec 2008, Location Japan Send a message via MSN to Lamont  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch