[Maya API] Question about Managing Custom Nodes

Let’s say I created a new custom Locator and I added a few attributes to help out our pipeline.

Now let’s say at some point during production one of the attributes is no longer necessary, and I would like to remove it.

What is the best way to handle this, particularly if that attribute is a plug and has connections to other nodes?

I handled it by checking all those nodes at startup, then either modifying the nodes themselves, or deleting/recreating them.

Giving the locators/nodes a version might be helpful, for when this happens again. When I added and changed some attributes on a node like that for a tool of mine, initially I would just look to see what combination of attributes existed, then adjust accordingly… but you end up with so many attributes/iterations after a while, that just giving them a version from the get go would’ve been easier to use as a check. Otherwise, you end up with a behemoth if/then list to make sure the nodes are current. The plug connections were minimal, so that part wasn’t a headache for my case. (side note - handling this for referenced scenes was a small headache, as older nodes couldn’t be updated until the reference scene was opened directly, so the system needed a case for using non-updated nodes).