I want to change the wire between two components to faint, if and only if they are both simple params-geometry or params-primitive. (If just one of the first level upstream components is of this category the wires should be faint)
I got the script to change all wires going to a simple params-geometry or a params-primitive, but I can’t seem to find the subcategory of the nearest upstream,
private void RunScript(bool showFaintWires)
{
foreach(IGH_ActiveObject ao in GrasshopperDocument.ActiveObjects()){
if(ao.SubCategory == "Primitive" || ao.SubCategory == "Geometry"){
if(ao is IGH_Param){
IGH_Param param = ao as IGH_Param;
fixWires(param, showFaintWires); //This function is defined elsewhere in C# component
}
}
}
}
How do I access the upstream components subcategories?
Best Timo