Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 04/03/2005 at 10:06, xxxxxxxx wrote:
User Information: Cinema 4D Version: 8.0+ Platform: Windows ; Mac ; Mac OSX ; Language(s) : C++ ;
--------- I'm afraid that the answer may already be given for this, but I'll ask nonetheless.
My current plugin creates a PluginMaterial with a GeDialog for editing a tree of nodes (my classes). I want to add cut/copy/paste (which shouldn't be too difficult to implement from scratch) and undos/redos (a tad bit more difficult). The question is this: is there any way to use C4D's similar facilities on my own class objects, underived from any of C4D's?
I see that UndoAdd() takes a void*, so I am uncertain whether this is general for any class instance or only good for C4D objects inserted into BaseDocuments. Honestly, I don't see a way to base the nodes off of any undoable C4D object (object, tag, shader, material, key, track, etc.) and not insert them into a document - which is not the intent. The nodes only exist within the ShaderTree, itself only within the PluginMaterial.
Well, I hope that makes some sense and can yield a response.
On 04/03/2005 at 10:12, xxxxxxxx wrote:
Undo/Redo should be easy if you store your data within the host object, e.g. the PluginMaterial. Then you can just add UNDO_CHANGE undos for the PluginMaterial whenever the user changes anything. For Cut/Copy/Paste I don't think there's any way to use the built-in functions.