This was introduced in the original implementation of weightpaint
in 2.8 (20f95de6ba). But this is very shortsighted, we can't assume only one
object will be edited at once, nor should we tag things during drawing.
There is a chance this introduces "bugs". If it does, we then tackle them in the
proper way (usually tagging DEG after operators changing the weight paint data).
I'm using a different shading group for the active text box and the others.
This way I can assign different colors to them.
The alternative would be to create a new `shgroup_dynlines_dashed_flat_color`,
but I find this overkill for such a simple use case.
This commit adds a new armature modifier for grease pencil. The deformations are done reusing the mesh deform routines.
There is also a new operator in weight paint mode to help the artist to generate weights base on armatures. This operator is required because 2D animation workflow is not equal to meshes when parent an object to armatures.
In the drawing engine has been added the option to handle the Fade object parameter used in armatures to see the strokes while move the bones.
When rename bones, all related data of grease pencil is renamed too. This not only affect new armature code, but also layers parented and hook modifiers.
Thanks @aligorith for his review and help.
Before, the weight data array was created always, but now only is added when a weight value is assigned.
This change was suggested by algorithm, and both agreed it was good idea.
As the polygon drawing is handled using a buffer that is converted to stroke inmediately, the drawing engine was not drawing the buffer stroke because it was empty, and the stoke was not visible becaus eit was in fast drawing mode.
Now there is a special flag to indicate the polygon mode is enabled and force the drawing engine to draw strokes and disable fast drawing.
* Remove support for diffuse color in the pbvh buffers.
* Upload raw data to GPU.
* Only draw nodes that have mask data when drawing the overlay.
This should fix T56466
Now wireframe does update in sculpt mode using the sculpt mesh VBOs.
The only thing that does not work is simplified wireframe (the wireframe
slider) when the mesh is shaded flat. In this case all edges are shown.
For this we need to add a bias depending on the viewing angle.
But increasing the hardness of the test make float precision issues in
the mesh transformation more prominent (actual geometry is far below the
surface). So to solve this issue we use a more subdivided grid mesh
8x8 quads instead of 1 triangle.
This make the workbench draw everything in the background routine just like
eevee. This is because the workbench uses floating point buffers too and
rendering background to this buffer makes it incorrect without proper
color management.
This could be improved because in xray the background is not blended but
dithered as it's drawn after the main pass.
OpenGL rendering only implemented the deferred renderer. This commit
will add the forward renderer. The forward renderer is used when XRay
mode is enabled
The core logic of this implementation comes from the drawobject.c from 2.7x.
I'm using `ts.colorGridAxisZ` for its color because of the legacy code:
```
UI_GetThemeColor3ubv(TH_GRID, col1);
UI_make_axis_color(col1, col2, 'Z');
glColor3ubv(col2);
```
There is nothing stopping us from adding this to the theme though, as it should
have been the case to start with.