Community
FBX Forum
Welcome to Autodesk’s FBX Forums. Share your knowledge, ask questions, and explore popular FBX topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exporting selected objects only & FBX Maya docs

10 REPLIES 10
Reply
Message 1 of 11
Anonymous
2545 Views, 10 Replies

Exporting selected objects only & FBX Maya docs

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). 🙂


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. 🙂
10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: Anonymous

Over a week and no reply? 😐
I like to bump this, I still don't have a solutionon on the Maya side for this.
Message 3 of 11
Anonymous
in reply to: Anonymous

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

Message 4 of 11
Anonymous
in reply to: Anonymous

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
Message 5 of 11
Anonymous
in reply to: Anonymous

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). 🙂 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
Message 6 of 11
Anonymous
in reply to: Anonymous

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
Message 7 of 11
Anonymous
in reply to: Anonymous

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

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. 😉
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
Message 8 of 11
Anonymous
in reply to: Anonymous

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
Message 9 of 11
studobbs
in reply to: Anonymous

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.
Message 10 of 11
Dabitbol
in reply to: Anonymous

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
Message 11 of 11
info
in reply to: Dabitbol

Any new news on this?  I am trying to create an export selected script... so far I am able to give the user an option to export children or not... but after hours of debugging why my code "always exports the parent objects too", I realized this is due to the exporter limitations with "Export Selected"... is there any way around this yet????

 

Thanks!

K.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report