undo



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2008 at 13:10, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.5 
    Platform:      
    Language(s) :   C.O.F.F.E.E  ;

    ---------Why would the constructor of my expressionplugin tag be called when I 'undo' in C4d?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2008 at 13:39, xxxxxxxx wrote:

    I commented out the undo stuff I had in the execute function of the espressionplugintag and now it doesn't call the constructor when undoing.

        
        
        SplineNull::Execute(doc, op)  
        {  
         //pDoc->StartUndo();  
         //pDoc->AddUndo(UNDO_OBJECT_REC,op);  
         //pDoc->EndUndo();
    

    but I don't understand why, and I feel like I might need this undo stuff



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/04/2008 at 14:58, xxxxxxxx wrote:

    In general, Undo will only make sense for MenuPlugins.
    (Push a button and something happens, didn't like it? Undo.
    (as many times back as you have set your prefs in Cinema)

    An expressionplugintag is executed each and every frame
    and, in principe, only the prev frame is "Undoable" unless you
    store each and every frame in history.

    I have not a single Undo in any of my expression plugin Tags.

    Cheers
    Lennart



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/04/2008 at 05:38, xxxxxxxx wrote:

    Thanks for the insight Lennart.  I just changed my plugin from operating as a menuplugin to operating as an ExpressionPluginTag.  After reading this I am thinking that maybe I will put all of the functionality into a menuPlugin and just call the functions from an ExpressionPluginTag so that the plug can render.  Thanks Again



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/04/2008 at 06:27, xxxxxxxx wrote:

    Howdy,

    Just be careful that you don't overload the undo stack. Using AddUndo() in an expression tag's Execute() function, or any node's Execute() function can seriously overload the undo stack by adding an undo at every screen refresh, whether you're running the animation or not. Calling a function that has an AddUndo() in it, from an Execute() function has the same effect.

    This can cause a long delay every time Undo is called by the user. The user will get the "spinning mouse" until Cinema 4D has finished clearing all the accumulated undo's. :o(

    Adios,
    Cactus Dan



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/04/2008 at 06:53, xxxxxxxx wrote:

    Thanks C Dan, I'll watch for that.  Hmmmmmm  if that occurs I can't think of another option at the moment.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/04/2008 at 07:29, xxxxxxxx wrote:

    Maybe you can give us a little insight on what you are trying to achieve?

    cheers,
    Matthias


Log in to reply