/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { // Declare variables List <IGH_Goo> X = new List <IGH_Goo>(); // Access the input parameters if (!DA.GetDataList(0, X)) { return; } List <mLayer> Layers = new List <mLayer>(); foreach (IGH_Goo InputObject in X) { wObject Z = new wObject(); if (InputObject != null) { InputObject.CastTo(out Z); } mLayer LayerObject = new mLayer((mLayer)Z.Element); Layers.Add(LayerObject); } Bitmap C = null; mComposition CompositionObject = new mComposition(Layers); CompositionObject.BuildComposition(); C = CompositionObject.CompositionBitmap; //wObject W = new wObject(CompositionObject, "Macaw", CompositionObject.Type); DA.SetData(0, C); }