Hello guys,
I wrote small script and got one problem. I can't export selected objects to separate files, after export operation i got obj files with duplicate meshes inside. Which the command do i must use for it?
import c4d
import os
from os.path import join, normpath
dirpath = "c:/usr/temp/mayablender/"
def main():
doc = c4d.documents.GetActiveDocument()
selected = doc.GetActiveObjects(0)
for ob in selected:
ob.DelBit(c4d.BIT_ACTIVE)
doc.SetActiveObject(ob)
full_dirpath = normpath(join(dirpath + ob.GetName() + ".obj"))
# export to obj
c4d.documents.SaveDocument(doc,full_dirpath,c4d.SAVEDOCUMENTFLAGS_0,1030178)
if __name__=='__main__':
main()