Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. nason
    N
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 6
    • Best 0
    • Controversial 0
    • Groups 0

    nason

    @nason

    0
    Reputation
    2
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    nason Unfollow Follow

    Latest posts made by nason

    • RE: Cutome Render Token do not update Filename each Frame

      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

      posted in Cinema 4D SDK
      N
      nason
    • RE: Cutome Render Token do not update Filename each Frame

      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

      posted in Cinema 4D SDK
      N
      nason
    • RE: Cutome Render Token do not update Filename each Frame

      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

      posted in Cinema 4D SDK
      N
      nason
    • RE: Cutome Render Token do not update Filename each Frame

      c4d-R25-token example.c4d

      posted in Cinema 4D SDK
      N
      nason
    • RE: Cutome Render Token do not update Filename each Frame

      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

      posted in Cinema 4D SDK
      N
      nason
    • Cutome Render Token do not update Filename each Frame

      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

      Screenshot 2021-11-04 171100.jpg

      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

      R25_Output_Test.c4d

      posted in Cinema 4D SDK
      N
      nason