Hello! This is my first post on polycount and I hope I post this thread in the right place. I wrote a script yesterday which makes it possible to batch bake normal maps in Maya. A few artists at The Game Assembly, where I study, got frustrated having to bake all their maps manually when working with complex models such as…
you can remove the error after hitting cancel on the cmds.fileDialog2(), if you just setup a if Statemeant to make sure the output of it, is not None type. it returns None if the user cancels, or a list of file paths if save is hit. a other option is to just let it error and use exception handling, to pass the TypeError.
Yes thank you! I tried the if statement you mentioned but "if not filePath == NoneType:" wouldn't work. Perhaps I was doing it wrong. The try, except is a good idea, though. I use that quite often.