This adds vertex creasing support for OpenSubDiv for modeling, rendering, and
Alembic IO./O, This is onlyand USD implemented for OpenSubDivort.
For modeling, vertex creasing follows the edge creasing implementation with an an
operator accessedible through the Vertex menu in Edit Mode, and some parameter in
the properties panel.
Also added options to the Subsurf and Multires modifiers to disable vertex creasing, the existing option is only affecting edge creasing. Not sure if this is desirable, but I think it makes sense to separate themThe option in the Subsurf and Multires to use edge
creasing also now affects vertex creasing.
The vertex crease data is stored as a CustomData layer, as it can help people understand and study the effects of each of them.
For Cycles this adds a couple of sockets on the Mesh node to hold data about which vertices are creased (one socket for the indicesunlike edge creases
which for now are stored in `MEdge`, one for the weigths). We could have a single socket with a value for every vertex,but will in the future also be moved to
a `CustomData` layer. but this helps reducing memory usage a bit. Crease weights for vertices are then merged with the ones for edge creasing when setting up data for OpenSubDivSee comments for details on the difference in behavior
for the `CD_CREASE` layer between egdes and vertices.
For rendering vertex creasing iCycles this adds a couple of sockets on the viewport in Edit Mode, I tried to have a similar rendering asMesh node to hold data about
which vertices are creased (one socket for edge creasingthe indices, that is with a colored outline, but I could not get it to work properly, so I resorted toone for the weigths).
Viewport rendering of vertex creasing is done by mixing the vertexe selected color with
the edge crease color so the creasing is shown to emanate from the vertices,
along the edges. If both vertices of an edge are creased, this would render the edge as creased. This needs improvementTo support rendering vertex and edge creases differently,
`EditLoopData` now uses `ushorts` instead of `uchars` in order to store more
bit flags.
To support rendering vertex and edge creases differently, `EditLoopData` was modified to hold `ushorts` instead of `uchars` in order to store more bit flags as all available bits in `EditLoopData.e_flag` were used.For Alembic and USD, (For those unaware, this structure maps to an `ivec4` in the GLSL shadervertex crease support follows the edge crease
implementation, so adding another member to hold vertex creasing is not really possible.)
For Alembicthey are always read, vertex creases are read and written in a similar fashion as edge creases (vertex creases are called "corners" in Alembic), so this is only written if a subdivision modifier but only exported if a `Subsurf` modifier
is present on the Blender Mesh.