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:
Cinema 4D Version: 10.5
Language(s) : C.O.F.F.E.E ;
---------Why would the constructor of my expressionplugin tag be called when I 'undo' in C4d?
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.
but I don't understand why, and I feel like I might need this undo stuff
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.
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
On 04/04/2008 at 06:27, xxxxxxxx wrote:
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(
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.
On 04/04/2008 at 07:29, xxxxxxxx wrote:
Maybe you can give us a little insight on what you are trying to achieve?