Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maya Exporter: Export Selected, Nicer JSON, default extension #9431

Merged
merged 1 commit into from
Aug 4, 2016

Conversation

ascloutier
Copy link
Contributor

I’ve added a handful of improvements that I think will really help people trying to use Maya with 3JS:

  1. The current plugin will only perform an “Export all” regardless of what you select from the menu in Maya. I have fixed that so you can now “Export All” or “Export Selected”. Export all sill merges geometry rather than exporting a 3JS scene, may fix that in the future.
  2. Updated the default extension to be “.json” rather than “.js”. This is more in-line with 3JS and the other exporters.
  3. I pulled the JSON encoder from the Blender exporter and integrated it into the Maya one so that each item in the ups, faces, vertices, etc arrays are no longer on a separate line. Makes the file much easier to read and debug.
  4. Turned off sorting of the JSON output. This is more of an opinion, but I didn’t feel like it helped the output at all.

The Maya exporter is still not in-line with the Blender exporter but I think this is a good intermediary step.

I’ve added a handful of improvements that I think will really help
people trying to use Maya with 3JS:

1. The current plugin will only perform an “EXPORT ALL” regardless of
what you select from the menu in Maya. I have fixed that so you can now
“Export All” or “Export Selected”. Export all sill merges geometry
rather than exporting a 3JS scene, may fix that in the future.
2. Updated the default extension to be “.json” rather than “.js”. This
is more in-line with 3JS and the other exporters.
3. I pulled the JSON encoder from the Blender exporter and integrated
it into the Maya one so that each item in the ups, faces, vertices, etc
arrays are no longer on a separate line. Makes the file MUCH easier to
read and debug.
4. Turned off sorting of the JSON output. This is more of an opinion,
but I didn’t feel like it helped the output at all.
@mrdoob mrdoob merged commit 4891469 into mrdoob:dev Aug 4, 2016
@mrdoob
Copy link
Owner

mrdoob commented Aug 4, 2016

Thanks!

@gnauhca
Copy link

gnauhca commented Aug 10, 2016

Thanks to ascloutier, this update is really what I want. I have tried this version just now. but I found the first problem still exist. I still got all of model when I select "ExportSelected".
(my maya version is 2016 - OS X 10.10.5)

@gnauhca
Copy link

gnauhca commented Aug 10, 2016

And here are some other issue:

  1. The export file contain all materials defined in maya, even if some of them have never been used;
  2. The transparent attr export incorrectly (opacity always be 1 & transparent always be false).
    hope you can help ^^

@ascloutier
Copy link
Contributor Author

Hey zhzh, thanks for the comments. I'm just putting together a fix for it still exporting all. I'm still a bit new to Maya and I didn't realize that the way the plugin was previously made would make export selected so difficult. This fix also takes care of all the materials bring in the file.

I'll look into transparency and opacity.

Also, I'm having a hard time testing exporting animation. I'm trying to make it so it should work with export all, but I don't think I'll be able to get it working with export selected. At least for now.

@ascloutier ascloutier deleted the maya_exporter_update branch August 10, 2016 14:15
@ascloutier
Copy link
Contributor Author

A new pull request has been created that fixes all these issues (and more).

#9485

@gnauhca
Copy link

gnauhca commented Aug 11, 2016

OMG! You genius. All the problems have been solved!
Thank you very very much for helping me!
& Thank you very very much for understanding my poor english.

aardgoose pushed a commit to aardgoose/three.js that referenced this pull request Oct 7, 2016
…#9431)

I’ve added a handful of improvements that I think will really help
people trying to use Maya with 3JS:

1. The current plugin will only perform an “EXPORT ALL” regardless of
what you select from the menu in Maya. I have fixed that so you can now
“Export All” or “Export Selected”. Export all sill merges geometry
rather than exporting a 3JS scene, may fix that in the future.
2. Updated the default extension to be “.json” rather than “.js”. This
is more in-line with 3JS and the other exporters.
3. I pulled the JSON encoder from the Blender exporter and integrated
it into the Maya one so that each item in the ups, faces, vertices, etc
arrays are no longer on a separate line. Makes the file MUCH easier to
read and debug.
4. Turned off sorting of the JSON output. This is more of an opinion,
but I didn’t feel like it helped the output at all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants