Vertex color incorrectly displays in material view for meshes that share a material and do not have a vertex color layer after entering and leaving edit mode
Closed, ArchivedPublic

Description

System Information
Win8, GTX1070

Blender Version
Broken: 2.79 (8760725) and likely before

Short description of error

Vertex color incorrectly displays in material view (cycles) for meshes that share a material and do not have a vertex color layer. This is in material view and using a material that shows the vertex color (so for example Attribute Col into a shader Color input). So if you've got mesh A with a vertex color layer using material Z and mesh B without a vertex color layer using the same material Z, mesh B will show in the 3dview as having the same color as mesh A even if mesh B doesn't actually have a vertex color layer. I would expect the Col input in the material to not have any effect if the mesh doesn't actually have a vertex color layer.

Note that you need to enter and exit edit mode in order for the color to incorrectly update on the additional mesh.

Exact steps for others to reproduce the error
Based on a (as simple as possible) attached .blend file with minimum amount of steps

  1. Add two cubes.
  2. Create a new material using vertex color. For example Attribute Col into a Diffuse BSDF Color input. If there's no vertex color layer add it for one of the cubes only.
  3. Assign the new material to the two meshes.
  4. Enter material shading viewport mode.
  5. For the mesh with a vertex color layer, enter vertex paint mode and paint on the mesh with a color you can see easily (like blue).
  6. Enter object mode. Notice that the other mesh stays the same color.
  7. Enter edit mode for the mesh with a vertex color layer (the one you painted) and go back to object mode again. Notice that the other mesh now incorrectly changes color.

Expected behavior at 7: The other mesh should stay the same color as before because it doesn't have a vertex color layer and thus shouldn't be affected by any other meshes' vertex colors.

Details

Type
Bug
Philipp Oeser (lichtwerk) triaged this task as Confirmed priority.Jan 9 2018, 5:58 PM

Can confirm this, this is odd, it doesnt even have to be a shared Material in certain cases, looking more closely now...

Philipp Oeser (lichtwerk) lowered the priority of this task from Confirmed to Normal.

afaics, this was an issue since it was added in rBa830280, cant find the issue within a reasonable amount of time, assigning to original author @Sergey Sharybin (sergey) instead...
not sure if this a high priority, good news is: wont be an issue in 2.8 (e.g. eevee handles this flawlessly)

If it works fine in 2.8 it's definitely not high priority. An easy workaround is to just add vertex color layers to everything because this bug only affects meshes that don't have vertex color layers.

Sergey Sharybin (sergey) closed this task as Archived.Jan 30 2018, 12:15 PM

This isn't specific to vertex color, same thing will happen for UV maps as well.

There is something changed back in 2015, but bisecting it now is somewhat pointless. The change is most likely in DerivedMesh drawing part, which is being fully removed in blender2.8.

Would rather spend time on making 2.8 production ready!

So thanks for the report, but it will only be fixed when 2.8 is merged to master.