algorithmic modeling for Rhino
Hi raf,
preview colours are stored as document properties on the Grasshopper.Kernel.GH_Document class. There's both shared properties and instance properties:
GH_Document.DefaultPreviewColour = ...
GH_Document.DefaultPreviewColourSelected = ...
change the colours that are assigned to new documents, but they won't affect existing documents.
Dim doc As GH_Document = ...
doc.PreviewColour = ...
doc.PreviewColourSelected = ...
These two properties change the colours of an existing document.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Hi David, actually I am looking for a way to custom defined object display color. Like Custom preview component.
Thanks,
raf
Well, in that case you have to hijack the drawing routines for your object. This is only possible if it is indeed your object.
If you derive from GH_Component (like Custom Preview does), then override the functions DrawViewportWires() and DrawViewportMeshes().
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by