Exemple #1
0
        public void appendFeatureMenu(ccl.ShaderNodes.VoronoiTexture.Features it, ToolStripDropDown menu)
        {
            var u = this;

            Menu_AppendItem(
                menu,
                it.ToString(),
                ((_, __) =>
            {
                u.Feature = it; ((ccl.ShaderNodes.VoronoiTexture)u.ShaderNode).Feature = it; u.ExpireSolution(true);
            }),
                true, u.Feature == it);
        }
Exemple #2
0
 public override bool Read(GH_IReader reader)
 {
     if (reader.ItemExists("Coloring"))
     {
         var dist = reader.GetString("Coloring");
         Coloring = Utils.VoronoiColoringFromString(dist);
     }
     if (reader.ItemExists("Metric"))
     {
         var dist = reader.GetString("Metric");
         Metric = Utils.VoronoiMetricFromString(dist);
     }
     if (reader.ItemExists("Feature"))
     {
         var dist = reader.GetString("Feature");
         Feature = Utils.VoronoiFeatureFromString(dist);
     }
     return(base.Read(reader));
 }