def _worker_view_factory(self, window, **traits):

        from pyface.workbench.traits_ui_view import \
                TraitsUIView

        worker = window.get_service(Worker)
        tui_worker_view = TraitsUIView(obj=worker,
                                       view='view',
                                       id='user_mayavi.Worker.view',
                                       name='Custom Mayavi2 View',
                                       window=window,
                                       position='left',
                                       **traits
                                       )
        return tui_worker_view

# END OF CODE THAT SHOULD REALLY BE IN SEPARATE MODULES.
######################################################################
Set axes to constrain rotations.
dataset/ETHPy150Open enthought/mayavi/docs/source/mayavi/auto/user_mayavi.py/WorkerPlugin._worker_view_factory--crossover with--dataset/ETHPy150Open IEEERobotics/bot/bot/hardware/complex_hardware/transformations.py/Arcball.setaxes