Save Project

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 03/06/2007 at 18:59, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   9.6+ 
Platform:      
Language(s) :

---------
Hi all,

How i can detect that a scene is saved in a project?
I suppose that must be check in the NODEDATA::write.
I need to copy all IES light files in the project folder when saved.

Thanks in advance
Renato

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 04/06/2007 at 04:55, xxxxxxxx wrote:

BaseDocument::GetDocumentPath() can be used to determine if the scene is/has been saved to disk. If not, the Filename is empty:

if (!doc->GetDocumentPath().Content()) GePrint("Unsaved Document");

Don't know if there is a means to determine if saved as a project into a folder. But the files should be local to the .c4d document if saved either way.

Hth,

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 04/06/2007 at 06:38, xxxxxxxx wrote:

Thanks Robert,

so i can put in write a copy for these files in the documentpath 🙂

Thanks
Renato

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 04/06/2007 at 08:06, xxxxxxxx wrote:

Hi All,

this code seem to work.. except that the doc path is the older path and not the new path.
How can i get the saved path?

Filename docpath = hf->GetDocument()->GetDocumentPath();
BaseContainer     *data = ((BaseObject* )node)->GetDataInstance();
myIesFile = data->GetFilename(VRAYLIGHTTAG_IES_FILE);
docpath = docpath + myIesFile.GetFile();
GeFCopyFile(myIesFile,docpath,FALSE);
data->SetFilename(VRAYLIGHTTAG_IES_FILE,docpath);
return TRUE;

cheers
Renato

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 04/06/2007 at 10:25, xxxxxxxx wrote:

What do you mean by 'older path' and 'new path'? Are you trying to do this *while* saving the document? That's gonna be difficult as DocumentPath probably hasn't been updated yet - probably after the save is complete.

The only other possibility is the MSG_DOCUMENTINFO sent when a document is loaded, saved. Check the docs for that one.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 04/06/2007 at 10:29, xxxxxxxx wrote:

Thanks Robert,
i'll do 🙂

Cheers
Renato