Change display color of grasshopper objects


I am trying to create a plugin (non-component based - only menus/wpf) that allows a user to change the color of document objects. Is there a way to alter the display color outside of private/protected methods? I can get the attributes and create custom attributes, but they aren’t applying properly and are overriding the objects current attributes when I apply them

Hi, can you elaborate? Which “document” are you referring to? GH or Rhino? Do you want to change the a GH components appearance, or do you want to change the GH geometry preview colour, or do you want to change the appearance of the Rhino object on the Rhino document?

Basically you can override anything in .NET application (like GH) if you know about some advanced hacks. You can replace objects or just methods during runtime (“function-pointer replacement”) and you can modify private/protected class members. Anything is possible, but it comes with negative side-effects. If you apply things like this, you are technically modifying the original sources, which can lead a breach of license agreements, which can cause very strange bug reports and you can cause hard-to-debug issues. In the end, you should question yourself if its worth all this, just for styling purposes. But let us know what you are planing to do in detail, and maybe there is an easy way to implement.