Buexe
01-15-2009, 07:00 AM
Hi,
I would like to create a command that supports undo/redo. Now generally, MDagModifier would be a good idea I guess and I have successfully created one except for the fact that I didn`t find a way to specify single values for the MFnNummericData Function set, so I use a MEL string with a "setAttr" in it. The same goes for adding keyframes where I use "setKeyframe" for the MDagModifier::commandToExecute thingy. This works okay, but since it can easily happen that I need to set Attributes on a couple of hundred Attributes at once, this mechanism is a little bit slow ( takes a few seconds to execute ). Would it be a better idea to store/restore all the attribute values "manually" ( w/o relying on the MDagModifier ) in my command even if it means more labour for me, or does someone here have a better Idea for a fast undo/redo for lots of attribute valus changed and keyframes added?
Thanks in advanced,
buexe
I would like to create a command that supports undo/redo. Now generally, MDagModifier would be a good idea I guess and I have successfully created one except for the fact that I didn`t find a way to specify single values for the MFnNummericData Function set, so I use a MEL string with a "setAttr" in it. The same goes for adding keyframes where I use "setKeyframe" for the MDagModifier::commandToExecute thingy. This works okay, but since it can easily happen that I need to set Attributes on a couple of hundred Attributes at once, this mechanism is a little bit slow ( takes a few seconds to execute ). Would it be a better idea to store/restore all the attribute values "manually" ( w/o relying on the MDagModifier ) in my command even if it means more labour for me, or does someone here have a better Idea for a fast undo/redo for lots of attribute valus changed and keyframes added?
Thanks in advanced,
buexe
