How to identify unsupported properties (such as vertex-groups) without relying on names? I created a plugin that procedurally creates vertex-groups.
The only problem is that I cannot identify the vertex group I created because bpy.types.VertexGroup doesn't support any custom id properties.
 C.object.vertex_groups['MASK: PAINT.00'][&quot;unique identifier&quot;] = &quot;5sdf4e6hg4hjs6&quot; #trying to create a prop to identify my created vg
Traceback (most recent call last):
  File &quot;&lt;blender_console&gt;&quot;, line 1, in &lt;module&gt;
TypeError: bpy_struct[key] = val: id properties not supported for this type

#adding bpy.props won't work either

Right now I'm working with their names, the only problem is that once the user remove or rename the vertex group my whole vertex group management fall appart.
how can we accurately identify vertex groups without relying on their names?
Does anyone have a solution to such kinds of problems?
PS: note that this kind of problem is not specific to vertex groups, many other properties don't support custom props.
Potential Solution?
I did some tinkering.
Visibily there's no way to add properties to this bpy.types.VertexGroup
it's also not possible to create inherited subclass in blender.
Maybe playing with memory address can help here
&gt;&gt;&gt; print(C.object.vertex_groups['Group'])
&lt;bpy_struct, VertexGroup(&quot;Group&quot;) at 0x000001BA8B6041C8&gt;

&gt;&gt;&gt; print(C.object.vertex_groups['Gro'])
&lt;bpy_struct, VertexGroup(&quot;Gro&quot;) at 0x000001BA8B6041C8&gt;

we can see that when changing the vg name, the memory address stays the same, so here we have an opportunity to identify our object. for example with the as_pointer() function
It's sure that the memory address will be lost when quitting the blender.exe, but we could counter that by saving the names of our VertexGroups in bpy.app.handlers.save_post the when the user open blender again we could reset all our addresses.
So the technique could work per blender session?
the only problem is that I'm not sure if blender can dynamically re-allocate memory if needed, or if the memory address will stay static per session.

Edit1*
Bad Idea, objects are dynamically allocated in memory and might change
So maybe we could identify our objects using __hash__?
I'll do some tests
Edit2*
no hash() method won't work, same for id() These function are based on memory too