public void AddSocketCombiner()
    {
        Undo.RecordObjects(new Object[] { this, animation }, "Add Socket Combiner ");

        NPVoxModelSocketCombiner combiner = (NPVoxModelSocketCombiner)NPVoxModelTransformer.CreateInstance(typeof(NPVoxModelSocketCombiner));
        int index = SelectedFrame.AddTransformerAt(combiner, selectedTransformationIndex);

        InvalidateOutputMeshes();
        SelectTransformation(index, true);
    }
    //======================================================================================================================================
    // Tools
    //======================================================================================================================================

    public void AddMirrorTransformators()
    {
        Undo.RecordObjects(new Object[] { this, animation }, "Add Mirror Transformations ");
        NPVoxModelFlipper transformer;

        // flip
        transformer       = (NPVoxModelFlipper)NPVoxModelTransformer.CreateInstance(typeof(NPVoxModelFlipper));
        transformer.XAxis = new NPVoxCoord(-1, 0, 0);
        SelectedFrame.PrependTransformer(transformer);

        // flip back
        transformer       = (NPVoxModelFlipper)NPVoxModelTransformer.CreateInstance(typeof(NPVoxModelFlipper));
        transformer.XAxis = new NPVoxCoord(-1, 0, 0);
        SelectedFrame.AppendTransformer(transformer);

        InvalidateOutputMeshes();
    }
    public void AddTransformation(NPVoxCompositeProcessorBase <NPVoxIModelFactory, NPVoxModel> template = null)
    {
        Undo.RecordObjects(new Object[] { this, animation }, "Add Transformation ");
        NPVoxCompositeProcessorBase <NPVoxIModelFactory, NPVoxModel> transformer;

        if (template != null)
        {
            transformer = (NPVoxCompositeProcessorBase <NPVoxIModelFactory, NPVoxModel>)template.Clone();
        }
        else
        {
            transformer = (NPVoxModelTransformer)NPVoxModelTransformer.CreateInstance(typeof(NPVoxModelTransformer));
            if (this.CurrentModelFactory != null && ((NPVoxModelTransformer)transformer))
            {
                NPVoxModel model = this.CurrentModelFactory.GetProduct();
                UnityEngine.Assertions.Assert.IsNotNull(model);
                ((NPVoxModelTransformer)transformer).AffectedArea = NPVoxBox.FromCenterSize(model.BoundingBox.RoundedCenter, new NPVoxCoord(3, 3, 3));
            }
        }
        SelectedFrame.AppendTransformer(transformer);
        InvalidateOutputMeshes();
        SelectTransformation(Transformers.Length - 1, true);
        this.SetCurrentTool(Tool.AREA);
    }