Hi Manuel,
thanks a lot for helping me in this case. It's quite interesting for me and maybe also helpful for someone in this forum.
I'm absolutely satisfied with this solution, it works like a charm...
Greetings and best wishes
Christian
Hi Manuel,
thanks a lot for helping me in this case. It's quite interesting for me and maybe also helpful for someone in this forum.
I'm absolutely satisfied with this solution, it works like a charm...
Greetings and best wishes
Christian
Hello Ferdinand,
thank you for answering me and deal with the topic. It's true it isn't solved yet. The console output is quite interesting. I'll waiting for Manuel and hopefully he has an idea or having some time for debugging. After his vacation he'll build up new energy.
Cheers and many thanks,
Christian
Hi Manuel,
did you see the new testfile c4d-R25-token example.c4d without using XPresso and specials characters like \ /)?
I don't use any special characters any longer but nevertheless it don´t update the filenames. Each frame are named like the first on. In this example Red0000.tif, Red0001.tif, Red0002.tif
The expected output should be Red0000.tif, Green0000.tif, Blue0000.tif ... possibly I misunderstood something or it's not possible to realize it like my thought. Maybe you could look over again?
Much obliged Christian
Hi Manuel,
thank you for your quick reply.
I prepared a new test scene according your hints and did some tests but my filename won't be updated. For some reason it don´t work. Maybe I have to work completely different.
the new token code:
import c4d
def PythonUserdataToken(data):
obj = data[0].SearchObject('Output')
if obj == None:
return None
else:
if obj.GetName() == 'Output':
for ids, bc in obj.GetUserDataContainer():
if bc.GetString(c4d.DESC_NAME) == "Filename":
filename = obj[c4d.ID_USERDATA, ids[1].id]
return filename
else:
return None
if __name__=="__main__":
for registeredToken in c4d.modules.tokensystem.GetAllTokenEntries():
if registeredToken.get("_token") in ["PythonUserdataToken"]:
exit()
c4d.plugins.RegisterToken("PythonUserdataToken", "get userdata of Listcontrol", "UserData", PythonUserdataToken)
maybe you can look again...
Cheers,
Christian
Hello,
I switched from R21 to the new C4D R25.010 and trying to get my projects to work.
Unfortunately my Xpresso Setup to update filename each frame during rendering animation don´t work. I tried to solve the problem with custome render tokens like the token $frame. This one work as a charm. I wrote this little skript but my filename don´t update. May someon of your guys can give me a hint? I found a post with take System but my problem seams a bit differnt.
I searce for the obj ">>>Listcontrol<<<" and the UserData "Dateiname_Render" and return the value for the token:
import c4d
def PythonUserdataToken(data):
obj = data[0].SearchObject('>>>Listcontrol<<<')
if obj == None:
return "None"
else:
if obj.GetName() == '>>>Listcontrol<<<':
for ids, bc in obj.GetUserDataContainer():
if bc.GetString(c4d.DESC_NAME) == "Dateiname_Render":
filename = obj[c4d.ID_USERDATA, ids[1].id]
return filename
if __name__=="__main__":
for registeredToken in c4d.modules.tokensystem.GetAllTokenEntries():
if registeredToken.get("_token") in ["PythonUserdataToken"]:
exit()
c4d.plugins.RegisterToken("PythonUserdataToken", "get userdata of Listcontrol", "UserData", PythonUserdataToken)
My solution in R21 was a simple XPresso Setup with a python node. But her is the issue the same. Unfortunately the file name won't be actualized during rendering
import c4d, os
def getframe():
frame = doc.GetTime().GetFrame(doc.GetFps())
return frame
def main():
global output
filename = ['File_RENDER-0001','File_RENDER-0002','File_RENDER-0003']
join = os.path.join(path,filename[getframe()])
output = join
I attached a test file. Hoping someone have some experience with this kind of setup and can help me
So long! Christian