Ok, I ran into the issue of polling the BatchRender.IsRendering. I don't have the python skills to do multi-threading to check when a render is complete. I was able to hack in a time.sleep function but it is very problematic for longer renders and crashes a lot.
Instead I went the route of Takes though Take are a bit cumbersome to setup but it is working nicely. I'll post the code here for anyone looking to do something similiar. I can just RenderAllTakes command and get each object rendered with its name using a $Take render token.
def main():
doc = c4d.documents.GetActiveDocument()
inEx = op[c4d.ID_USERDATA,4] # In/Exclude User Data
for i in range(0 , op[c4d.ID_USERDATA,4].GetObjectCount()): #Iterate through each shot based on our shot slider in user data
activeObj = inEx.ObjectFromIndex(doc, i) #deterimine which object is active
if op[c4d.ID_USERDATA,1] == i:
activeObj[c4d.ID_BASEOBJECT_VISIBILITY_EDITOR] = False #turn visibility On
activeObj[c4d.ID_BASEOBJECT_VISIBILITY_RENDER] = False
render_filename = inEx.ObjectFromIndex(doc, i).GetName() #Gets the name of the currently active object
op[c4d.ID_USERDATA,5] = render_filename
else:
activeObj[c4d.ID_BASEOBJECT_VISIBILITY_EDITOR] = True #turn visibility Off
activeObj[c4d.ID_BASEOBJECT_VISIBILITY_RENDER] = True
c4d.EventAdd()
################ SEND ALL
def BuildTakes():
#Sequencer()
takedata = doc.GetTakeData()
obj = doc.GetActiveObject()
#print( Description.GetParameterI(op[c4d.ID_USERDATA,1], ar=None))
inEx = op[c4d.ID_USERDATA,4] # In/Exclude User Data
for i in range(0,op[c4d.ID_USERDATA,4].GetObjectCount()):
#Sequencer()
take = takedata.AddTake(inEx.ObjectFromIndex(doc, i).GetName(), None, None)
take.FindOrAddOverrideParam(takedata, obj , c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA, c4d.DTYPE_SUBCONTAINER, 1),c4d.DescLevel(1)), i , backupValue=None, deleteAnim=False)
take.FindOrAddOverrideParam(takedata, inEx.ObjectFromIndex(doc, i), c4d.ID_BASEOBJECT_VISIBILITY_EDITOR, False, backupValue=None, deleteAnim=False)
take.FindOrAddOverrideParam(takedata, inEx.ObjectFromIndex(doc, i), c4d.ID_BASEOBJECT_VISIBILITY_RENDER, False, backupValue=None, deleteAnim=False)
#op[c4d.ID_USERDATA,1] = 0
#Sequencer()
#c4d.MSG_DESCRIPTION_CHECKUPDATE
#Sequencer()
#c4d.EventAdd()
def ClearTakes():
tk = doc.GetTakeData()
tk.ResetSystem()