Modify FBX Exporter?
-
Hi,
I have a problem in Cinema4D where it converts periods into underscores upon FBX export.
You can see an illustration of the problem here:
https://www.dropbox.com/s/newsmvxv2fdhbsx/c4d085_cinema_fbx_export_convert_problem.jpg?dl=0Previously, I initially shrug it off but currently I'm working with a pipeline that requires proper naming convention. As such, I need to have it as periods and not as undercores?
So far what I have is a modified code from the
OBJ exporter
sample file. See below.
However, I am still no clue where to investigate the unusual conversion of "." to "_"
I did check theFBXexport.res
file in the installation directory but it mostly offers booleans parameter/arguments.Is there a way around this?
Thanks
import c4d from c4d import documents, plugins, storage #Author: Joey Gaspe #OBJ export settings example def main(): # Get OBJ export plugin, 1030178 is its ID plug = plugins.FindPlugin(1030178, c4d.PLUGINTYPE_SCENESAVER) if plug is None: return # Get a path to save the exported file filePath = c4d.storage.LoadDialog(title="Save File for OBJ Export", flags=c4d.FILESELECT_SAVE, force_suffix="obj") if filePath is None: return op = {} # Send MSG_RETRIEVEPRIVATEDATA to OBJ export plugin if plug.Message(c4d.MSG_RETRIEVEPRIVATEDATA, op): print op if "imexporter" not in op: return # BaseList2D object stored in "imexporter" key hold the settings objExport = op["imexporter"] if objExport is None: return # Define the settings # Example of OBJ export settings from the UI: objExport[c4d.OBJEXPORTOPTIONS_TEXTURECOORDINATES] = True objExport[c4d.OBJEXPORTOPTIONS_MATERIAL] = c4d.OBJEXPORTOPTIONS_MATERIAL_MATERIAL # objExport[c4d.] = # export without dialogs if c4d.documents.SaveDocument(doc, filePath, c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, 1030178): print "Document successfully exported to:" print filePath else: print "Export failed!" c4d.EventAdd() if __name__=='__main__': main()
-
Hello @bentraje ,
I'm afraid this is hard coded and there's no option to avoid this. The rename have been added to fix a bug with Maya and XSI. ("same base name is causing issues in Maya and XSI")
You can try to export the fbx in a text format (this is an option) and to rename back every object in the file. I know it's far to be ideal but for now, i have nothing else in mind.
Cheers
Manuel -
@m_magalhaes
Thanks for the clarification. Yes, I guess the text format will be an alternative for now.Have a great day ahead!
-
hello,
can we consider your issue as "solved" ?Cheers
Manuel -
Sure sure we can label at as solved at the moment.
Thanks again for the help!