im facing a weird behaviour in cinema4d programming in python.
im executing on demand via python's execfile function a custom script also written in python.
This custom script imports the c4d module and does cinema 4d specific operations.
the thing is, each time i run my execfile function that executes my custom script, this custom script file gets weirdly changed!! The source code is turned into what seems to be some kind of compiled version. Here is an image of the resulting file after execution:
Ive managed to narrow the cause of this source code modification to the method:
c4d.documents.SaveDocument(active_doc, file_path, c4d.SAVEDOCUMENTFLAGS_0, c4d.FORMAT_C4DEXPORT)
if i comment this method call and leave the rest of my custom script untouched the source file remains unchanged. So i think its pretty clear this method is doing something weird under the hood.
Can someone spot what's going on?
Im using Cinema 4D R19.
Thanks in advance