Is your company's proprietary module documented in any way? Are there any nice public bits available on this returned UI class? I feel like we are just trying to help you did into generic introspection techniques, when you probably have more info at your fingertips than we do. I can appreciate that you can't share your companies code here, but there has got to be a way for you to review the code you are using to see what is exposed on this class your company has you using.
Does importScene() block when you call it? Does it return immediately, and if so, what does it return? If the call does indeed block, then it is giving you no opportunity to hook in and get a reference to its UI, before it does its task and ends. In which case, Marcus is right that you would just do whatever you want after the call returns. Without seeing this code, we will most likely just be lobbing suggestions of how to introspect Maya's lists of UI objects. On Tue, 3 Feb 2015 8:42 PM Marcus Ottosson <[email protected]> wrote: > 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 > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBCxrcphe69Zfi%3DbEbji82dy2yN%2BbXALS6CFnud5mvkCg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAPGFgA2ZJFhhPsOcwWKMdNSbRHDptVA0Vwbg77pRxJX6m3nDpQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
