GetClone creates a take from a source take but its overrides are linked to source take. if I remove overrides from cloned take, original take's overrides also deleted. Is this a bug or GetClone produces a kind of instance object with linking to source object? How can I fix this? How can I break them from the source take?
- open attached c4d doc
- select Sphere take
- run this script
- script will clone sphare take under main take. Newly cloned take have 2 overrides: 1) for X location and 2) for layer properties.
- activate newly cloned Sphere take
- activate AutoTake and Lock Override buttons
- change Sphere's X location and/or sphare layer visibility values
- you will see that c4d will add another override lines under already existent overrides
import c4d # Script clones selected take to under Main Take # AliasTrans did not work #trans = c4d.AliasTrans() #if trans is None or trans.Init(doc) is False: # return False #clonedTake=selectedTake.GetClone(c4d.COPYFLAGS_0) #trans.Translate(False) def main(): takeData = doc.GetTakeData() mainTake=takeData.GetMainTake() selectedTake=takeData.GetTakeSelection(0) doc.StartUndo() doc.AddUndo(c4d.UNDOTYPE_CHANGE, mainTake) clonedTake=selectedTake.GetClone(c4d.COPYFLAGS_0) clonedTake.InsertUnder(mainTake) doc.EndUndo() c4d.EventAdd() #gui.MessageDialog('Hello World!') # Execute main() if __name__=='__main__': main()