Situation
You're exporting a SketchUp file to one of these formats: FBX, OBJ, 3DS, VRM, or XSI. On the Windows platform your export fails with a blank dialog box. On a Mac you get an error message like "SketchUp SDK error: An error has occurred resulting in an invalid output file..."
Cause
Most likely this problem is caused by materials based on images that have no extension. For example, your material may be based on an image named "brick" rather than "brick.jpg" or "brick.png"
Solution
To resolve this error you'll need to identify which materials in your file are missing extensions and either remove or fix them. This can be difficult in models with many textures, so you may want to follow the Ruby steps below to identify the offending materials:
- Browse to the Window > Ruby Console, which will open the Ruby Console
- Copy and paste the following line into the Ruby Console:
Sketchup.active_model.materials.each {|m| puts "\n" + m.display_name if (not m.texture.nil? and not m.texture.filename.include? "." )}
- Press the Enter key. if you have any materials in your model that are based on textures that have no file extensions, the names of the materials will be printed in the Ruby Console and you should do the following with each of them:
- Go to Window > Materials to open the Materials dialog.
- Click on the Home button to view your In Model materials.
- Either delete the materials printed from the Ruby command or fix them to have valid file extensions
On the PC, click Details button > List view to view your materials by name, which will make it easier to find them.
If you want to fix your materials to have valid file extensions, here are some suggested steps:
- Select the first problematic material in your Materials browser.
- Right click and choose Export texture image and export the texture to your desktop, making sure it has a valid file extension like “my_texture.jpg”
- Click the Edit tab of the Materials browser.
- Click the Browse button under the “Use texture image” section and browse to the texture you exported in step two.
- Click the Open button. Your material should now be based on a texture that has a file extension.
- Repeat steps 2-5 with any other materials that are missing file extensions.
- Try exporting again; the export should be successful.
- Select the first problematic material from the Materials browser.
- Right-click and click Edit... This will open the texture tweaker on the bottom.
- Click the Edit texture image with external editor button (i.e. the brown cube with the orange arrow) and the image will open with your default image editing program, which will probably be Preview.
- Assuming that the image was opened in Preview, click File > Save As or File > Export and save the image to your Desktop, making sure it has a valid file extension like “my_texture.jpg”
- Back in SketchUp, double-click on the same material in the Materials browser to expand the texture tweaker again.
- Click the Texture drop-down menu and select Load.
- Browse to your Desktop and select the image you saved in step 4.
Note: in the texture tweaker area, the name will still appear to be missing the file extension as the Mac does not show file extensions.
- Repeat steps 2-5 with any other materials that are missing file extensions.
- Try exporting again; the export should be successful.