@classmethod
    def convert_to_linear(cls):

        #
        # convert to linear
        #

        selection = pm.ls(sl=1)

        for file_node in selection:
            # get the connections
            outputs = file_node.outputs(plugs=True)

            if not len(outputs):
                continue

            # and insert a mip_gamma_gain
            gamma_node = pm.createNode('mip_gamma_gain')
            gamma_node.setAttr('gamma', 2.2)
            gamma_node.setAttr('reverse', True)

            # connect the file_node to gamma_node
            try:
                file_node.outValue >> gamma_node.input
                file_node.outValueA >> gamma_node.inputA
            except AttributeError:
                file_node.outColor >> gamma_node.input

            # do all the connections from the output of the gamma
            for output in outputs:
                try:
                    gamma_node.outValue >> output
                except RuntimeError:
                    gamma_node.outValueA >> output

        pm.select(selection)
Returns a list of Migration objects to be unapplied, in order.
dataset/ETHPy150Open eoyilmaz/anima/anima/env/mayaEnv/toolbox.py/Render.convert_to_linear--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/South-1.0.2/south/migration/base.py/Migration.backwards_plan