@m_adam Thanks for your help. Apologies for not following the rules. I'm struggling with the rules of Python at the moment so it's not surprising! Will try to be a better poster in future.
Posts made by davidtodman
RE: Create New Take Using Python
Out of interest - How did you learn C4D Python? I can't find any ground up courses or tutes. They're either too advanced for beginners or so basic they just show you how to drag and drop commands from the script log.
I've already taken a general python course. But I find the structure of C4D python baffling and need some help understand the basic structure of data in the program.
Create New Take Using Python
I'm very new to C4D python and am having trouble doing the simplest thing. Eventually I want to create a script that controls quite a few things related to Takes. However, my first baby step is simply to create a new Take and add it to the list.
My first attempt seems to work but when I right-click my new take I cannot delete it and certain behaviours crash C4D! Can someone tell me what I am doing wrong, as I've copied most of this script from a Cineversity script that seems to behave just fine.
def main(): td = doc.GetTakeData() pt = td.GetMainTake() ct = td.SetCurrentTake(pt) nt = td.AddTake("",pt,pt) td.InsertTake(nt,pt,2) td.SetCurrentTake(nt) nt.SetName("My Take") c4d.EventAdd()
Any help is much appreciated.