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=0
Previously, 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 the FBXexport.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()