Age | Commit message (Collapse) | Author |
|
In the original design draw engines had to copy with a limitation that
they were not allowed to reuse complex data structures between drawing
calls. Data that could be reused were limited to:
- GPUFramebuffers
- GPUTextures
- Memory that could be removed calling MEM_freeN (storage list)
- DRWPass
This is fine when the storage list contains arrays or structs but when
more complex data types (vectors, maps) etc wasn't possible.
This patch adds instance_data that can be reused between drawing calls.
The instance_data is controlled by the draw engine and doesn't need to
be limited as described above.
When an engines stores instance_data it must implement the
`DrawEngineType.instance_free` callback to free the data.
The patch originates from eevee rewrite. But was added to master as the
image engine rewrite also has a need for it.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D13425
|
|
There were several places attempting to check to see if scene lights
and world were enabled for display. This tries to find a common place
for both of these to reduce duplication.
Honestly, I couldn't find a really good spot for these and settled on
DRW_engine. It's not the best spot since they're not strictly drawing
related, but let's start here.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D12658
|
|
The simplify was hardcode to be disabled in render.
|
|
Renamed to BKE_gpencil_visible_stroke_advanced_iter
Also created a simple version of the iterator to be used without multiframe and onion skin.
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
When filtering the render using view layer, could be possible the mask is NULL and just need to be ignored.
|
|
As now is possible to use multiframe in Draw mode, the option to display only lines must be disabled.
|
|
The problem was introduced fixing task T85035.
As the frame was set again when render, if there was a time modifier, the frame was not remaped to the right frame number.
|
|
|
|
This option was broken since the draw engine refactor and it was impossible to display only edit lines for multiframe mode.
|
|
|
|
|
|
|
|
Due a thread priority, the calculation of the current frame is not done before the frames are available. This produces wrong render frames.
The solution is verify the current frame before doing the real render. This adds only a few milliseconds, but it assures the frame is correct.
As the problem is only when render in background, the recalculation of the frame is only necessary when do real render and not a viewport render, so there is no impact in the animation FPS.
|
|
Due a problem in the mergetool, the clang format was totally wrong in the previous commit.
|
|
|
|
Due a thread priority, the calculation of the current frame is not done before the frames are available. This produces wrong render frames.
The solution is verify the current frame before doing the real render. This adds only a few milliseconds, but it assures the frame is correct.
As the problem is only when render in background, the recalculation of the frame is only necessary when do real render and not a viewport render, so there is no impact in the animation FPS.
|
|
When the multiframe is enabled, playing animation must be disabled or the animation is not visible,
{F9527854}
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D9930
|
|
Stores cryptomatte hashes as meta data to the render result. Compositors could
use this for lookup on names in stead of hashes.
Differential Revision: https://developer.blender.org/D9553
|
|
Buffer strokes weren't being the excluded from depth only draw calls
so were being included in depth tests. They are now excluded by
bypassing the creation of the buffer strokes.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D9742
|
|
The Edit Lines flag was not checking if Onion was enabled. In 2D template this is disabled by default, but default template has enabled it.
|
|
This change hides the boundary strokes used for closing filled areas in render mode (viewport and final render).
Related to T80128
|
|
This follows the GPU module naming of other buffers.
We pass name to distinguish each GPUUniformBuf in debug mode.
Also remove DRW_uniform_buffer interface.
|
|
This feature was removed during the refactor, but it's needed for this type of strokes to display the line using the stroke color without checking if the stroke is enabled or not in the material.
This color is used only for these special strokes.
|
|
|
|
Now that binds are permanent there is no need to setup the same
texture for each subgroups.
|
|
This was missing in previous cleanup commits.
|
|
This feature was removed by error during the refactor done in draw engine.
Differential Revision: https://developer.blender.org/D8082
|
|
This values was not working because was removed by error in refactor.
Reviewed By: mendio, fclem
Differential Revision: https://developer.blender.org/D8061
|
|
This was removed by error during the refactor done in 2.83.
Differential Revision: https://developer.blender.org/D7909
Reviewers: @fclem
|
|
|
|
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
These headers are not needed right away, but will be in the upcoming
commit.
|
|
Only must fade if the active object is a GPencil.
|
|
|
|
Actually, the fade objects always fade to Black color, but this is not a good solution.
This patch fade the object to the viewport color.
Differential Revision: https://developer.blender.org/D7206
|
|
|
|
|
|
This avoid color drifting due to R11G11B10 buffers.
|
|
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes.
Also, a huge code cleanup has been done at all levels.
Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development.
Differential Revision: https://developer.blender.org/D6293
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
Another AA method is comming in the GPencil refactor.
|
|
This is a quick fix that should work until the GPencil refactor lands.
|
|
|
|
Reviewed By: brecht sergey jbakker
Differential Revision: http://developer.blender.org/D6729
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Old Name New Name
========= =========
init_def_material BKE_materials_init
BKE_material_gpencil_default_free BKE_materials_exit
test_object_materials BKE_object_materials_test
test_all_objects_materials BKE_objects_materials_test_all
give_matarar BKE_object_material_array
give_totcolp BKE_object_material_num
give_current_material_p BKE_object_material_get_p
give_current_material BKE_object_material_get
assign_material BKE_object_material_assign
assign_matarar BKE_object_material_array_assign
give_matarar_id BKE_id_material_array
give_totcolp_id BKE_id_material_num
assign_material_id BKE_id_material_assign
clear_matcopybuf BKE_material_copybuf_clear
free_matcopybuf BKE_material_copybuf_free
copy_matcopybuf BKE_material_copybuf_copy
paste_matcopybuf BKE_material_copybuf_paste
BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init
BKE_material_add_gpencil BKE_gpencil_material_add
BKE_material_gpencil_get BKE_gpencil_material
BKE_material_gpencil_default_get BKE_gpencil_material_default
BKE_material_gpencil_settings_get BKE_gpencil_material_settings
|
|
Fix by @campbellbarton
|