Some inconsistencies or unintuitive things about vertex groups: changes for 2.71 ?


I wanted to shed some light upon a subject that i find a bit shaky or counter-intuitive to say the least.
It concerns vertex groups.

Now, every one knows that vertex groups are managed from the data panel of the properties panel. So one may think they are mesh-data dependant, just like its cousins UVMaps / Shape keys / Vertex colours maps. But it isn;t so simple.

Here is a test file I’ve made.
On top is a start object with data that contains a UVMap, some vertex groups, shape keys and a Col map.

Now let’s start experimenting.
I’ve made a Shift-duplicate of it: it has inherited all the goodies from its source.
If you make some change to a vertex group of the source, it isn’t reflected in the copy. Logical

I’ve also made a Alt-duplicate of it. Now changes in the vertex group of the source are reflected. Here again that’s fully logical: after all it is a linked copy.

Things start to get a bit more shaky when you don’t duplicate but use “link” after ward.
The top object on the right started its life as a plane. Than I went to the data panel and swapped its datablock to be that of the source mesh, and it instantly became a sphere just like the source one, with shape keys (linked) UVs (linked) and Col maps (linked) BUT NO VERTEX GROUPS.
Same if you link with Ctrl-L (bottom right)

1st question :Why this behaviour ? Why should we loose vertex groups informations when linking to a mesh datablock ?
After all vertex groups are to be found in the Data panel, so it would be intuitive to get them linked as well.

So one gets the impression that vertex groups are NOT included in the datablock when linked afterward, whereas they were when we used Ald-D

Now some more magic:
Select one of the two objects at the right, go to mesh/data panel and add 2 vertex groups. You’ll see them appear, named “Group” and “Group.001”.
Now enter it (edit mode), and you’ll see with amazement that these 2 mimic the “top” and “waiste” groups from the start mesh they were linked from !!!

2nd question :Why is that so then ? We were under the impression that vertex groups were not conveyed with the datablock… and still creating 2 vertex groups from scratch make the 2 groups “top” and “waiste” rise from the dead !
And the wiki mentions that new groups are created empty…

Even better: make a change to one of them, say “Group.001”, by assigning more vertices to it, and you’ll see the changes in the start mesh under the vertex group “Waiste” !

3rd question :How is that possible then, when these vertex groups don’t even share the same name ???
The wiki mentions that as well at the very bottom of the page. But what is that good for ? I don’t get it…

I’d be interested to know what the rationale is for these unintuitive behaviour…

OK, no reaction at all.

So probably I am missing something completely obvious… in which case I’d love to get an explanation.
I know it is not an “issue” or some real problem, but why such a behaviour with vertex groups ?

Or is there a better place to ask such questions ? Should i contact someone “up there” in the devs departement ?

I dare to push that up and questions whomever may have a hint on that !

Someone a lot smarter than me would have to answer this question for you… but it may have something to do with each object occupying its own “space”. I know you get a lot of trickiness when you start having two objects sharing datablock information, so maybe it has to do with Blender trying to discern between the two the best way it knows how.

I agree that Vertex Groups are under the wrong context in the GUI.

The API clearly shows that they belong under object, not datablock.

Where UVs do belong under Mesh as the API shows.

Feel free to report it as a bug.

I think there is more to it than just being in the wrong GUI panel though.

The fact that linking to a mesh data with existing vertex groups doesn’t bring vertex group with it BUT they do appear when creating them and are linked to the groups of the original obejct tends to show that they are in fact Mesh-dependant.

I don’t know if reporting that as a bug makes sense, as it might be done like that by design…
Do you think i should try and find advice in the bugtracker community ?

Thank you Aligorith, glad to see that other people are concerned.

I don’t know if “repairing” that mess is possible without breaking backward compatibility though…
If i were in charge (and able to code), I’d have the VGroups to be part of the Mesh-datablock, square and simple.
What would be the downside of that ?

Certainly backwards compat issues are one of the main reasons we haven’t “rectified” this yet - though I remember Ton saying that it is something we should do at some point.

The other potential downsides are that you’d need to remember to do this for curves and lattices too, since they too can have vertex groups.

Curves and lattices as well ? I didn’t know that.
I can’t find where to edit them for curves though… Are you sure they do have them ?