When exporting from Ruby script, a scene with textures, it does not create the texture folder and the filename inside the FBX is missing the first letter. I just do:
Aside IDs, and the texture path issue (first letter missing in the script export), all the same, and no folder with textures generated when exporting from script. The issue is with the Ruby API call, its like they use two different code paths almost.
File->Export exports properly. Homepage | SketchUp Developer says it accepts options, tho only for DAE and PDF. I’ve put anyway as in the DAE example. Also tried with true/false the last param.
Make sure your double quoted path strings are using forward slashes “/”. Back slashes "" are for escaping special characters, like a newline “\n”, a return “\r”, a tab “\t” etc.
Ok, the options thing to be set manually for a first time is a bit silly :).
I do not have any slashes in my path, its just “scene.fbx” directly set as argument of the call, as in my initial post, which gets saved in My Documents.
This is the simplest thing ever, its just a call to export, from a simple cube scene with a standard material with texture on a few faces. If anyone could try it, its just one liner, would be grateful. Just to confirm its a bug or not.
Doesnt work for me, purged the stuff in Model Info, set the path as you showed, same results. Actually with your path string doesnt export even the fbx file at all…
Something is strange here.
If I copy-paste Sketchup.active_model.export "scene2.fbx", false in the ruby console it exports a scene to the documents folder but without a sub-dir with the textures.
If I change the line to Sketchup.active_model.export "d:\\tmp\\scene2.fbx", false it does create a sub-dir with the textures.
hey! thanks maxB, that’s right, might be something related to windows security… or path parsing, dont know…
but its a temp solution to save to a shorter path or another drive. Still, there is a bug.
What permissions are set for this problem ‘Documents’ folder ?
Use Properties > Security and ensure that everyone listed has ‘full control’ - read/write/modify permissions…
You can also try using: Dir.chdir(path_to_some_directory)
before you then export just using the file-name, with the appropriate file-type suffix.
It should save the file to the current directory - to check what that is use Dir.pwd