THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/08/2011 at 20:50, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Here's how to Merge a .c4d file:
import c4d, os from c4d import documents def main() : doc = documents.GetActiveDocument() fn = c4d.storage.GeGetC4DPath(c4d.C4D_PATH_DESKTOP) #Gets the desktop path path = os.path.join(fn,'MyFile.c4d') #The actual .c4d file merge = documents.MergeDocument(doc, path, 1) c4d.EventAdd() if __name__=='__main__': main()
Look up the other paths (C4D_PATH_DESKTOP, etc...) you can use in the docs.
That worked and makes sense thank you.
NUX; i'm going to attempt this for loop thing now from the documentation you posted. Will let you know when i fail...:joy:.
Has anyone ever got Python to save the entire project including scene file and tex folder? 'Render Elements' does it, so i asked the creator how he did it and he said that there was no easy way. He had to gather all the information in the scene and collect files manually with his code. He basically rewrote the save project command in c4d. It was his understanding that saving a project could not be scriptable because it promts the user every time for a save path, meaning its useless for long loops etc. I would like my script to 'for loop' the scene x amount of times changing a user data entry each time, then save the entire project to it's own folder with it's name also being driven by a user data string variable.
Saving a project through Python seems to be the next hurdle for me now.