Announcement

Collapse
No announcement yet.

VRay FBX Importer not working

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • VRay FBX Importer not working

    I'm trying to use the SpeedTree VRay importer for Maya. It worked previously, but isn't working now for no reason I can discern.
    My step are:
    Open blank scene.
    Go to plugins and ensure fbx, mental ray, vray, and SpeedTree FBX Importer plugins are all enabled.
    Go to Import <option box>, select SpeedTree VRay FBX importer, Click ok
    Direct Maya to exported FBX from speedtree
    Error shown in the result below (copied from script editor)

    -----

    file -import -type "SpeedTree FBX for V-Ray" -gr -ra true -mergeNamespacesOnClash false -rpr "RedDeliciousApple_Med" -pr -loadReferenceDepth "all" "V:/VTrack_LK_Projects/_2012/12_001_Qaniitara/02_Prod/scenes/3D_newPROJ/03_props/LAUNDROMAT_world/SHD/RedDeliciousFix/RedDeliciousApple_Med.fbx";
    // V:/VTrack_LK_Projects/_2012/12_001_Qaniitara/02_Prod/scenes/3D_newPROJ/03_props/LAUNDROMAT_world/SHD/RedDeliciousFix/RedDeliciousApple_Med.fbx //
    # Error: Invalid file type specified: FBX #
    # Error: RuntimeError: Error occurred during execution of MEL script
    line 1: Invalid file type specified: FBX #

  • #2
    Hi,

    The error "# Error: Invalid file type specified: FBX #" means that when our script asks Maya to import the .fbx file, it doesn't have a plugin that it thinks can do it. That being said, the first thing I tell people is make sure the .fbx plugin is loaded which you already have. Can you import an .fbx file straight from the Maya import dialog?

    Comment


    • #3
      If I specify the importer to import generic FBX not using the speedtree importer, it will work as it would normally when importing an FBX (so, without the whole VRay/MR shader auto-setup and such).
      What I find so strange is that it clearly worked for me previously. Nothing has changed that I'm aware of or can figure out.

      Comment


      • #4
        I wonder if it would be possible for me to execute the code in the VRay importer starting from the point after an FBX file has been loaded as a workaround...?

        Comment


        • #5
          Ugh.
          I thought I had it working by running the py script in the script editor, but somehow it's not working again... Argh.
          The SWA plugin has never worked for me either.
          Last edited by maxnbk; 06-13-2014, 04:49 PM. Reason: Problem unresolved

          Comment


          • #6
            Sadly I am still stuck on this.. The error for the SWA plugin is this:
            // Error: RuntimeError: Invalid object or value: //
            // Warning: Failed to call script initialize function //
            // Error: (SpeedTreeSWAImporter) //

            Comment


            • #7
              Try this one:

              SpeedTreeSWAImporter.zip

              We've fixed some path related issues that may fix the problem. Please let us know if this works!

              Comment


              • #8
                Yes, that version of the SWA importer does indeed work, at least in Maya2012. (We're testing 2012 since the docs page lists 2012 as being supported while not listing 2013, even if it in theory works fine)

                Thank you for the quick fix on that.

                We still have issues with the VRay importer, we're trying to muck around and figure it out on our own, but thus far it's the same as the issue I posted in the first post of this thread.

                Comment


                • #9
                  What happens when you execute the following commands directly from the MEL command prompt?

                  file -import -type "SpeedTree FBX for V-Ray" -ra true -mergeNamespacesOnClash false -namespace "trunk" -pr -loadReferenceDepth "all" "your_file.fbx";

                  file -import -type "FBX" -ra true -mergeNamespacesOnClash false -namespace "trunk" -pr -loadReferenceDepth "all" "your_file.fbx";

                  Comment


                  • #10
                    Same exact errors as originally posted. (I assume that I was meant to replace your_file.fbx with the path to my file.)

                    Comment


                    • #11
                      If getting this resolved is going to be complicated, I wouldn't mind getting an IM/call/skype/teamviewer session arranged if it would help to get this resolved for both of us. Normally I'd be inclined to think it was a system specific issue, but we've replicated the issue on multiple machines with multiple versions of Maya and it doesn't seem like a one-off.
                      Alternatively, if there is some way I could import an FBX the normal way, and then have some sort of entry point into the script from there to convert all the shaders over, that would be an acceptable solution. I can code, but probably not well enough to hack the script in that sort of way myself (not having written it).

                      Comment


                      • #12
                        Both of those MEL commands failed with the following error, correct?

                        # Error: Invalid file type specified: FBX #

                        Do you ever have a reason to load FBX files via MEL? Our script relies on that functionality -- we don't actually parse FBX files in the script. Is there another way to do it?

                        Comment


                        • #13
                          We're happy to load the FBX files any which way, it's completely irrelevant to our workflow. It's just that when you use the Maya dialog to import an FBX file, it reports that it executed that command and error in the script editor. I'm assuming the command it reports is 100% functionally equivalent to using the import dialog. It's just super weird that it thinks an FBX file isn't an FBX file, I can't fathom why it would think that. Perhaps it's possible for me to get a line number error and see exactly where it fails to understand logic of why and fix it that way.

                          Comment


                          • #14
                            Okay, so I discovered that it fails on line 773 of the FBX importer script, on the "mel.eval(strCommand)" script. So I put a print line beforehand to print out strCommand to see what command it was executing. The command is below.

                            file -import -type "FBX" -ra true -namespace "rename_this" -pr -loadReferenceDepth "all" "V:/VTrack_LK_Projects/_2012/12_001_Qaniitara/02_Prod/scenes/3D_newPROJ/03_props/LAUNDROMAT_world/SHD/RedDeliciousFix2/RedDeliciousApple_Med.fbx";

                            If I run this command in the script editor, it obviously fails with the identical error.
                            What I notice is that this command is not identical to the command that gets run when I import an FBX regularly, which I imagine it ought to be.
                            That command is:

                            file -import -type "Fbx" -ra true -mergeNamespacesOnClash false -rpr "RedDeliciousApple_Med" -pr -loadReferenceDepth "all" "V:/VTrack_LK_Projects/_2012/12_001_Qaniitara/02_Prod/scenes/3D_newPROJ/03_props/LAUNDROMAT_world/SHD/RedDeliciousFix2/RedDeliciousApple_Med.fbx";

                            Noticing that the major important difference is that ' -type "FBX" ' is "Fbx" instead, I take the command that was produced by the importer script, replace "FBX" with "Fbx", and I now get an FBX importer window instead of the failure message.

                            So I opened up the Python importer script, replaced the "FBX" with "Fbx" that gets incorporated into the strCommand to be evaluated, and now, the vray importer plugin, when importing, no longer gives me that error. Instead, it pops up a standard Fbx importer window, which, after hitting "Import", imports the FBX as it would with a normal FBX file, buuuttttt... Afterwards, I still only have phong-shaded materials, no VRay ones.

                            Does any of that help figure out how to get this fixed?

                            Comment


                            • #15
                              It does help. Are you using an fbx loader other than the one that ships with Maya by any chance? Also, what platform are you running on? You mentioned that you have repeated this error in multiple installations and when I combine that with the fact that we haven't encountered this error anywhere else I believe there is something fundamentally different about your systems. Here's what the script does at a high level:

                              1) Asks Maya to load the .fbx file via MEL
                              2) Looks for "shapes" in each of the new objects in the scene
                              3) When it finds one, it examines the shading group connections and does the material swap

                              If the fbx loads but doesn't have the shading group configuration it expects it won't do anything. There's something different about fbx loading on your installation and we need to figure it out!

                              Comment

                              Working...
                              X