Grasshopper

algorithmic modeling for Rhino

Drawing preview text and using the colors of the shadeMaterial_Selected and Not selected

I have a C# component which creates text and I want it to draw a preview of this text in Rhino before it is baked.

How can I code this so that when the component is selected it will draw the text in the Grasshopper traditional preview geometry green color. While when it is not selected it will draw it in the red color.

So far I'm using this method 

DisplayPipeline.Draw3dText Method (Text3d, Color)

I'm trying to set the color to args.ShadeMaterial_Selected but it says it wants a System.Drawing argument.

I guess I could just use green but Im not sure it would be the right color. Also how do I write the code so that it will red when not selected.

A preview of the code can be seen here;

Views: 320

Attachments:

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service