Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Save a texture

Save a texture

Anonymous
Not applicable
842 Views
2 Replies
Message 1 of 3

Save a texture

Anonymous
Not applicable

I'm parsing the textures in .fbx file with the fbxsdk using c++.
When I find that a texture has an associated image, I'd like to save it to the disk in a folder.
I have the class FbxFileTexture where I can only change the file name with: 'SetFileName' or change the relative path with: SetRelativeFileName.

I was expecting to have a 'SaveAs' or a file stream, but I did not find anything similar.

Also 'SetRelativeFileName'  and 'SetFileName' do not seem to have any effect.

 

How can I save a FbxFileTexture in a specified path ?

0 Likes
Accepted solutions (1)
843 Views
2 Replies
Replies (2)
Message 2 of 3

regalir
Autodesk
Autodesk
Accepted solution

Hi,

the FBX SDK does not offer a saving capability for image files. There is one exception: if the image files are embedded into the FBX file, when reading it, all the embedded images buffers are automatically "dumped" to disk (by default into an .fbm folder located besides the FBX file). The extraction location can be changed by specifying a path using the FbxImporter::SetEmbeddingExtractionFolder() called before the Importer::Import()

 

Note that the image files are simply dumped as is and there is no file format conversion that take place inside the FBX SDK.

0 Likes
Message 3 of 3

Jamie_Telford1
Participant
Participant

GetFileName returns the absolute file path from the FbxFileTexture and copy that using file_copy?

I've only been working with files with embedded texture thou.. 

0 Likes