Adverti horiz upsell

FBX Split Exporter 1.0.0 for Maya (maya script)

Manage animations from Maya to your game engine easily

License
Button download
420 Downloads

Compatibility

  • 2015, 2014, 2013

Operating Systems

  • Linux
  • Mac
  • Windows

History

Created:08/10/2014
Last Modified:10/10/2014
File Size: 86.7 KB

Q/A

installation problem

Date:09/10/2014
Submitted by: numnah numnah

Hi,

I'd love to check your script, it seems very useful. But I hardly understand what you talk about in your installation instructions. I tried to follow this but in the end I got this error: "No module named python.dev.rigTools.stk_naAnimTools"

More noobs friendly instructions would be appreciated :/

Replies to this question:

  • Justifun

    Justifun said about 7 years ago:

    I also am having issues, i keep getting # Error: ImportError: file line 2: No module named python.dev.rigTools.stk_naAnimTools #
  • sonictk

    sonictk said about 7 years ago:

    Whoops! Sorry, I haven't really checked creativeCrash in a while, so I didn't see the messages here. Firstly, please re-download the zip file (since I've brought it up to date with the latest revision of my git repo with some important fixes) I'll re-post what I wrote to Justin: You need to unzip the scripts to somewhere accessible to your python path. So, for example, if you unzipped the whole folder to: C:\Users\justin\Documents\maya\2014-x64\scripts\python\ Then, you need to add that path to your sys.path. What I do is create a file called userSetup.py in: C:\Users\sonictk\Documents\maya\2014-x64\scripts And in there, you add the following lines: import sys sys.path.append(r'C:\Users\justin\Documents\maya\2014-x64\scripts\python') Then you should be able to import the rigTools folder as a module by simply running the following command: import python.rigTools.stk_naAnimTools as NAT NAT.show() Ultimately, how you choose to import the module is up to you. I provided the sample code on my site as reference. :) I am planning to eventually package this and another tool I am writing into something that will attach to Maya's main menubar (since I am starting to hate having a gazillion shelf icons), but that's a little bit down the line once my crunch period at work ends. Hope this helps! Let me know if you encounter any other issues!
  • Tidalias

    Tidalias said over 6 years ago:

    I had some difficulty installing this due to little syntax issues and being a general noob, but it's the greatest script ever made in the history of scripts, so I just wanted to offer my own steps for anyone having problems. My instructions are partially specific to Maya 2014 x64, but if you find the relevant PyQt4 version for your version, you should be ok. 1. Needless to say, get the script itself. Here on CreativeCrash or here: https://www.sonictk.com/rigging/fbx-split-exporter/ 2. Unzip the contents to \Documents\maya\2014-x64\scripts\python (create the python folder if you don't have it) 3. Install the latest version of Python. Not sure if necessary, but didn't hurt me any. https://www.python.org/downloads/ 4. Get this (or the version of it that fits your Maya version). https://dl.dropbox.com/s/iy7fayechy5fser/PyQt4_Maya2014_x64_Windows.rar 5. Unzip it and put the PyQt4 folder in \Program Files\Autodesk\Maya2014\Python\Lib\site-packages 6. Run this (but customize the username and maya version path to your own): import sys sys.path.append( 'C:\Program Files\Autodesk\Maya2014\Python\Lib\site-packages' ) sys.path.append( 'C:/Users/YourUserName/Documents/maya/2014-x64/scripts/python' ) sys.path.append( 'C:/Users/YourUserName/Documents/maya/2014-x64/scripts/python/rigTools' ) for pythonPath in sys.path: print pythonPath The last bit there should print out your current pythonpath to confirm whether the appended paths are indeed included. 7. Run this. If it works, middle-click drag it to your shelf to create an easy button for reopening it in the future. try:reload(NA_AnimTools) except:import stk_naAnimTools as NA_AnimTools NA_AnimTools.show() When I was running into issues, it had to do with the fact I had only appended the filepath up to /python without including /rigTools, so the "No module named python.dev.rigTools.stk_naAnimTools" kept happening. I also couldn't get "import python.dev.rigTools.stk_naAnimTools" to work but had success in stripping it down to simply "import stk_naAnimTools ". The final pitfall I ran into was that a \r processes as a return in Python, so I had to change the slash direction of the filepath for /rigTools, lest it create a new line and write "igTools" in the output. I've only just tested this script a few times now, but it seems perfect for my needs and I'm super thankful to sonictk for making it!
  • Replyindent
    sonictk

    sonictk said about 6 years ago:

    Hey Mikael: This error, and the other ones similar to it that other people are experiencing, are the result of the module's folder not being available on the PYTHONPATH. You will need to add the module folder to your path so that mayapy knows where to import the modules from. Please refer to the instructions available at: https://www.sonictk.com/rigging/fbx-split-exporter/ For example, if you run the following in the Script Editor: for s in sys.path: print s and you do not see the module's directory listed, then mayapy will not be able to import the module with the given namespace. Hope that helps!
  • Replyindent
    Mikael Persson

    Mikael Persson said about 6 years ago:

    Thank you for the more detailed installation explanation. This python move hasn't been kind to us artists. MEL files were so simple to install! I've managed to get down to a complaint about a DLL so I'm wondering, does this work with Maya 2016? When I run your code: try:reload(NA_AnimTools) except:import stk_naAnimTools as NA_AnimTools NA_AnimTools.show() I get: # Error: ImportError: file D:\mikael\Documents\maya\2016\scripts\python\rigTools\stk_naAnimTools.py line 22: DLL load failed: The specified module could not be found. # If I run the code from the installation explanation on sonictk: try:reload(NA_AnimTools) except:import python.dev.rigTools.stk_naAnimTools as NA_AnimTools NA_AnimTools.show() I get: # Error: ImportError: file line 2: No module named python.dev.rigTools.stk_naAnimTools # I'm wondering do I need to install a specific version of Python that works with 2016? I got the latest from sourceforge: https://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.4/PyQt4-4.11.4-gpl-Py3.4-Qt4.8.7-x64.exe/download Where I've placed the PyQt4 folder and the simple sip file in sitepackages in the maya install folder. Would anyone happen to know what's going on? And, thanks for the help!
  • Replyindent
    sonictk

    sonictk said over 6 years ago:

    Hi Tidalias: Thanks for posting the additional details to help others! Yea, this tool is really lacking in documentation, and I already deployed PyQt builds across our machines in the studio through a seperate process previously, so we didn't have to worry about that. I'm glad to hear that it's still useful for you, even though looking at the code now makes me barf a little inside! :) Right now my job has me working in 3ds max, but eventually I'll want to re-visit this toolset again and make a standalone installer for it (along with making some sorely-needed updates...)
  • sonictk

    sonictk said about 6 years ago:

    Hey all: All the issues being reported here are due to the PYTHONPATH not being set correctly. If you run: for s in sys.path: print s and do not see the module's folder appear in the list that shows up, then mayapy will not know where to import the package from. Please refer to the instructions on how to setup the path correctly, whether doing so manually or using a userSetup.py file or other methods is entirely up to you. Hope that helps!
  • Replyindent
    sonictk

    sonictk said about 6 years ago:

    [quote=mikael-persson--2]Yes, there is an __init__.py file in your rigTools directory. Copying it to the python directory didn't help either (neither did an empty text file with that name, although a .pyc file was created when I tried executing your script with the empty __init__ file.) Running: for s in sys.path: print s Returns: . . . D:/mikael/Documents/maya/2016/prefs/scripts D:/mikael/Documents/maya/2016/scripts D:/mikael/Documents/maya/scripts D:\mikael\Documents\maya\2016\scripts\python D:\mikael\Documents\maya\2016\scripts\python\rigTools The path I created while following your instructions looks like this: D:\mikael\Documents\maya\2016\scripts\python I tried modifying the python paths with forward slashes too, no difference sadly. Thanks so much for helping out![/quote] Hi Mikael: Could you post the directory structure of your files? If it still says that it can't find the module, it's definitely something to do with the way the folder structure is laid out. Either take screenshots or open a command prompt, navigate to D:/mikael/Documents/maya/scripts and type tree to print out the directory structure and its contents to the console. Sorry to hear you're having this much trouble!
  • Replyindent
    Mikael Persson

    Mikael Persson said about 6 years ago:

    Yes, there is an __init__.py file in your rigTools directory. Copying it to the python directory didn't help either (neither did an empty text file with that name, although a .pyc file was created when I tried executing your script with the empty __init__ file.) Running: for s in sys.path: print s Returns: . . . D:/mikael/Documents/maya/2016/prefs/scripts D:/mikael/Documents/maya/2016/scripts D:/mikael/Documents/maya/scripts D:\mikael\Documents\maya\2016\scripts\python D:\mikael\Documents\maya\2016\scripts\python\rigTools The path I created while following your instructions looks like this: D:\mikael\Documents\maya\2016\scripts\python I tried modifying the python paths with forward slashes too, no difference sadly. Thanks so much for helping out!
  • Replyindent
    sonictk

    sonictk said about 6 years ago:

    [quote=mikael-persson--2]Hello, I ran your little print test and yes the pythonpaths do show up in that list. I followed your instructions and created the userSetyp.py How is it with forward / backward slash, do they affect the functionality? I saw that there were a mixed bunch of them in the list. I have a non standard user directory, D:\mikael\ etc. would that affect anything?[/quote] Generally no, though it is good practice to have them as forward slashes (Unix-style). Do you have the module directory listed there? If so, is there an __init__.py file in that same folder? That's how Python knows that the directory is to be treated as package when attempting to import from that namespace. If there isn't one, just make a new file and call it __init__.py (not .py.txt!). If not, then the path is definitely still incorrect. Hope that helps!
  • Replyindent
    Mikael Persson

    Mikael Persson said about 6 years ago:

    Hello, I ran your little print test and yes the pythonpaths do show up in that list. I followed your instructions and created the userSetyp.py How is it with forward / backward slash, do they affect the functionality? I saw that there were a mixed bunch of them in the list. I have a non standard user directory, D:\mikael\ etc. would that affect anything?

Post a reply: