# Undo/redo in CMB

**URL:** https://discourse.kitware.com/t/undo-redo-in-cmb/1647
**Category:** Computational Model Builder (CMB)
**Created:** [November 14, 2025, 11:33am UTC](https://discourse.kitware.com/t/undo-redo-in-cmb/1647 "2025-11-14T11:33:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![CsatiZoltan](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/c/76d3ee/32.png) [@CsatiZoltan](https://discourse.kitware.com/u/CsatiZoltan)
#### Post date: [November 14, 2025, 11:33am UTC](https://discourse.kitware.com/t/undo-redo-in-cmb/1647/1 "2025-11-14T11:33:53Z")

</div>

Is there a way to undo (and potentially redo) an operation in CMB?

As a concrete example: I select multiple entities in the resources and then assign a colour to them. Then I deselect the entities and perform other operations. To get back to the original colours, I would have to find the original colour, select again the previously selected entities, and then set the original colour.

There is the menu item Edit → Undo, but it is grayed out. I can only undo/redo the camera position with Edit → Camera Undo.

I think an undo/redo feature would be powerful. Maybe the [`vtkUndoStack`](https://www.paraview.org/paraview-docs/latest/cxx/classvtkUndoStack.html) class could be a starting point?

---

<div class="post-metadata">

### Author: ![dcthomp](https://discourse.kitware.com/user_avatar/discourse.kitware.com/dcthomp/32/10_2.png) [@dcthomp](https://discourse.kitware.com/u/dcthomp)
#### Post date: [November 16, 2025, 4:59am UTC](https://discourse.kitware.com/t/undo-redo-in-cmb/1647/2 "2025-11-16T04:59:50Z")

</div>

Because operations in SMTK modify their inputs (unlike pipelines in ParaView, which never modify their inputs), it is more difficult to generate the proper “inverse” of an operation. We haven’t had funding to implement undo/redo but it is something we would like to do.

---

<div class="post-metadata">

### Author: ![CsatiZoltan](https://discourse.kitware.com/letter_avatar_proxy/v4/letter/c/76d3ee/32.png) [@CsatiZoltan](https://discourse.kitware.com/u/CsatiZoltan)
#### Post date: [November 16, 2025, 7:46am UTC](https://discourse.kitware.com/t/undo-redo-in-cmb/1647/3 "2025-11-16T07:46:52Z")

</div>

OK, please keep me updated in this thread if you implement undo/redo in the future. Thank you.
