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

    Clear global cache

    Cinema 4D SDK
    c++ r23
    2
    5
    5.1k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      giveforfree
      last edited by giveforfree

      Hi,

      I'm developing a c++ plugin, for c4d r23, to render multiple images.
      I'm using octane renderer.
      But every like 15 images octane and c4d crashes.
      When i'm doing it "manually", one by one, I can use the clear cache button from the picture viewer and it does the tricks but i can't seem to find a way to do it programmatically in the SDK.

      Is there any way to clear the global cache with the API ?

      Thanks in advance.

      EDIT:
      I'm writing in c++

      ferdinandF 1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand @giveforfree
        last edited by ferdinand

        Hello @giveforfree,

        welcome to the Plugin Café and thank you for reaching out to us.

        Almost all things that have an icon and/or a menu entry in Cinema 4D are realized as commands. Commands can be invoked with CallCommand and discovered in multiple ways. One of the more convenient methods is the Command Manger in Cinema 4D, which will also tell you the identifier of a command.

        command_manager.png

        So, you can invoke the "Clear Caches" command of the Picture Viewer with CallCommand(465001715). For many integer identifiers, Cinema 4D also does provide symbols. The workflow is then to grep the Cinema 4D resource folder for such symbol, using the integer identifier. However, in this case no such identifier does exist, and you must use the raw integer value instead.

        Cheers,
        Ferdinand

        MAXON SDK Specialist
        developers.maxon.net

        1 Reply Last reply Reply Quote 0
        • G
          giveforfree
          last edited by

          Hi @ferdinand

          Thank you for your answer and your welcome 🙂

          It seem to be exactly what i'm looking for.
          I'm going to try it and i'll tell you the outcome when i'm done.
          Is it, by any chance, possible to check all the commands in the documentation ?

          Thanks again.

          ferdinandF 1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand @giveforfree
            last edited by ferdinand

            Hello @giveforfree,

            well, there is the Command Manger of Cinema 4D as shown in my first posting. But no, unlike for many other identifier types, there is no dedicated (call) command identifiers documentation in the manuals. Documented are some of the special command categories, e.g., MCOMMAND, but these special categories are all not invoked with CallCommand but special methods as SendModelingCommand, SendPainterCommand, or CallUVCommand.

            There is usually not much to document for call commands as there are no input arguments for them. There are also thousands of such commands and inserting them into the documentation would not yield much benefit, since most of them do not have symbols and must be called by their integer plugin identifier.

            Cheers,
            Ferdinand

            MAXON SDK Specialist
            developers.maxon.net

            1 Reply Last reply Reply Quote 0
            • ferdinandF
              ferdinand
              last edited by

              Hello @giveforfree,

              without any further questions and other postings, we will consider this topic as solved and flag it as such by Friday, 17/06/2022.

              Thank you for your understanding,
              Ferdinand

              MAXON SDK Specialist
              developers.maxon.net

              1 Reply Last reply Reply Quote 0
              • First post
                Last post