THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 18/01/2007 at 04:22, xxxxxxxx wrote:
Cinema 4D Version: R 10
Platform: Windows ;
Language(s) : C++ ;
I'm new here and just started looking into the SDK. I have many questions starting with this one.
I have been playing around alittle with tags, letting them modify the host object. I'd like to be able to undo these changes and therefore i tried this from within Execute(...) of my tag plugin:
// translate or rot or somth.
The thing is that all undo method calls fail.
What are the criterions for StartUndo and the other fellows to be successful?
I haven't really gotten the feeling yet, for where and when things are to be done in the C4D SDK and i'd really appreciate some pointers.
On 18/01/2007 at 06:34, xxxxxxxx wrote:
there is no real criterion. It also works here just fine. I have no clue what the problem may be, I have never had this problems within 5 years of plugin development for c4d.
On 18/01/2007 at 06:41, xxxxxxxx wrote:
Well, I think I got it now. Maybe I was trying somthing stupid :-).
I was trying to let a checkbox in AM trigger StartUndo.
It fails as long as I hover the AM but succeeds when I click somewhere in the scene.
Thanks for your answer.
On 23/02/2007 at 17:08, xxxxxxxx wrote:
Hmmm, correct me if I'm wrong but I think if you use StartUndo() within an Execute(), you're actually nesting a StartUndo() within another StartUndo() because there is already one active before it gets to the Execute() function. At that point I think all you have to do is use the AddUndo()
I've noticed that if you have a StartUndo() within a StartUndo(), you end up having to do 2 undos to get back where you were.