Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception in ragdoll.commands breaks undo #7

Open
domrab opened this issue Jul 25, 2022 · 3 comments
Open

Exception in ragdoll.commands breaks undo #7

domrab opened this issue Jul 25, 2022 · 3 comments

Comments

@domrab
Copy link

domrab commented Jul 25, 2022

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?

@domrab
Copy link
Author

domrab commented Jul 25, 2022

To expand, AssertionErrors are not affected by this and do NOT break undo

@domrab
Copy link
Author

domrab commented Jul 25, 2022

Upon further testing, this might not be related to commands but to exceptions raised within the cmdx.DagModifier?

@mottosso
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants