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. NibblingFeet
    N
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    NibblingFeet

    @NibblingFeet

    0
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    NibblingFeet Unfollow Follow

    Latest posts made by NibblingFeet

    • RE: Getting Current Render Frame

      Hi @m_adam thanks for the response. I did go through this but it doesn't seem to work for the following reasons:

      1. When I run the script everything gets frozen until the render is complete - I can't even see the progress of the renders as it goes through the frames
      2. Somehow progress callback doesn't work if I use an external engine - I am using Octane Renderer, so I'm assuming this documentation only applies for the internal render of C4D? I can see in the normal consol Octane is shooting out info about the renders including time and current frame etc - Is there a way to directly grab that information somehow?

      Maybe I am looking at the wrong direction? Maybe I should be looking at Octane documentation and how to grab info from its terminal?

      Apologies for the somewhat silly assumptions and questions - I am very new to all of this!

      Thanks in advance

      posted in Cinema 4D SDK
      N
      NibblingFeet
    • RE: Getting Current Render Frame

      Hi @m_adam ,

      Thanks for reaching out - I tried to look through the linked document but I couldn't seem to output any render information.
      Below is the python code I am using - I am essentially making a thread to check while it is still rendering, and the moment it's complete it will continue the script. I would now like to make a callback for everytime a frame is done rendering, and how long it took to render it, etc

      import c4d
      import os,time,_thread, datetime
      
      def isRendering(time,os) :
      
          RenderData = doc.GetActiveRenderData()
          FrameStart = RenderData[c4d.RDATA_FRAMEFROM].GetFrame(doc.GetFps())
          FrameEnd = RenderData[c4d.RDATA_FRAMETO].GetFrame(doc.GetFps())
      
          while c4d.CheckIsRunning ( c4d.CHECKISRUNNING_EXTERNALRENDERING ) :
              #print(c4d.RENDERRESULT_OK)
              time.sleep(1)
      
          print("render complete.")
      
      
      def main() :
      
          c4d.CallCommand(12099) #Render To PV
      
          if c4d.CheckIsRunning ( c4d.CHECKISRUNNING_EXTERNALRENDERING ) :
              _thread.start_new(isRendering,(time,os))
      
      if __name__=='__main__':
        main()
      
      posted in Cinema 4D SDK
      N
      NibblingFeet
    • Getting Current Render Frame

      Hello,

      I am trying to write a script to be able to read the progress of a render. I would like to be able to output the frame number that the current render is on. I just need to be able to output it into the console - the rest I can figure out.

      I basically already have code that listens to if the render is starting and complete - now I would like to have interval console outputs whenever a new frame is being rendered.

      I looked into the python syntaxes but I couldn't get anything useful!
      Anyone know how to solve this??

      Thanks in advance!

      posted in Cinema 4D SDK
      N
      NibblingFeet