Ejemplo n.º 1
0
        public static void SubmitAll(P3dCommand command, bool preview, int layerMask, int groupMask, P3dModel model = null, P3dPaintableTexture paintableTexture = null, List <P3dTransform> repeaters = null, List <P3dCommand> commands = null)
        {
            command.Model   = null;
            command.Groups  = groupMask;
            command.Preview = preview;

            if (commands != null)
            {
                commands.Add(command.SpawnCopy());

                // Repeat paint?
                BuildRepeaters(command.Matrix, repeaters);

                for (var r = 0; r < RepeaterCount; r++)
                {
                    for (var m = 0; m < MatrixCount; m++)
                    {
                        command.SetLocation(Repeat(r, m));

                        commands.Add(command.SpawnCopy());
                    }
                }
            }
            else
            {
                SubmitAll(command, preview, layerMask, groupMask, model, paintableTexture);

                // Repeat paint?
                BuildRepeaters(command.Matrix);

                for (var r = 0; r < RepeaterCount; r++)
                {
                    for (var m = 0; m < MatrixCount; m++)
                    {
                        command.SetLocation(Repeat(r, m));

                        SubmitAll(command, preview, layerMask, groupMask, model, paintableTexture);
                    }
                }
            }
        }