Hi. I am new the Blender source code development. I want to add gradient vertex color feature for proportional editing mode like Maya. Currently I am tweaking the editor and bmesh codes. Could anyone help me about where I should look in order to set vertex colors in edit mode?
I did find it maybe someone else need;
draw_em_fancy_verts function in drawobject.c.
If you want to implement this feature, it should be done in the blender2.8 branch since the drawing code was completely rewritten there.
The transform tools can already do some additional drawing when active, see drawTransformView()
where it draws constraints, snapping, edge slide, … over the mesh. This could fit there as well.
Thank you so much for helping. I have added new function into drawTransformView like you instructed.
I am using immVertex3fv function to create new vertices according to gradient color for temporary solution.
But I should clip vertices which stay behind the faces for this. Also gradient vertices are only shown in while translating.
I want to change vertices color directly in drawing codes, that would solve both problems. Is drawing codes are still placed in drawobject.c for blender2.8?
For the clipping, the depth test is probably disabled? Normally it is enabled, but if you copied code from e.g. vertex / edge slide that code disables it.
If you want this to show also while the transform tool is not active, that is going to be a lot more complicated. The code to compute the falloff will need to be decoupled from the transform operator, and it will have to be refreshed whenever the mesh changes. Performance will be a concern.
If you want to implement that I can’t give you any quick pointers for where to look, you’ll need to dive into the mesh and drawing code to understand it more.
I understand. Decoupled computing for falloff would not be nice. Thank you so much again for helping.
I have disabled the depth testing.
I think it is looking fine.
it doesn’t seem to have full color range (eg. go from blue to red)
Maybe it could be themable ?
Sorry for late respond, yeah it doesn’t use blue channel, it is working top to down as red -> yellow (full red and green) -> green
Thank you for suggestion, I will try to handle it.
Hey, I just wanted to know what is missing in this to be in 2.8 ?
Looks pretty cool and useful.
can you apply gradient coloring to faces as well? seeing falloff on vertex only isn’t that informative imo.
I would love to see this in 2.8 !
Nice! I was wondering about this. Is this going to be included in future releases of blender or are you doing it as an addon?
Any news on this awesome addition?
Not a fan of Maya but this is a very good idea , especially for ultra complex geometry.
what an amazing addition to blender 2.8 !!! any news in the dev of this ?
i hope the project is not dead