Sure, that makes sense. We’ll do another type of digging to get to the
bottom of this.
​

   1. If you run:

   print pubUI

   It will tell you the location of that module. You could then head inside
   and look for def importScene(). Once inside, you might be able to tell
   what it’s doing and what it is returning.
   2. Or, if for some reason you can’t open the file externally, you can
   print the source of the function directly.

   import inspectprint inspect.get_source(pubUi.importScene)

   That will output the contents of that function into the script editor.

Just so I’m fully understanding what is happening and what you want to do,
you want to:

   1. Run importScene() which will prompt you for a scene to open, in a
   window that blocks Maya until finished. Similar to the File|Open window.
   2. When this window is closed, you want to run another function. Let’s
   stick to your first example, in which the other function prints “window
   from importScene() is closed”

If the importScene() command truly blocks Maya (this is called a “modal”),
then you can simply do this.

pubUi.importScene()
myOtherFunction()

And myOtherFunction() will run right after the UI has closed (i.e. returned
control to Maya).

If it isn’t blocking, then we’ll need to do something like what Justin and
AK Eric suggested above, but before we do we’ll need to know what the
window is (Maya or PySide) and what it is called.
​

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBCxrcphe69Zfi%3DbEbji82dy2yN%2BbXALS6CFnud5mvkCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to