Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

jbUnity Tools -- Maya tools script for Unity

Discussion in 'Formats & External Tools' 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

    v1.30
    * Updated to work with Maya 2014

    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. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Version 1.00 is up. Added the following features.

    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

    Latest version can be downloaded from my website: www.cgartistry.com
     
  3. terminal205

    terminal205

    Joined:
    Sep 4, 2011
    Posts:
    259
    Gonna give this a shot this weekend. I'm running 2010, so we'll see how it works. Definitely need some help exporting skinned meshes and anims into Unity, and I'm hoping this helps lol
     
  4. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Sorry, it won't work in versions prior to Maya 2011. Maya switched their UI system and some key functions in 2011+. Not impossible to get working by determining which version you're running and allowing for some alternatives, but I haven't had time to make that happen.

    As a side note, the exporter uses an FBX preset file of your choice so it will work with animations, skinned meshes, whatever, but it's primarily been designed for level assets, especially modular assets. Gets me thinking about adding some features in support of the export of animations and skinned meshes. If anyone has any suggestions for features, I'm listening.
     
  5. terminal205

    terminal205

    Joined:
    Sep 4, 2011
    Posts:
    259
    I'm running 2010.

    The FBX presets usually include a deformed mesh, skins, blendshapes, etc
     
  6. 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.
     
  7. 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).
     
  8. dkertesz

    dkertesz

    Joined:
    Apr 2, 2013
    Posts:
    3
    Hi Josh,

    I'd like to say that I find this tool extremely handy. I currently am encountering an error exporting via FBX in Maya 2013. I "Add" my assets to the "Objects to be exported" window, set my pivot position to "CB", press export and the following error appears:

    line 907: cannot concatenate 'str' and 'NoneType' objects #
     
  9. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    That's odd, definitely a Python error. Easy to fix, but I haven't had that happen locally. Are you on Mac or PC? You sure you had objects in the list for export? Were the objects still in your scene?
     
  10. dkertesz

    dkertesz

    Joined:
    Apr 2, 2013
    Posts:
    3
    I am on a PC running Win7, the objects were in the list export and they were still in my scene after failed export. Attached is a screenshot and below is the Script Editor output.

    $jbUnity_Export_Images.png

    file -f -options "v=0;" -typ "mayaAscii" -o "C:/Users/dkertesz/Desktop/FTV2/unity_test_assets/plots_jb.ma";addRecentFile("C:/Users/dkertesz/Desktop/FTV2/unity_test_assets/plots_jb.ma", "mayaAscii");
    // File read in 0 seconds. //
    import jbUnityTools
    jbUnityTools.jbUnityToolsUI()
    --------------------------------------------------
    jbUnity Tools initilization...

    Maya Version: 2013 x64
    Active Maya project: C:/Users/dkertesz/Documents/maya/projects/default/
    No FBX preset file found
    Custom reference folder ' UnityReference ' not found
    --------------------------------------------------
    jbUnity Tools v1.25 | (c) 2009-2012 Joshua Buck | cgartistry.com
    Grid and camera settings set to unity
    select -r planeMED planeLG ref_MaxHuman planeSM ;
    ----- jbUnity Tools :: Export Batch -----
    Exporting: planeMED
    No parent found for planeMED
    # Error: TypeError: file C:/Users/dkertesz/Documents/maya/2013-x64/scripts\jbUnityTools.py line 907: cannot concatenate 'str' and 'NoneType' objects #
     
  11. B-Mills

    B-Mills

    Joined:
    Mar 28, 2013
    Posts:
    14
    This script looks extremely helpful... I really wanted to use the batch exporter function but I am getting the same error as dkertesz. Also on the same Maya version and OS as him plus the latest FBX exporter.

    What I've noticed is that on startup it does have a "FBX Export Preset File", even though I have one in my user folder. So I manually tell the script where it is but on export I receive a different error below:

    Here's what the command line says when I try to export two objects:
    ----- jbUnity Tools :: Export Batch -----
    Exporting: ramp_smooth_14m_60deg
    No parent found for ramp_smooth_14m_60deg
    # Error: RuntimeError: file <maya console> line 908: Invalid file type specified: FBX export #

    I am not sure why it's complaining about have no parent. Is there a specific hierarchy needed to objects to be batch exported as individual components?
     
  12. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
  13. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,913
    I am not seeing any of the awesome old alignment tools? Am I missing something?
     
  14. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Now seeking feature requests for jbUnity Tools -- I'm planning an overhaul soon.

    Download jbUnity Tools: download
    Post feature requests: feature requests
     
  15. JamesArndt

    JamesArndt

    Unity Technologies

    Joined:
    Dec 1, 2009
    Posts:
    2,913
    Alignment tools? I see the stacking tools.
     
  16. jbuck

    jbuck

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

    James: if you mean the position and orientation alignment, I added them back in for v1.40. :)
     
  17. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    This tool rocks.

    Initially I too had the:

    - No parent found
    - cannot concatenate 'str' and 'NoneType' objects #

    error, however some sterling support from Josh via email discovered that I needed to set up a Maya Project for my scene as jbTools could not find the User FBX Preset file. Works great and thanks again Josh.
     
  18. jbuck

    jbuck

    Joined:
    Jun 9, 2009
    Posts:
    169
    Glad it worked out. I will look into finding a better error log and solution for this problem. Thinking about a most common options export setting option that bypasses the fbx export preset file altogether (will keep the preset file as an option). This is what I use in The Rigging Toolbox as 99% of the time we all use common export settings from Maya to Unity.

    -Josh