I tried to export the OBJ file using c4d.documents.SaveDocument(). The return value always be true, but I cannot find the exported file.
I can reproduce this issue using the script from the official repository:
This issue only appears in Cinema 4D R23, and I also found that the API works after I export an OBJ file using GUI. If I reset the user data by deleting the preferences folder, it doesn't work again.
Cinema 4D version: R23.110
System: macOS 11.2.3
you have to add this line if you don't want animated object.
At least for now, I'm going to check with the devs if it's our code (conditions) or the "default" parameters that are missing
objExport[c4d.OBJEXPORTOPTIONS_ANIMATION_TYPE] = c4d.OBJEXPORTOPTIONS_NO_ANIMATION
or one of those if you want animation :
can be on of those if animation is wanted.
objExport[c4d.OBJEXPORTOPTIONS_ANIMATION_TYPE] == c4d.OBJEXPORTOPTIONS_ALL_ANIMATED_FRAMES
Thank you so much for the help! The script works fine after adding this line.