SOLVED Enabling Team Render in Render Queue

Hi- I have a python script that adds projects to the render queue successfully but now I'd like to be able to enable the Team Render option for them. After reviewing the documentation I felt like BatchRender.SetUseNet(self, n, on) was going to be the answer but I havn't been able to get it to work.

In the main body of the script I set dBatch = c4d.documents.GetBatchRender().
Later in the script I call batchRender definition.

def batchRender(dFilePath, objName):
    dBatchCount = dBatch.GetElementCount() #number of items already in the batch render
    dBatchCount += 1
    dBatch.AddFile(dFilePath +"/" + objName + ".c4d", dBatchCount)
    ####enable Team Render for item
    dBatch.SetUseNet(dBatchCount,True)

The script doesn't return any errors but the Team Render box is never activated.

c73ee49b-3898-4e8e-9d52-88713b6560af-image.png

Any insight is appreciated.

Thanks,
.del

Hi,

For now, it look more like a bug. I need to figure out why before creating a bug entry.
I found out that if you add the files first and after in another loop enable them to use teamrender, it works a lot better.

Could you please check if it could fix your issue?

for index, file in enumerate(c4dFiles):
           br.AddFile(file, br.GetElementCount())
   
       for index in range(0, br.GetElementCount()):        
           br.SetUseNet(index, True)

cheers,
Manuel

Thanks Manuel. I was able to work that concept into the overall script.