Age | Commit message (Collapse) | Author |
|
|
|
The lines were not using the matrix to calc the tarnsformation.
|
|
|
|
Cast occurs first, making any flag enable this option.
|
|
|
|
|
|
|
|
When the relative mode was used, the calculation of the total number of vertices was not done and it was using the total number of vertices in the datablock. This worked for small files, but with complex files the time to allocate all the data was too long and the performance was very bad.
Now, for relative mode the real number of vertex is calculated.
Also fixed the same problem when onion and multiedit is enabled.
|
|
|
|
The onion skin was nos displayed in secondary screens when disable the Onion switch or the Overlay in the main window.
Added a check to verify if the main overlay and onion switches are enabled in any screen in order to generate the cache data.
This is required to generate the onion skin and limit the times the cache is updated because the cache is generated only in the first screen and if the first screen has the onion disabled the cache for onion skin is not generated. The loop adds time, but always is faster than regenerate the cache all the times.
Reviewed By: mendio, pepeland
Differential Revision: https://developer.blender.org/D6049
|
|
Before, the modifiers were evaluated in Draw Engine and this required to calculate a factor to increase the VBO size.
Now, the modifiers are evaluated in Depsgraph and the Draw Engine receives the evaluated stroke with the final number of vertices. As the number of vertices is the final value already, if Draw Manager increases the number with the modifiers only increases the memory with empty space because never would be used. This commit removes this double calculation, reducing the memory usage and removes a loop to calculate the size by modifier too.
Also, the function getDuplicationFactor() has been removed because is not required anymore.
|
|
The first element of the loop was not calculated for all onion modes. For select mode the first selected is used, for other modes the first frame in the layer is used.
|
|
|
|
Before when Onion or Multiframe was enabled the VBO length was the total of points on the object for all frames and this results in a big size when the scene had a lot of frames.
Now, the size of VBO length is calculated more precisely and reduce the time to alloc the VBO.This also reduce memory footprint.
|
|
The flag was working in the oposite mode.
Related to T70116
|
|
As the evaluated data is not calculated in multiframe, needs to have the original colors.
Related to T70116
|
|
|
|
The problem was the unit matrix was not set in the uniform variable.
|
|
This texture is used for missing textures as replace.
Differential Revision: https://developer.blender.org/D5845
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
|
|
When delete in multiframe node the active frame gets NULL.
|
|
|
|
This reverts commit ce34a6b0d727bbde6ae373afa8ec6c42bc8980ce.
|
|
Reviewers: brecht
Differential Revision: D4997
|
|
This is useful to disable all layers tint in one step and it will be used for future operators.
|
|
As the function `gpencil_onion_active()` has a loop, if some condition is false before we can avoid the loop.
|
|
The main switch was not checked and the function was doing all calculations, but the data was not used. This makes all slower than expected because the user had the Onion Skinning disabled, but internally was running.
|
|
Now the fade layer uses the same logic used to fade objects and also is available in all modes.
Reviewers: mendio, pepeland
Reviewed By: mendio, pepeland
Differential Revision: https://developer.blender.org/D5707
|
|
Before, it was only possible to fade the active object. The new option allows to fade all non gpencil selected object. This is a common request by artists.
{F7719513}
Reviewers: mendio, pepeland
Reviewed By: mendio
Differential Revision: https://developer.blender.org/D5704
|
|
Texture Shading
The overlay factor was not used in other modes.
|
|
Now, when it's selected the stroke select mode, the points are not displayed and the stroke is fully selected automatically extending the selection.
Differential Revision: https://developer.blender.org/D5622
|
|
This is a temporary solution to keep the render running.
|
|
If the masks are disabled, the edit points must not visible.
|
|
Follow conversion already used in most places.
|
|
Follow conversion already used in most places.
|
|
|
|
Before, the evaluation of modifers were done in draw manager. The reason of the old design was grease pencil was designed before depsgraph was in place.
This commit moves this logic to depsgraph to follow general design and reduce Draw Manager complexity. Also, this is required in order to use modifiers in Edit modes.
Really, there is nothing really new in the creation of derived data, only the logic has been moved to depsgraph, but the main logic is the same. In order to get a reference to the original stroke and points, a pointer is added to Runtime data as part of the evaluated data. These pointers allow to know and use the original data.
As the modifiers now are evaluated in Depsgraph, the evaluated stroke is usable in Edit modes, so now it's possible to work with the evaluated version instead to use a "ghost" of the final image over the original geometry as work today.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5470
|
|
This parameter was removed in 2.80 and we decided to back again, but now is inverted.
|
|
There was a fixed limit to the number of points available in a buffer stroke.
Now, the array is expanded as needed using a predefined number of points for each expansion, instead to add one by one. This is done to reduce the number of times the memory allocation is required.
As part of the fix, some variables have been renamed to reflect better their use.
|
|
Match existing texture name.
|
|
After testing the file, the problem was related to the fill material. As the fill material had the alpha channel set to 1.0, the fill triangulation was calculated, but the fill was disabled.
Now, the fill flag is checked in order to avoid fill triangulation update.
|
|
The old name was not meaning what this option does. Dtected while writting the manual.
|
|
There was a mistake in the shading group name.
|
|
The prefix DRW_ must be used only for modules inside Draw Manager and not in the Engines.
|
|
The control points were clamped to the stroke thickness due the last stencil change.
Now, the shading group is not clamped.
|
|
Following @fclem comments, I have implemented the use of Stencil for Solid line strokes. For Dots, Boxes and Lines with texture, the stencil is not activated because "kill" some artistic effects.
We have done test in greasepencil-object branch and all it's working as expected and the FPS are equal, so the stencil hasn't any appreciable impact in the drawing time.
The Stencil is used in groups of 255 and the passes are done in the same way. If the stencil is not use for the type of stroke (Dot/Box/Texture), the drawing is grouped as much as possible to reduce GPU overhead and limit the times the stencil bit must be cleared.
For doing this patch I had to add 2 new functions for reading private data to Draw manager. We decided add these function as a temporary solution while the Draw Manager implements the option to clear the stencil by groups. When this option will be implemented, these functions must be removed.
Thanks to Clément for his help and support. It's always a pleasure working with him.
Review by: @fclem
Testers: @mendio @pepeland
See D5126 for more details
|
|
|
|
|
|
flickering
There were some problems in the engine because the data was saved inside e_data struct, but this struct is reset sometimes and the background texture is not valid.
Now, the data has been moved to stl->g_data and all creation and free has been moved to use stl->g_data. This fix also some small memory leak for the Buffer GPUBatch data.
The background texture has been moved to texture list because must be available all the time. When is not drawing, the texture is removed to safe memory. Also, if the mode is painting and the texture is not ready because it was removed by Draw Manager, the texture is reloaded with the background image again. This ensure the background image is always visible when painting.
Also I have used this patch to reduce the size of texture used for background to 16F instead of 32F and the blank texture to 1x1 pixels instead of 16x16.
Reviewed by: @fclem
See D5115 for more details
|