Search Unity

jbUnity Tools -- Maya tools script for Unity

Discussion in 'Assets and Asset Store' started by jbuck, Dec 20, 2011.

  1. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    A new version of my jbUnity Tools script is available. In a nutshell, it aids in the setup of the Maya scene (units, grid, camera) for the creation of Unity assets, also the conversion to meters. I've added some tools for positioning meshes and pivots as well as custom grid divisions, a unit calculator and a batch FBX exporter. Yes, it's still free.

    Tested in Maya 2011, 2012 both PC and Mac (you may need SP1 or latest hotfix for the Mac version to work)

    Includes:
    * Quick switch between meters and centimeters
    * Ability to change grid divisions on the fly and set custom divisions with multiple presets
    * Tools to relocate pivots and/or meshes to common locations for level design
    * Tools to create common reference objects
    * A muti-field calculator for mm, cm, m, km, in, ft, yd, mi
    * A batch exporter for the FBX file format that uses custom fbx preset files

    Help file can be found here: jbUnity Tools Help

    v0.91:
    *BUG FIX: Float and int fields can now be updated with either numpad or regular enter keys

    v1.00:
    * FEATURE: Automatic loading of FBX preset file
    * FEATURE: Basic UI coloring for clarity
    * FEATURE: Auto load of custom references with buttons for each
    * FEATURE: Batch export prefix/suffix option
    * FEATURE: Stacking transform tool
    * FEATURE: Keep custom grid color settings or use the jbUnity Tools grid coloring scheme

    v1.20:
    * UPDATE: Added support for Maya 2013

    v1.25:
    * Lots of code cleanup and bug fixes
    * Exporter was rewritten and now includes options for Single, Hierarchy and Batch.
    * Improved handling of FBX export preset files

    The FBX exporter now works intuitively in Maya like it does in other programs and no longer exports an entire hierarchy when you only want to export a single object. Use 'Export Single' to export a single mesh (even if it's part of a hierarchy), 'Export Hierarchy' to export a hierarchy of objects (even if they're nested in a larger hierarchy), and 'Export Batch' to export a list of selected objects (even if they're in a hierarchy).

    Download the latest version here: jbUnity Tools

    Original forum post for old version
     
    Last edited: Jul 7, 2013
  2. MaDDoX

    MaDDoX

    Joined:
    Nov 10, 2009
    Posts:
    764
    Cool, thanks :)
     
  3. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    You're welcome. Let me know if you find any bugs.
     
  4. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    v1.00 is up.

    * FEATURE: Automatic loading of FBX preset file
    * FEATURE: Basic UI coloring for clarity
    * FEATURE: Auto load of custom references with buttons for each
    * FEATURE: Batch export prefix/suffix option
    * FEATURE: Stacking transform tool
    * FEATURE: Keep custom grid color settings or use the jbUnity Tools grid coloring scheme

    Download the latest version (1.00) from my website: jbUnity Tools v1.00 at www.cgartistry.com
     
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    can you make this work with maya 2009 on mac? I don't like the dark interface of the new maya version so I don't want to use a newer version
     
  6. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    I could, but given that it's a free script, it's being distributed 'as is.' I have made a few proprietary versions with custom features for commercial use but they're not free. Contact me through my website if that's something you're interested in.
     
  7. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,526
    I understand, thanks for making this plugin for free!! it very useful, I may try the new maya versions at some point.
     
  8. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    v1.20 now available.

    * Resolves the UI issues with Maya 2013 yet maintains compatibility with Maya 2011 and 2012.

    Latest version can be downloaded here.

    Please let me know of any bugs/issues.
     
  9. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    Error Maya 2013 mac and pc.

    import jbUnityTools
    jbUnityTools.jbUnityToolsUI()
    # Error: line 1: ImportError: file <maya console> line 1: No module named jbUnityTools #
     
  10. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Ha. Well, yes, it won't run unless Maya actually loads the script (module).

    You need to locate the jbUnityTools.py file in the location that Maya looks for scripts. On Windows, usually something like: C:\Users\Name\Documents\maya\2013-x64\scripts.

    The help file has this info. Mac will be different but it's the same idea.
     
  11. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    I'm sorry.
    Seems like a great tool.
    But I can not install.

    Always is giving the same error.

    Still thanks for listening.
     
  12. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Are you on Windows or Mac?
     
  13. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    I'm at work on a Mac
    At home use Windows.
     
  14. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Should be all set on windows, please test when you have a chance.

    On Mac, location for scripts should be something like this: /users/*user*/Library/Preferences/Autodesk/maya/2013/scripts

    I don't have my Mac with me at the moment, please verify that this works.
     
  15. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    Now is working on a Mac
    Thank you.
    At home I'll try again in Windows.
     
  16. nilton_felicio

    nilton_felicio

    Joined:
    May 17, 2012
    Posts:
    66
    Perfect.
    Also working on windows.
     
  17. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Great! Let me know if you have any UI problems -- I had issues with the way UI windows are handled between Maya 2011, 2012 and 2013. I think I have it sorted.
     
  18. gnl.weirdness

    gnl.weirdness

    Joined:
    Aug 6, 2012
    Posts:
    5
    Stick with me here, because this is most likely a very dumb question. I have the script and I pull it into a fresh project in maya. I attempt to execute all, and it dies on FBX Export preset file....

    I have tried to follow the instructions from both maya and yourself on how to create a preset, but I cannot get the option in maya (the edit button upon selecting FBX Export).

    Is there some other way that I am supposed to get the tools working other then just running the script? Is the script strictly for when I am ready to export my entire scene, or parts of it out?

    Any advice on how to get the tool windows to populate in my workspace would be vastly appreciated.

    Thanks
     
  19. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    I keep the script open the whole time I'm working. Most tool windows are collapsible so you'll likely close one to open another, etc. The exception is the batch exporter which spawns it's own window.

    What OS are you running and which version of Maya?
    Does the script run normally at all?
    I create FBX presets (Windows) by going to File -> Export Selected (options box). Does this not work for you?
     
  20. gnl.weirdness

    gnl.weirdness

    Joined:
    Aug 6, 2012
    Posts:
    5
    jbuck,

    Windows 7 64 and Maya 2013 64.

    And I guess what might be my issue, outside of the FBX presets not working for me, is that maybe I just don't understand how to run the various tools you have. I can get the entire script to load up in the script editor just fine, but when I hit execute all it constantly gets hung on the FBX issue. Is there a way to run single tools in the script at a time? Ideally I'd like it to run as designed though.

    Ok it looks like I didn't understand the options box when choosing export. I am going to play around with it some more and I will post here if I figure it out.

    Cheers
     
  21. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    The script should run fine without an FBX preset -- you only need that to use the export functionality. Make sure to run with script editor window open so you can see if there are any error messages.

    Let me know how you make out.
     
  22. gnl.weirdness

    gnl.weirdness

    Joined:
    Aug 6, 2012
    Posts:
    5
    So I run the script and it still ends with the FBX line

    "Export cancelled. You must choose a valid FBX export preset file (Settings -> FBX Export Preset File.)"

    No tools open, nothing seems to happen at all actually, other then it giving me that error.

    What is supposed to happen upon successful running of the script? The tools all create windows correct?
     
  23. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Yes it will open the main script window, that's it. No exporting until you ask it to do so. It will look for an FBX preset on startup but shouldn't stop if it can't find one. Did you put the script in your Maya scripts folder as described in the help file?
    What method are you using to run the script?
     
  24. gnl.weirdness

    gnl.weirdness

    Joined:
    Aug 6, 2012
    Posts:
    5
    I have the script in my scripts folder (both the main scripts folder for maya, and the scripts folder for my current project). I run it by opening the script editor, loading it, and hitting execute all, just as your tutorial suggested...

    No dice no matter what I do...
     
  25. gnl.weirdness

    gnl.weirdness

    Joined:
    Aug 6, 2012
    Posts:
    5
    hah, ok I def misread the part about it needing to be in the user specific maya folder. so many different folders for scripts all over the place. I have it open now. Not sure how I misread that, it is DEADLY straight forward.
     
  26. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    It might need to be in the scripts folder for your version of Maya. Something like: C:\Users\Name\Documents\maya\2013-x64\scripts

    Then restart Maya and try running it by loading from the scripts location with something like:

    import jbUnityTools
    jbUnityTools.jbUnityToolsUI()
     
  27. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
  28. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    v1.25 of jbUnity Tools is available for download here: jbUnity Tools

    jbUnity Tools is FREE.

    v1.25:
    * Lots of code cleanup and bug fixes
    * Exporter was rewritten and now includes options for Single, Hierarchy and Batch.
    * Improved handling of FBX export preset files

    The FBX exporter now works intuitively in Maya like it does in other programs and no longer exports an entire hierarchy when you only want to export a single object. Use 'Export Single' to export a single mesh (even if it's part of a hierarchy), 'Export Hierarchy' to export a hierarchy of objects (even if they're nested in a larger hierarchy), and 'Export Batch' to export a list of selected objects (even if they're in a hierarchy).
     
    Last edited: Jul 7, 2013
  29. Nubz

    Nubz

    Joined:
    Sep 22, 2012
    Posts:
    553
    Doesn't work with 2013 I guess
    At least all it does is give me errors had to find a better solution
     
    Last edited: Nov 9, 2012
  30. Gmet13

    Gmet13

    Joined:
    Dec 6, 2012
    Posts:
    1
    Im running maya 2013 on windows 7 64 bit. I AM having the same module error. My JB tools is in the script folder in the right place, im sure of it. this is the error I have:

    import jbUnityTools
    jbUnityTools.jbUnityToolsUI()
    # Error: line 1: ImportError: file <maya console> line 1: No module named jbUnityTools #
     
  31. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    @ nubz -- it certainly does work in Maya 2013, we use it in production daily. Curious what your 'better solution' is?

    Make sure you're using the correct name of the .py file you downloaded in your run snippet. For example, it may contain the version number (jbUnityTools_v125) or something like that. Let me know how you make out.
     
  32. dkertesz

    dkertesz

    Joined:
    Apr 2, 2013
    Posts:
    3


    What you have to do is:
    1. Copy "jbUnityTools_v125.py" script to C:\Users\"USER NAME"\Documents\maya\2013-x64\scripts
    2. Rename the script to: "jbUnityTools.py"
    3. Open Maya
    4. Open Script Editor
    5. In the Python tab paste:
    import jbUnityTools
    jbUnityTools.jbUnityToolsUI()
    6. Select All
    7. File --> Save Script to Shelf

    BOOYAH!!!
     
  33. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Thanks for that. Or:

    import jbUnityTools_v125
    jbUnityTools_v125.jbUnityToolsUI()

    There's no fix needed for 2013, it's the same for all versions. I just changed the name of the python file. The first line imports the module (.py or .pyc file) into Maya. The second line runs the UI function from the module.

    Also, for Mac users, the .py should go in:
    /Users/joshbuck/Library/Preferences/Autodesk/maya/scripts/
     
  34. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    v1.30 is out. Now works with Maya 2014.

    Download jbUnity Tools here: jbUnity Tools
     
  35. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Seeking input on feature requests for an upcoming release of jbUnity Tools.

    Download jbUnity Tools: download
    Post feature requests: feature requests
     
  36. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    jbUnity Tools for Maya v1.40 is now available. Download at: CGARTISTRY
     
  37. pixxelbob

    pixxelbob

    Joined:
    Aug 26, 2014
    Posts:
    111
    Hey this is a great little tool. Any idea when you might have time to get it working in Maya2016, the Export FBX doesn't work.