ragdoll-maya
ragdoll-maya copied to clipboard
Exception in ragdoll.commands breaks undo
from ragdoll import commands as ragCmds
# calling with wrong arguments/types to cause exception
group = ragCmds.create_group("test")
Trying to undo in maya results in:
// Error: line 1: Undo is temporarily unavailable. Try exiting the current tool. //
Calling cmds.undoInfo(closeChunk=True) seems to solve the issue.
Is this a bug or is it deliberately left to the TDs to validate their inputs?
To expand, AssertionErrors are not affected by this and do NOT break undo
Upon further testing, this might not be related to commands but to exceptions raised within the cmdx.DagModifier?
Yes, I believe you are right. It shouldn't happen, the modifiers are explicitly protected against this here:
https://github.com/mottosso/ragdoll/blob/b959b76b2984c405c60be22ea24549e6b0d9cea4/ragdoll/vendor/cmdx_ragdoll.py#L5776
But I have also seen this. It is not deliberate and could be considered a bug. Happy to accept a PR if you manage to find a solution.