On 28/03/2013 at 02:12, xxxxxxxx wrote:
Hey guys,
I'm trying to save the ACTIVE scene, not a copy of it with the following code:
_<_t_>_
doc = c4d.documents.GetActiveDocument()
if doc.GetDocumentPath() == "":
filePath = doc.GetDocumentPath()
if c4d.documents.SaveDocument(doc, doc.GetDocumentName(), saveflags = c4d.SAVEDOCUMENTFLAGS_SAVEAS, format = c4d.FORMAT_C4DEXPORT) == False:
print "File not saved"
Message = c4d.BaseContainer()
Message.SetString(0, "blabla")
result = gui.ShowPopupDialog(cd = None, bc = Message, x=700, y=700)
print result
return True
...
...
...
<_<_t_>_
It saves the document allright, but it saves a copy of it, not the actual file i'm working on. For example, If i save it in the "Save As..." Popup as PluginTest.c4d, it's being saved as that, but the file i'm working on is still called untitled 1.c4d, and if I execute the plugin again,
doc.GetDocumentPath() == ""
still returns true, hence it was not really saved.
Does anyone know what to do about it?
Thanks in advance
Aurel