Hello,
I have a pesky plugin component I can’t manually track down in my script. It is List Indices from Pufferfish (no offense to Pufferfish, great plugin!).
I need to remove it from my script as I am nativizing the script, removing all third party plugins and switching to vanilla GH only.
I’ve manually combed through every node in my script and every cluster and nested cluster and cannot find the component anywhere, however, when I uninstall Pufferfish and open the script it claims List Indices as an unrecognized object, meaning it is somewhere in my script. (Yes I have tried the “Search” feature) and purged all occurrences of this component but I have a feeling a single (or maybe 2 or so) still remain somewhere that I cannot find…
So far, I have leveraged a script I found on the forums that lists all third party plugins in the main graph but it does not work on nested graphs AKA clusters.
Also I’ve created a similar python script attempting to find all instances of a comp by search name and then my next step was to “select” the found components automatically but I’m stuck on what method to use to select them?
You can see here both scripts return a match if the component is in graph space:
However, if it is nested inside of a cluster, no good:
Is there another way I can somehow purge third party plugins from my script or drill down into clusters to search there as well?
Thanks so much, I’ve combed through my script over 3 times now looking for it line by line/node by node and can’t find the List Indices node…
Here’s my python code thus far:
import Grasshopper as gh
import System
from re import findall
pattern = r"ListIndices"
comp_ids = []
comp_names = []
if Enable:
comps = ghenv.Component.OnPingDocument().Objects
for comp in comps:
comp_id = comp.InstanceGuid
comp_name = comp.Name
comp_ids.append(comp_id)
comp_names.append(comp_name)
# Find Component Named "Search Name" In Grasshopper Document
if SearchName in comp_names:
index = comp_names.index("List Indices")
comp_guid = comp_ids[index]
print("Found at index:", index)
print("Matching ID:", comp_guid.ToString())
found_comp = ghenv.Component.OnPingDocument().FindObject(comp_guid, True)
print found_comp
else:
print("Component Not Found")
And I’ll attach a gh definition for testing
20230703_purge_third_party_plugin_help_file_01a.gh (23.9 KB)
I appreciate the help!