Saving an FBX File with Referenced Objects
You can save an FBX file that contains referenced objects. You can choose to save or not to save the reference edits.
For example, consider that you are about to save a scene that contains a reference object named NS after performing some operations on the referenced items. You can choose to save or not to save the reference edits by setting the FileReferenceEdit
attribute on FBFbxOptions
. In the following code, the reference edits in the scene are saved because the FileReferenceEdit
attribute is set to True.
lOptions = FBFbxOptions(False)
lOptions.FileReferenceEdit = True
FBApplication().FileSave( {SceneFilePath}, lOptions )
Another attribute named FileReference
controls whether the file reference objects are loaded or saved. In the following code, the file reference objects contained inside the scene file are not loaded because the FileReference
attribute is set to False.
lOptions = FBFbxOptions(True)
lOptions.FileReference = False
FBApplication().FileOpen( {SceneFilePath}, False, lOptions )