Age | Commit message (Collapse) | Author |
|
With D8234 a new drawing method for UV/Image editor was introduced. For debugging
reasons we left the old drawing method in the code base. This patch will remove
the old drawing method.
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D9011
|
|
|
|
This happened when using the shading panel when a uv editor opened.
|
|
This replace `GPU_clear()` by `GPU_clear_color()` and `GPU_clear_depth()`.
Since we always set the clear value before clearing, it is unecessary
to track the clear color state.
Moreover, it makes it clearer what we clear the framebuffer to.
|
|
|
|
We now use GPU_blend for enabling / disabling blending and explicitly
set the blend equation.
|
|
|
|
|
|
This is in order to better encapsulate / isolate the drawing code.
|
|
This remove the use of batch->program and replace it with batch->shader.
This will allow GL abstraction latter.
|
|
|
|
Only affects MacOS.
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/uv_edit` module.
No functional changes.
|
|
This is a simple workaround using polyline shader. This is temporary and
a better solution should be found when we refactor the 2D view using DRW.
|
|
Fix by changing the shader to always compute dash for uv and just change
dash size to something really big for other overlay types.
|
|
This patch uses a graph flow scheduler for creating all mesh batches.
On a Ryzen 1700 the framerate of Spring/020_02A.anim.blend went from 10 fps to 11.5 fps.
For each mesh where batches needs to be updated a sub-graph will be added to the task_graph.
This sub-graph starts with an extract_render_data_node. This fills/converts the required data
from Mesh.
Small extractions and extractions that can't be multi-threaded are grouped in a single
`extract_single_threaded_task_node`.
Other extractions will create a node for each loop exceeding 4096 items. these nodes are
linked to the `user_data_init_task_node`. the `user_data_init_task_node` prepares the userdata
needed for the extraction based on the data extracted from the mesh.
Note: If the `lines` and `lines_loose` are requested, the `lines_loose` sub-buffer is created
as part of the lines extraction. When the lines_loose is only requested the sub-buffer is
created from the existing `lines` buffer. It is assumed that the lines buffer is always
requested before or together with the lines_loose what is always the case (see
`DRW_batch_requested(cache->batch.loose_edges, GPU_PRIM_LINES)` in `draw_cache_impl_mesh.c`).
Reviewed By: Clément Foucault
Differential Revision: https://developer.blender.org/D7618
|
|
reapply changes from 30cbbccc6002 / D7764 that were only meant for
master. Sorry for the noise!
|
|
|
|
That part only applies to master, sorry for the noise
|
|
|
|
When showing UV edges after modifiers [draw_uvs_shadow], these were never
drawn anti-aliased [in contrast to the 'main' UVs].
Also: they did not respect the new 'UV Opacity' setting.
Differential Revision: https://developer.blender.org/D7764
|
|
This color had it's alpha reduced in the drawing code,
as the active face is no longer stippled.
Now the color is used from the theme without adjusting the alpha.
|
|
Add this option as it's useful to adjust how much UV's
cover the image when UV mapping.
D5348 by @EitanSomething with edits
|
|
This solution involves adding a uniform to each fragment shader that is
used by gizmo drawing and use the framebuffer state to set this uniform
accordingly.
This solution can also be carried to external shaders (addons).
A single line of code would then be enough to fix the issue.
The only trickery here is the dummy define:
`#define srgb_to_framebuffer_space(a)`
This is in order to avoid breaking other DRW shaders that use the same
fragment shader code but do not need the tranformation.
Related to T74139
Reviewed By: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D7261
|
|
Also pass some args as 'const'.
|
|
|
|
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.
|
|
|
|
Was caused by DRW_mesh_batch_cache_get_edituv_faces_stretch_area called
after DRW_mesh_batch_cache_create_requested. So it was created on the wrong
object/mesh.
|
|
|
|
Support for UV Stretching overlay during multi object editing. The
VBO now holds the ratios per fase. In the shader these ratios will
be compared against the global ratios. The global rations are created
from all selected objects.
The current implementation does not fit well with the draw module. The
plan is to move the drawing of other spaces towards the draw manager what
leads to a better fit. Currently the details on this solution is unclear
but this requirement will become an attentionpoint in the future design.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D5665
|
|
Follow conversion already used in most places.
|
|
Differential Revision: https://developer.blender.org/D5369
|
|
For clarity sake, the batch cache now uses exclusively per Loop attributes.
While this is a bit of a waste of VRAM (for the few case where per vert
attribs are enough) it reduces the complexity and amount of overall VBO
to update in general situations.
This patch also makes the VertexBuffers filling multithreaded. This make
the update of dense meshes a bit faster. The main bottleneck is the
IndexBuffers update which cannot be multithreaded efficiently (have to
increment a counter and/or do a final sorting pass).
We introduce the concept of "extract" functions/step.
All extract functions are executed in one thread each and if possible,
using multiple thread for looping over all elements.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D5424
|
|
D5178 by @deadpin
|
|
The dash_factor wasn't being set in many places, having the graph editor
open for eg, caused box-select in the 3D view not to show dashes.
|
|
Use depth buffer to order the uv edges correctly to always draw selected
edges on top.
We still use the double drawing workaround for points to keep the smooth
antialiased display.
|
|
|
|
Rename it to GPU_batch_draw_advanced and use base instance when possible.
Also add GPU_batch_bind to bind the vao independantly of drawing commands.
|
|
|
|
|
|
In 2.7x UV sculpt was a kind of sub-mode
(a toggle with it's own key-map & drawing code).
Move this to an operator that uses the tool-system,
this simplifies internal logic, especially brush selection
which now matches sculpt and other paint modes.
- Remove toggle used to enable uv sculpt.
- Expose the brush, which was already used but there was no way to
select different brushes.
- Make UV sculpt use paint paint tool slots
(using brushes how all other paint mode currently do).
- Move UV Sculpt keymap to the tools keymap.
- Remove Q to toggle UV sculpt mode,
S/P/G keys to switch tools.
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|