Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    keep cinema4d from recalculate generator plugin while switching viewports and documents

    Cinema 4D SDK
    python r20
    2
    2
    569
    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.
    • P
      pyr
      last edited by

      i got a plugin which reduce some polygons on a provided mesh. unfortunally if i switch the viewport or switch to an other document my plugin evaluates again.

      i use a combination of GACHC and some other checks like change of a vertexmap.
      it works well if i change the current frame or other objects in the scene who has no dependencies with the plugin but like descriped above it evaluates all over again when change the scene or the view.

      is there a way to disable the unwanted refresh of my plugin and use a cached mesh which is saved in the document itself?

      1 Reply Last reply Reply Quote 0
      • r_giganteR
        r_gigante
        last edited by

        Hi Pyr, thanks for reaching us.

        With regard to the issue you reported, it looks like there's something unexpected happening that instead of returning the computed cache, regenerate and returns a new cache.

        Although it might occur that switching between documents require the generator to recreate the cache, switching between view definitively it's not supposed to happen.

        Considering that your information doesn't actually help too much in understanding how you're evaluating cache dirtiness nor what changes are you're checking in the vertexmap, could please post fragments of the code or, alternatively, try to reuse your cache dirtiness mechanism on an "simpler" plugin to see if it works reliably?

        Looking forward further comments, give best.

        Riccardo

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