@classmethod
    def generate_repr_of_scene(cls,
                               generate_gpu=True,
                               generate_ass=True,
                               skip_existing=False):
        from anima.ui.progress_dialog import ProgressDialogManager
        from anima.env.mayaEnv import Maya, repr_tools, auxiliary
        reload(auxiliary)
        reload(repr_tools)

        response = pm.confirmDialog(
            title='Do Create Representations?',
            message='Create all Repr. for this scene?',
            button=['Yes', 'No'],
            defaultButton='No',
            cancelButton='No',
            dismissString='No'
        )
        if response == 'No':
            return

        # register a new caller
        pdm = ProgressDialogManager()

        m_env = Maya()
        source_version = m_env.get_current_version()
        gen = repr_tools.RepresentationGenerator()

        # open each version
        from stalker import Version
        if skip_existing:
            # check if there is a GPU or ASS repr
            # generated from this version
            child_versions = \
                Version.query.filter(Version.parent == source_version).all()
            for cv in child_versions:
                if generate_gpu is True and '@GPU' in cv.take_name:
                    generate_gpu = False

                if generate_ass is True and '@ASS' in cv.take_name:
                    generate_ass = False

        total_number_of_reprs = generate_gpu + generate_ass
        caller = pdm.register(total_number_of_reprs, title='Generate Reprs')

        gen.version = source_version
        # generate representations
        if generate_gpu:
            gen.generate_gpu()
            caller.step()

        if generate_ass:
            gen.generate_ass()
            caller.step()

        # now open the source version again
        m_env.open(source_version, force=True, skip_update_check=True)
generates desired representations of this scene
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/toolbox.py/Reference.generate_repr_of_scene