end_group#

omni.kit.undo.end_group(remove_if_empty: bool = False)#

End group of Commands.

Closes the group opened by the matching begin_group(). Calling this without an open group is a group bookkeeping mismatch: it does not decrement below zero, it attempts to repair any state a previously abandoned group left behind (see _recover_abandoned_group()), and it logs a warning.

This is warn rather than error on purpose: a group whose ``begin_group()`` / ``end_group()`` pair straddles a stage open or close is force-closed at that boundary, so an unmatched call here is a routinely reachable, recoverable condition - and ``omni.kit.test`` treats logged errors as test failures globally.