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
    • Recent
    • Tags
    • Users
    • Login

    Revert to the original version of a Polygon Object

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 325 Views
    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.
    • H Offline
      Helper
      last edited by

      On 15/03/2014 at 17:31, xxxxxxxx wrote:

      Hi, first post here:

      Is there any way to store a copy of the original unmodified mesh that can be reverted to at any point?

      The basic outline of my Python setup is this:

      Plane object, coverted to an editable object.  Python Expression tag added to it.  The python expression does some cuts/subdivs via SendModellingCommand()..

      What i`d like is basically to be able to revert to the original unmodified object/mesh on-the-fly if possible..

      Ultimately, the SendModellingCommand operations are altering the mesh based on the position of another object in the scene, so ideally it would constantly refresh and re-do the operations from scratch based on the updated position of the other object.

      Not sure if this makes any sense.  Ive looked at trying to grab a cache of the op but cant quite get that working.  Any help appreciated!

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 16/03/2014 at 04:46, xxxxxxxx wrote:

        Sorry i`m new to Python etc in C4D..

        I think what i need is to look into creating an ObjectData plugin - is that right?

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 22/03/2014 at 05:12, xxxxxxxx wrote:

          A tag modifying the structure of a Polygon Object is not recommended as the approach is very destructive.
          An ObjectData plugin, more specifically a deformer, might be more appropriate. You would not even need
          to store the mesh yourself, turning off the deformer is enough.

          Best,
          -Niklas

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 22/03/2014 at 08:14, xxxxxxxx wrote:

            Yep i figured that out eventually thanks again Niklas!

            Python for C4D def needs more/better reference and documentation it`s a bit of a minefield at first.

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