def loop_selection(self):
        """ Loop the selected page.

        Loop over the selected pages N times with a gap of M frames
        between eack loop. N and M are values taken from the UI.
        """
        animationflipbook.loop_selection(
            self.loop_operations_widget.sb_num_loops.value(),
            self.loop_operations_widget.sb_steps.value())
def loop_selected(*args):
    """ Loop the selected page.

    Loop over the selected pages N times with a gap of M frames
    between eack loop. N and M are values taken from the UI.

    :noindex:
    .. note::
        This is utilised by the native MEL UI.
    """
    num_loops = cmds.floatFieldGrp("set_loop_field", query=True, v1=True)
    step = cmds.floatFieldGrp("set_loop_field", query=True, v2=True)
    animationflipbook.loop_selection(int(num_loops), int(step))