title: Maya Python: Undo becomes unavailable after using undoInfo()
body: <p>I've created a tool in Maya that takes values from currently selected objects, does some modifications to them and gives them back.I also have a simple gui window(made in QtDesigner if it makes sense),which has a QSlider and I pass values by dragging this slider. So, everything was working fine and I thought that it's completely ready for using but some problems with undo appeared. So, below in the <strong>init</strong> method I do this</p>
  <pre><code>        super(winMain, self).__init__()
          loader = QtUiTools.QUiLoader()
          self.ui = loader.load(ui_path, self)
          self.slider_released = self.ui.slider.sliderReleased
  </code></pre>
  <p>I have more code written in here it's just not connected to this. Below is the actionCaller() function where I call the action() function(this just does some math and generates values that should be passed to objects).</p>
  <pre><code>def actionCaller(self, some_value):
          cmds.undoInfo(openChunk=True, infinity=True)
          while not self.slider_released:
              continue
          else:
              self.action(some_value)
          cmds.undoInfo(closeChunk=True)
  </code></pre>
  <p>So I want to pass sliders value(some_value) only when it's released and therefor I added cmds.undoInfo() method for undoing the whole process as a one undo. Everything works fine while I use my program, only when I try to undo actions I've done before executing my code Maya gives this error:</p>
  <pre><code>// Error: line 1: Undo is temporarily unavailable.  Try exiting the current tool.
  </code></pre>
  <p>I think that maya somehow gets in the while loop that I wrote above and undo queue becomes unavailable. Maybe I'm wrong idk. Can someone please tell me what the problem could be in here?</p>
  <p>Thanks in advance :)</p>