Revert to the original version of a Polygon Object

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!

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?

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

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.