hohehohe2's OpenMaya tutorial     kotamuraa@yahoo.co.jp



Sup 1: undo and redo


 Command plug-in has a very important rule.

  "When a command plug-in changes a scene, you must make the command undoable/redoable"
  "When undo is executed, the scene state must be completely reverted to the previous one,
   including selection of scene objects"

To explain it why, suppose you have done two manipulations.
    -A: move a nurbs sphere.
    -B: execute a plug-in command.

If you undo them, first B is undoed, then A is undoed.
Now suppose B deleted the nurbs sphere moved by A.
If the implementation of B is bad, and "undo B" doesn't
resurrect the sphere, "undo A" cannot be done successfully
since there is no nurbs sphere to move back. Thus Maya's
undo mechanism will be destroyed.



Prev    Contents    Next


Maya is a registered trademark of Autodesk
Copyright
© 2003, Koichi Tamura. All Rights Reserved.









[PR]≪占い奇跡の恋愛術≫初回無料:幸せな結婚へ導きます。本格結婚鑑定