Area :: Header
Autodesk University
The future of making things
Discussion Groups

FBX Plug-ins Import-Export Discussions

Reply
Active Member
mauritius
Posts: 7
Registered: ‎07-17-2008

Exporting selected objects only & FBX Maya docs

664 Views, 10 Replies
07-17-2008 05:14 PM
I'm trying to export a selection from Maya, w/o any user interaction (no dialog) via FBX.

I managed to find out that there is a command (omitted from the list of commands in the docs!) that is called "FBXExportShowUI".
However, I wasn't able to find anything that allows me to export only a list of objects (or the current selection) instead of the whole scene.
The FBXExport command seems to have undocumened parameters (Maya uses e.g. -caller), there's no help, i.e.:
help FBXExport;
// Result:Quick help is not yet available for this command.//

Is there maybe some option to only use the selection?

There's also no way to get a list of commands this plug-in registers:
pluginInfo -query -c "fbxmaya";
// Result:FBXImportShowUI FBXExportShowUI FBXExportQuaternion//

Voila (that's how I found that the FBXExportShowUI command exists), but the other 50 odd commands mentioned in the docs are missing from this list.
Since there is the FBXExportQuickSelectSetAsCache command, I have this crazy idea there might be another undocumeneted one to make the FBX exporter only use the selected objects (note that I'm not interested in exporting caches). :smileyhappy:


Cheers,

Moritz


P.S.: I think it would be great if the Maya FBX docs could be improved (include all commands existing and all options they take) as well as the help and pluginInfo queries properly implemented, at some stage. :smileyhappy:
Please use plain text.
Active Member
mauritius
Posts: 7
Registered: ‎07-17-2008

Re: Exporting selected objects only & FBX Maya docs

07-25-2008 11:29 AM in reply to: mauritius
Over a week and no reply? :-|
I like to bump this, I still don't have a solutionon on the Maya side for this.
Please use plain text.
Employee
David Abitbol
Posts: 77
Registered: ‎08-15-2006

Re: Exporting selected objects only & FBX Maya docs

07-29-2008 03:05 PM in reply to: mauritius
Hello Moritz ,

Thank you for contacting us regarding these issues you are having.



Regarding the FBXExportShowUI and docs issue:

In the 2009.1 version of the FBX plugin for Maya this command is included but cannot be used. It was kept to insure compatibility with scripts that may have been written by users using the 2006.11.2 or earlier versions of the FBX plugin. This is the reason why its not in the docs.

In the 2009.1 version of the FBX plugin, using a script or a command like FBXExport will automatically hide the UI. The UI can only be seen when doing an export from Maya’s UI.

There is a bug related to the Warning manager still popping up even though you are exporting via a script . This issue has been fixed and should be in the next release of the FBX plugin.

Please let me know if this answers your question or if you have further issues related to this.



Regarding the issue related to export selection:

This workflow is not very user friendly and we know it. We are planning to include new functionality to help users with the export selection workflow but we want to do it right and so I apologize for the wait.

What I can provide for the time being is a script we developed to facilitate the export selection process. Here is how it works.
Attached to this email are two files.

• Copy the expSelection.mel file in the following folder
“C:\Program Files\Autodesk\Maya2008\scripts\startup” (I am assuming you are using Maya 2008 on windows but it can be any version of Maya on Windows or Linux)

• Restart Maya

• In the mel.txt file you will find the Mel command for Windows and Linux versions of Maya. Copy the script in your Maya command line.

• Select the object you wish to export selected and run the script

The script currently exports two files to a temp folder on your c drive. One is a temporary Maya file and one is the FBX file containing your selected object. Feel free to modify the script to export the selected object to a different destination folder of your choice.


Please let me know if this helps or if you have any additional questions.

Thank you,

David Abitbol
Autodesk FBX

10317_6q3BvthgmD0tvLT4tq8n.zip

Please use plain text.
Active Member
mauritius
Posts: 7
Registered: ‎07-17-2008

Re: Exporting selected objects only & FBX Maya docs

08-01-2008 09:05 AM in reply to: mauritius
Hey David,

thanks heaps for getting back to me on this.
Any takers when the next release of the plug-in is due?

I'll give the selection export you described a whirl and let you know how it goes.


Beers,

Moritz
Please use plain text.
Active Member
mauritius
Posts: 7
Registered: ‎07-17-2008

Re: Exporting selected objects only & FBX Maya docs

08-01-2008 04:01 PM in reply to: mauritius
The egregious hack with exporting a Maya file containing selected objects only and then converting that with maya batch worked. I'm creating all the stuff from my C++ plug-in even (including the MEL script). :smileyhappy: Thanks again for the broad hint. ;-)

However, I've got a new problem now:
I absolutely need some custom attributes, living on the transform node of the object I'm exporting, to go into the fbx.
It seems though as if the fbx exporter strips everything but a bunch of attributes (aka properties) that it already knows about. In other words: the custom attribute is present in the the intermediate Maya file, that I'm writing, but gone in the resulting fbx. :-|

Is there any way to tell the exporter to export certain attributes from Maya, even if it doesn't know about them?
I also need to be able to do the same from 3dsmax & Motionbuilder, including reading those back in, for all these three packages.

Basically, I'm writing a simple cross-app asset management & versioning system here that uses fbx as a storage format. Assets need to be identified. That's one (of many) reason why I need custom attributes/properties (aka metadata) to survive export to/import from fbx.


Cheers,

Moritz
Please use plain text.
Employee
David Abitbol
Posts: 77
Registered: ‎08-15-2006

Re: Exporting selected objects only & FBX Maya docs

08-06-2008 11:40 AM in reply to: mauritius
Hi Moritz,

I'm glad to hear that the solution worked out well for you. Regarding your question about custom attributes. Can you be more specific about what kind of attributes you are referring to?

If you would like to send us an example scene that would be great. You can send it to fbxplugins@autodesk.com

Currently the FBX plugin exports all known extra attributes that can be created. This includes Vector, Integer, String, Float, Boolean and Enum.

Please let me know if this is what you’re referring to. If not I will be happy to forward your question to one of our Dev members who could better assist you on the SDK side

Thank you,

David Abitbol
Autodesk FBX
Please use plain text.
Active Member
mauritius
Posts: 7
Registered: ‎07-17-2008

Re: Exporting selected objects only & FBX Maya docs

08-11-2008 03:57 PM in reply to: mauritius
Hey David,

after your reply I looked closer and indeed, the attribute I'm after does get exported. However, FBX only exports the short name. In my case the attribute was called "FabrikCode" with the short name "fc".

The problem is that upon reimport of the FBX, the target app can only create an attribute with the name "fc" -- the long name is lost. I would have though that short attribute names were for Maya internal use only and FBX would always export the long name?

Anyway, I solved this by just using the same string for short and long attribute name. So I have no outsanding issues. Apart from waiting eagerly for an FBX version that allows exporting a selection of objects natively from Maya. :smileyhappy:

Speaking about FBX: arethere any plans to make the FBX plug-ins open source? After all, these plug-ins don't contain any rocket science, I'd imagine. :smileywink:
But having access to the source would proove very beneficial both for Autodesk (as the community will fix bugs & add features) as well as for the users (for the same reasons).

Thanks heaps for your time.

Beers,

Moritz
Please use plain text.
Employee
David Abitbol
Posts: 77
Registered: ‎08-15-2006

Re: Exporting selected objects only & FBX Maya docs

08-12-2008 05:57 PM in reply to: mauritius
Hello Moritz,

I am glad that you were able to resolve your issue. You’re right that it’s not rocket science hehe, unfortunately it’s only extremely advanced alien technology :-) . However, If you are interested in exploring the newly published FBX reader/writer source code, please don’t hesitate to ask us to invite you to join our Sharon SDK Project. Send an email to FBXplugins@Autodesk.com asking for access to the Sharon SDK Project and you will hear from us shortly.

Thank you,

David Abitbol
Autodesk FBX
Please use plain text.
Member
studobbs
Posts: 4
Registered: ‎08-22-2006

Re: Exporting selected objects only & FBX Maya docs

02-24-2009 09:15 PM in reply to: mauritius
Is there any news on a command line version of export selection with no UI pop ups?

the export selected to a new scene and then having to fbx export this using maya -batch is not the most practical of solutions.

why was the FBXExportShowUI flag deprecated?

thanks,

s.
Please use plain text.
Member
Dabitbol
Posts: 5
Registered: ‎08-17-2006

Re: Exporting selected objects only & FBX Maya docs

03-04-2009 07:49 PM in reply to: mauritius
Hi studobbs,

The Maya FBX Plug-in beta release does have new functionality to better support export selection workflows using either the UI or command line. This new functionality will resolve the double export workflow you are doing now. If you would like access to the FBX Plug-in beta please contact me at FBXPLUGINS@autodesk.com and we will set you up with a MyFeedBack account and access to the Beta release of the FBX plug-ins.

To answer you second question: why was the FBXExportShowUI flag deprecated?

The reason is because now when working with command line the UI will automatically not show so the command became unnecessary.

I hope that answers your questions and please let us know if your interested in trying out the Beta.

Thanks,

David Abitbol
Autodesk FBX
Please use plain text.