There is a much simpler solution to this problem that does not involve Python, MEL scripting or addons, and it comes in the form of a button: I will over-explain this process, just in case there is anything a reader may not know how to do. Here is a video I’ve found that does this exact process in a few seconds: https://youtu.be/6G0TiB2s4xI?t=1215
Steps are shown in the images below. Apologies - New users can only use one attachment - So I have pasted them all together in one attachment at the bottom, marking their places throughout my reply
----- (Image 1 would have gone here:)
Maya allows a clean isolation of components (full isolation, not viewport-camera isolation!) much as is found in Blender3D, via the “Isolate Select” function. Again, I will drastically over-explain this process, just in case there is anything a reader may not know how to do.
To utilize this function:
- Select the components you wish to isolate for Weight Painting (i.e., teeth, tongue, eyes, eyelids, back-facing cloth like sleeves, etc.)
- Click the “Isolate Select” function to cleanly isolate the selected components components in Component mode (this tells Maya to keep these components handy, even after switching to Object mode.)
----- (Image 2 would have gone here:)
- Now hover your mouse over your selected components, while holding RMB (Right Mouse Button) to access the Maya Marking Menu. While still holding RMB, drag your mouse over “Object Mode” and release your RMB. This should place you in Object mode, with your Components still highlighted in orange from your Component Mode Selection.
----- (Image 3 would have gone here:)
Almost done: in Object Mode, Shift-Select the bones you want your selection to be influenced by, until you have everything that you want to view in your “Isolation Select” view. (ctrl+click to deselect objects. Make sure they are not highlighted, or overlaid with a wireframe - Both of these indicate that an object is still active! This method also works for marquee-drag selection.) If this was a tedious process for your situation, I recommend you save your file! And maybe even save a backup of this file, so you can return to this position if you need to.
Finally! PAY ATTENTION TO THIS LAST STEP! Just read it all the way through. This will not work if you do not perform this final, silly little action . CTRL (or SHIFT)-CLICK on ANY SELECTED MESH which is overlaid with a green or white wireframe! (basically, deselect ANY highlighted wireframes:) This will deselect the object, while keeping the object’s MayaShape selected! This allows you to both select and isolate components, without taking their objects with them! If you forget to do this, you won’t be able to isolate individual components, and you will instead grab whole objects
Once complete with the above, overexplained steps Click the “Isolate Select” button to cleanly isolate your selection. (picture of button shown below)
----- (Image 4 would have gone here:)
Over-explanation has a way of making simple things seem complicated - If you get confused, please feel free to ask questions. I pray this helps you! Thank you