Just a little script i been working on for a while, that i use for creating quick collision hulls, and exporting to udk with one click, thought it could be useful to some maya and udk users.
when it creates new collision hulls, it automatically follows the unreal UCX_ naming convention for collisions, and on export it centers everything to the world origin so that pivots are properly placed in udk.
Installation
Clone or extract contents to the parent of your Maya scripts folder(for me this is "C:\Users\User\Documents\maya\2012-x64"). Than enable the DDConvexHull plug-in for your version of Maya in the Maya plugin manager.
Once this is done simply just open a python console and run these commands.
import pbUDK
pbUDK.UI()
Optionally you could create a shelf button containing the same python code as above.
GITHUB
UPDATE 1.01:
Added batch exporting.
Made batch export selections persistent, and attached to the scene.
Replies
I implemented in a way that the selection for the batch export is stored in the scene file and persistent between sessions.
This wonderful little script is a huge time saver and works perfectly for Unreal 4. I wrote a little tutorial on my workflow if anyone is interested:
http://thiagoklafke.com/batchexport.html
Thanks Chris for the script!
Any plans on updating this for Maya 2016 ext2? I just messed around with the plugin (which is fantastic, by the way) and ran into some issues with objects showing up twice in the export list, as well as not being able to remove objects from the list on occasion. Here's the error I get:
# Error: AttributeError: file C:\Program Files\Autodesk\Maya2016.5\Python\lib\site-packages\pymel\core\nodetypes.py line 1801: nt.Transform(u'CrowdA_EndCap_Curve') has no attribute or method named 'pbExport' #
The error isn't entirely consistent, but it does seem to happen every time I try to remove multiple items from the list at once by shift-selecting them.
But i will see if i can recreate that bug for you in my copy of 2015, and see what else i can do. Is their any new features people are looking for?
A "clear all" button would be pretty great, along with the ability to add a custom suffix or prefix to exported meshes, depending on their parent-child relationship. I could be wrong, but the "move to origin" checkbox doesn't seem to work as described. For me, it simply clears the the transforms and exports it from it's current position. Other than that, the tool works fine; box and sphere generators work perfectly, the export children works and it seems to recognize my FBX preset settings.
These are very minor gripes considering how useful this tool has been for me so far. Thank you again for creating this and making it available for everyone.
also check out the new version 1.05 i just committed, and see if it fixes the duplicate problem as well as the attribute error that happens when trying to remove said duplicate.
also look into the centering behavior, it should center things to the worlds 0, 0, 0 than freeze transformations before export, and return things to their old location when done
"Move to Origin" works for me now. I'm still getting duplicates in the export list, but for some reason it's only happening with certain objects. If I were to create a new cube, for instance, adding and removing it from the list works. Not sure what's happening there, but exporting those items that are duplicated in the list still works fine.
than let me know if that fixes the duplicate bug. I also added a clear all button in that one as well which should remove any attribute data left behind from older versions. If that works let me know and i will merge the change into the release version.
What am I missing here/doing wrong? I can't figure it out...
I extracted:
the "DDConvexHull-2017_64bit.mll" into C:\Users\User\Documents\maya\2017\plug-ins\
the "udk.png" into C:\Users\User\Documents\maya\2017\prefs\icons\
the "pbUDK.py" and the "udkExport"-folder (+content) into C:\Users\User\Documents\maya\2017\scripts\
1)Extracted the zip to C:\Users\[yourname]\Documents\maya\[yourversion]
2)Loaded the plugin version in the plugin manager
3)Opened the script editor, Load Script>C:\Users\[yourname]\Documents\maya\[yourversion]\pbUDK-master\scripts\pbUDK.py
4)Save script to Shelf
Am I just not installing the plug-in correctly? Were you using Maya 2017 when you got this working?
Thanks in advance!
Hey, sorry for the late reply.
Yes, I'm using on Maya 2017.
weirdly, I just installed on my brand new laptop and didn't need to load the DCC plug-in the plugin manager. I just dropped the pbUDK-master folder in the Maya version folder and loaded the script through the script editor and it worked np.
Cheers.
This beats the default Maya Game Exporter any day, tried to use that but it feels like it's been coded by someone in isolation and it wasn't tested by an actual artist, the usability is just horrible and convoluted.