THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 29/08/2011 at 17:26, 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)
Look up the other paths (C4D_PATH_DESKTOP, etc...) you can use in the docs.
Thanks Scott, will try that asap. Ill let you know how i go.
One thing I am still struggling with is how to setup that for loop with the user data. Like where do i need to specify the ID. and where do i put 'i' for an integer list type user data setup.
Basically at the moment the user data integer list is set up so ...
0=perspec using nux's little python script tag. (Thanks mate!)
3=cam 3 etc...
can you specify a for loop where i is between a range say 1-5 for example?
I know Python integration is fairly new to c4d, but I am amazing how little true code examples there are on the net. Who can understand reading an SDK. Half of it isnt even in context. Just raw comands. And it's so brutal when it comes to debugging that somelike me has no chance to find what is wrong with the code.
One thing i can say is how surprised I am of the support you guys have given me already. I know you think im lazy for asking for code, but I guess i learn faster with examples. And reverse engineering code rather than inventing it.