How to restrict vertex weights to no more than N number of Bones? I have a program that can animated a mesh using OpenGL but problematically it can only work and not crash when each vertex weight is affected as per the title to a maximum of four bones. The tutorial code I acquired used a simple model from some Morrowind inspired game where all it did was turn its head; in blender supposedly I can select each vertex individually and remove weights associated from unimportant bones but this seems tedious.

Is there a way to do this conveniently?
In weight paint mode, select the Weight Tools panel in the toolbar, and run Limit Total, This removes vertex groups with lowest weights.

This defaults to 4 which is a common limit for game-engines.

You can also choose which vertex groups are effected when using an armature (Only selected bones for example).

And if you want to only apply this to specific vertices, You can use vertex-select (VKey).