Home Technical Talk

[Mel Script] Delay issue?

polycounter lvl 14
Offline / Send Message
sama.van polycounter lvl 14
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..... :(

Replies

  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Can you post what you wrote?

    Oh and try:
    pause -sec NUMBEROFSECONDS;
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    -__- 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 >_<
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    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.
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    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!:D
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    sama.van wrote: »
    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. :D
Sign In or Register to comment.