- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
so I've implemented this api command that uses mfnCamera and plugs to modify the camera's transform.
It's implemented as an mpxcommand and i do not use dgmod's doit in the doIt()
In fact I want the command to be non-undoable, however as we know:
"Any command that manipulates the state of the Dependency Graph and its nodes, including the DAG, should implement MPxCommand::undoIt() and MPxCommand::isUndoable(), ..."
Also:
"Only commands that query the scene or do not modify it in any way should be non-undoable. If you create a non-undoable command that modifies the scene, it will break Maya's undo capability."
(from Maya help about undo)
These are seemingly clear rules, but since Maya also allows to disregard camera undo from within the preferences I wonder if there's maybe a finer line than that.
I don't recall ever experiencing stability issues from changing a couple attributes on node's here and there but to be fair I wouldn't attempt this on something like mesh modifiers.
So where's the line? Can I implement my camera command without undo at all?
Does maya have a special undo for camera related actions that isn't exposed in the api?
Thank you for your input,
Nicolas
Solved! Go to Solution.