Results 1 to 2 of 2

Thread: Maya exporter code suggestions

  1. #1
    robthebloke
    Guest

    Maya exporter code suggestions

    A few bug fixes & suggestions. I should probably setup CVS and enter these on sourceforge....

    ------------------------------------------------------------------------------

    DaeDoc.cpp line 219 : instead of using mel, you could just replace that with :
    Code :
    MDistance temp(1.0f,MDistance::uiUnit());
    float conversionFactor = temp.as( MDistance::kMeters );

    the same goes for line 155.

    ------------------------------------------------------------------------------

    line 1090, DaeGeometryLibrary.cpp : I'm not sure why (still looking into it) but occasionally there can be less shader groups than there are polygons. I've added this temporary fix to stop it crashing.

    Code :
              if(shaderGroups.length()>i)
              {
    					  MFnSet shaderGroupFn(shaderGroups[i]);
    					  shaderGroupFn.addMembers(componentList);
              }

    I guess it would be better in the long run to assign the default lambert1 on import. (possibly)

    ------------------------------------------------------------------------------

    DaeTranslator.h : If you add the following code into the DaeTranslator class, then the import/export file dialog will correctly filter *.dae files :

    Code :
    MString filter() const { return "*.dae"; }

    ------------------------------------------------------------------------------

    CSceneWalker.cpp, line 139: this is a bit nasty, since it does not check to see if the invisible node has an effect on the scene data. For example, create a simple skinned mesh, then set the bones "isVisible" flags to false. The skin cluster will save out references to the invisible bones, however those bones will not be present in the DAE file since the exporter skips them.

    ------------------------------------------------------------------------------

    The exporter fails to save out animation for identical rigs imported into a scene and animated. It seems to remove the "model1:" & "model2:" prefixes to imported data, so when re-importing it gets confused by there being 2 "root" bones in a scene. I've not had a chance to find the exact bits of code as yet.

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    Feeling Software, Montreal, Quebec
    Posts
    111
    Hi Rob,

    Thanks for the suggestions. I'm going to fix these tomorrow, before the next Weekly Development Build release.

    About MEL, I'll verify, but there are a few places were we use MEL because Maya 5.0 didn't have an API that was as developed as Maya 7.0. I'll check to make sure, though, with respect to the UI units.

    Sincerely,
    Guillaume Laforte
    Feeling Software Inc
    http://www.feelingsoftware.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •