Hello,
I'm making a script that converts an FBX to alembic and loads it. It does it as follows:
- Load FBX file
- Export it as Alembic
- Merge the Alembic into current scene
1 and 2 work fine, but if I try to merge the .abc file then C4D freezes.
Did I fly too close to the sun with this?
The code is something like:
filePath = c4d.storage.LoadDialog(c4d.FILESELECTTYPE_SCENES, "Choose an FBX File", c4d.FILESELECT_LOAD)
fbx = c4d.documents.LoadDocument(filePath, c4d.SCENEFILTER_OBJECTS)
"do some operations in-between"
fileFormat = c4d.FORMAT_ABCEXPORT
savePath = filePath
savePath.replace(".fbx", ".abc")
c4d.documents.SaveDocument(fbx, savePath, c4d.SAVEDOCUMENTFLAGS_DIALOGSALLOWED | c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST | c4d.SAVEDOCUMENTFLAGS_NO_SHADERCACHE, fileFormat)
"up to here it's fine, running the one below causes a freeze"
c4d.documents.MergeDocument(doc, savePath, c4d.SCENEFILTER_OBJECTS)
Also, do I need to use KillDocument() for the original FBX which I loaded?
Thanks!