Thanks for your advice, as i'm newbee with python it's nice to help me with that!
2017-07-24 0:08 GMT+02:00 Andres Weber <[email protected]>: > Love how many ways Maya/Pymel includes to solve a problem! It's a bit > more verbose and seems to have some paths it might not go down (did you > find it was actually going to the error catching section?) but if it works > for you, that's great. > > Just a tip, there's a few I could mention but this was the most glaring: > As a general rule you should always specify what errors you're expecting > in the except section so you don't confuse yourself down the line depending > on what input you pass. It tends to be a bad design paradigm! > > On Sunday, July 23, 2017 at 11:43:35 AM UTC-4, gnn wrote: >> >> Thanks a lot Andes for your answer, >> I'd done like that, it's working now :) >> >> unLoaded_ref_files=[] >> refList = pm.ls(type='reference') >> for ref in refList: >> try: >> if ref.isLoaded(): >> print ref >> else: >> refUnloaded="{}".format(ref) >> print "{} IS NOT LOADED".format(ref) >> unLoaded_ref_files.append(refUnloaded) >> except: >> print "FAILED with {}".format(ref) >> >> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "Python Programming for Autodesk Maya" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/python_inside_maya/iNYVImCqRM4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/python_inside_maya/e3b8b156-6a61-43f1-980e- > 4920fb5c9dab%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/e3b8b156-6a61-43f1-980e-4920fb5c9dab%40googlegroups.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/CALv8Lna%3Dyem%3DSPoX%3DvXcLaeCGKasOcVtikmzMTya8RoHFpkuLA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
