Skip to content

DGModifier.disconnect and Undo #45

@mottosso

Description

@mottosso

For whatever reason, you can't disconnect and connect in the same "do_it" batch without breaking undo.

tx = cmdx.createNode("animCurveTL")
tx.keys(times=[1, 2, 3], values=[0.0, 1.0, 0.0])

tm = cmdx.createNode("transform")
tm["tx"] << tx["output"]

with cmdx.DagModifier() as mod:
  mod.disconnect(tm["tx"])
  mod.connect(tm["sx"], tm["tx"])

cmds.undo()
# Error: (kFailure): Unexpected Internal Failure
# Traceback (most recent call last):
#   File "C:/cmdx.py", line 5548, in undoIt
#     shared.undos[self.undo]()
# RuntimeError: (kFailure): Unexpected Internal Failure # 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions