# Simple reduction - Scripting

This example will create a simple reduction pipeline with a target Triangle Ratio of 0.5 (50%), send the selected scene off to Simplygon for optimization and return the result back to Maya once completed.

The first step is to create a minimalistic ReductionPipeline, just a simple reduction on geometries while preserving original materials, nothing more, nothing less.

    The Simplygon-command has a number of flags which can be passed from script, for example the so (SettingsObject) flag which specifies which Pipeline / settings Simplygon will use during optimization.

    The second part is to select the scene that is to be optimized (or parts of it) and start the optimization using the Simplygon command. The optimized result will get imported automatically once the optimization has completed.

      The third and last part is simply to clean up created and / or loaded Pipelines that resides in memory, they can of course be reused but it is easy to forget they were ever there.

        # Next steps

        Get to know how to use the Simplygon Maya plug-in: