I found that modules are a great way to keep things separated and organized AND working with very little overhead... Did you try this approach?
2015-04-21 4:21 GMT+02:00 Justin Israel <[email protected]>: > Well I don't think NSUV is doing stuff that is all that funky, because in > my vanilla Maya 2015 setup, I simply drop it into the Maya shared "scripts" > directory, and it works straight away. And that is because the "scripts" > directory is *also* added to the PYTHONPATH. > > Did you happen to try the other recommendations, to place even a basic > "hello world" test script in your desired location and confirm that you can > import it? I think we have established that the funky thing here is not > NSUV, but probably your specific configuration. It may be best to step away > from a custom Maya.env and confirm that you are able to import basic python > modules or packages in the default Maya locations. Then you can update the > PYTHONPATH in your Maya.env and try placing stuff in there. If you are > using a custom PYTHONPATH, then I *think* (can't confirm) that you would > have to separate the NSUV directory into the PYTHONPATH location, and the > mel scripts in the maya scripts path location. > > > > > On Tue, Apr 21, 2015 at 1:27 PM Crest Christopher < > [email protected]> wrote: > >> The result is; No NSUV in any of the paths when I run the script. ;-( >> >> Why is it, when I've placed other python scripts or MEL scripts in paths >> that I set in the Maya.env file, those scripts work, but NSUV and >> ngSkinTools which does a really wierd behavior, when I click on the >> ngSkinTools icon in my custom shelf, first, you think the program runs, >> wrong, a loft icon shows up on a new shelf by its self, then I have to >> click the loft icon in the newly created custom shelf, then and only then >> does ngSkinTools runs, strange. >> >> >From the looks of it the setup is wrong, I've read over setting up the >> Maya environment file dozens of times in the documentation that I swear I >> can't read it anymore, it's nearly memorized and yet I'm encountering this >> problem, I don't even want to attempt begining to start with python until >> this is resolved, that and I have projects to finish, anoth er reason why I >> haven't upgraded to 2016 because of this issue, all I ask is to solve it. >> >> Jesse Kretschmer wrote: >> >> >> >> On Mon, Apr 20, 2015 at 5:26 PM, Anthony Tan >> >> <[email protected] <mailto:[email protected]>> wrote: >> >> there's something squiffy about your maya pathing >> >> >> I agree. I think this is just a pathing issue. >> >> @Crest, run this bit of code from maya and tell me if you find NSUV. >> Feel free to paste back the results: >> import os >> import sys >> >> for path in sys.path: >> test_path = os.path.join(path, "NSUV") >> if os.path.exists(test_path): >> print "NSUV found:%s" % test_path >> else: >> >> prin t "No NSUV found at%s" % path >> >> >> >> Note: this code roughly represents what python does under the hood >> when you use "import whateva". The sys.path is just a list of paths to >> search. Components of PYTHONPATH are injected when python is >> >> /first/ initialized. >> >> Cheers, >> Jesse >> >> -- >> 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/bkJcnVhSI0Y/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected] >> <mailto:[email protected]>. >> >> To view this discussion on the web visit >> >> https://groups.google.com/d/msgid/python_inside_maya/CANESWi0tzEaP0ro-j0uEg5icVyuXAbZaaGb2dC_ArE_ENQ0xBA%40mail.gmail.com >> >> <https://groups.goo >> gle.com/d/msgid/python_inside_maya/CANESWi0tzEaP0ro-j0uEg5icVyuXAbZaaGb2dC_ArE_ENQ0xBA%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/5535A765.7030100%40gmail.com >> <https://groups.google.com/d/msgid/python_inside_maya/5535A765.7030100%40gmail.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/CAPGFgA1FjL7J4X6LJGz5C_PQs0G-wUtntFGmUKkz0txz26%3DsVA%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1FjL7J4X6LJGz5C_PQs0G-wUtntFGmUKkz0txz26%3DsVA%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/CAD65uqkG3apf1T1o%2BGtcOpaSPfyDuW0OhJTEscM7pLnNWnb6XQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
