• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ferretnt · Sep 27, 2013 at 05:57 PM · assetmodelfbxmayaimporter

Converting all MA files to FBX without changing GUIDs

I have many Maya files in a project that are directly imported as MA files.

Annoyingly, this means that every machine where work will be done on the project needs to have Maya installed.

I would like to convert all of the MA files to FBX - that's an easy enough batch operation. But then all the FBX files get exported as a NEW asset - they don't replace the existing unity Model/Magic-Semi-Prefab in the scene. Worse still, these models (and their contents, like their internal meshes) are referenced throughout the game and instantiated in all sorts of weird ways. So I really do need a transparent replacement.

So, is there a way that I can replace all the MA files in my project with FBX equivalents of themselves, re-using the same GUIDs? It would seem that since Unity actually implements MA import as FBX emport then import, if Unity caches the FBX files as temporaries (in Libary folder?) then I could even use those files as the FBX's?

Thanks, Alex

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DannyB · Sep 28, 2013 at 01:23 PM 0
Share

Not sure this will work, but maybe worth a try. What if you rename your current $$anonymous$$A files to have an FBX extension (rename through Unity), and only after that overwrite it with the proper FBX file?

avatar image beeboks · Jan 28, 2015 at 04:28 PM 0
Share

Great question. I'm running into this issue as well. Did you ever find a solution?

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by ferretnt · Feb 01, 2018 at 10:48 PM

You can do this with a python script and calling the script with mayapy. Note that the FBXExport command doesn't seem to script via Python, so you'll have to construct a MEL string and pass that.

FBX's didn't 100% replace the guids. I'm not sure if this is because some of the models I was replacing date from 2012, or if I accidentally alt-tabbed to Unity at some point whilst running the script, at which point the GUID cache decided to give all the new FBX's new guids no matter what you did to their meta files.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Paulius-Liekis · Jan 28, 2015 at 08:54 PM

You should be able to do something like this:

  1. Delete .ma file

  2. Place .fbx

  3. Rename .ma.meta to .fbx.meta

In theory this could work. You might need to rename something more in meta file.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

18 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to import model without it glitching? 1 Answer

Maya models and lightmapping issue 1 Answer

Why does Unity triangulate .fbx files? 1 Answer

Is importing from Maya via fbx using model@anim broken? 1 Answer

Importing a model without it becoming a prefab 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges