Commit Graph

78385 Commits

Author SHA1 Message Date
Campbell Barton
1dd381828f UV: edge-ring selection support
Matches edit-mesh edge-ring selection.
2020-07-18 16:09:17 +10:00
Campbell Barton
c48ccb38cb BMesh: utility for checking shared edge with limit argument 2020-07-18 15:54:04 +10:00
Campbell Barton
4e73ba2cab Cleanup: split UV loop select out of mouse picking function 2020-07-18 15:43:37 +10:00
Campbell Barton
f24ccedc18 UV: utility functions for sticky select setting
Support setting vert/edge/face selection, using the sticky option
without performing a second loop over all faces to flush selection.

Existing selection code didn't take advantage of BMesh connectivity
since the logic is from before BMesh was included.
2020-07-18 15:37:33 +10:00
Campbell Barton
016253a648 Cleanup: spelling 2020-07-18 14:27:53 +10:00
Campbell Barton
fd08d6f391 Cleanup: unused warning 2020-07-18 14:27:30 +10:00
Campbell Barton
d99b343b31 Cleanup: UV selection
Remove commented code, move penalty calculation into own function.
2020-07-18 14:15:02 +10:00
Clément Foucault
d9228c557b Cleanup: KnifeTool: Replace glPolygonOffset by GPU_polygon_offset 2020-07-18 03:46:12 +02:00
Clément Foucault
4c28b1c74e Cleanup: GPU: Encapsulate clipDistances
This also remove some non functionnal state changes that were left
from legacy code.
2020-07-18 03:43:52 +02:00
Clément Foucault
59975b0adf Cleanup: WM: Encapsulate stereo draw buffers binding 2020-07-18 03:43:52 +02:00
Clément Foucault
8dfc31f61f Cleanup: GPU: Encapsulate glProvokingVertex 2020-07-18 03:43:52 +02:00
Clément Foucault
264b1e1e15 Cleanup: GPU: Encapsulate glFrontFace 2020-07-18 03:43:52 +02:00
Clément Foucault
5993c53a6d Cleanup: GPU: Encapsulate Backface culling 2020-07-18 03:43:52 +02:00
Clément Foucault
c14e6cdd56 Cleanup: View3D: Encapsulate OpenGL calls
Removes GL_DEPTH_RANGE query as it is not changed anywhere.
2020-07-18 03:43:52 +02:00
Clément Foucault
1f2edba1fb Cleanup: GPU: Encapsulate scissor test 2020-07-18 03:43:52 +02:00
Clément Foucault
d19b3019d9 Cleanup: GPU: Encapsulate glScissor 2020-07-18 03:43:52 +02:00
Clément Foucault
a6bd7777c2 Cleanup: GPU: Encapsulate glViewport calls 2020-07-18 03:43:52 +02:00
Clément Foucault
35f1b3e43b Cleanup: GPU: Wrap GL_UNPACK_ROW_LENGTH in GPU_state
Also go back to default value of 0 after usage.
2020-07-18 03:43:52 +02:00
Clément Foucault
faeaf53255 Cleanup: Sequencer: Use GPUTexture instead of opengl calls 2020-07-18 03:43:52 +02:00
Clément Foucault
e2305690eb Cleanup: WM: Use GPUTexture for radial control drawing 2020-07-18 03:43:52 +02:00
Clément Foucault
2d9eee15c5 Cleanup: GPU: Set default GL_UNPACK_ALIGNMENT to 1
Ogl default is 4 but for almost all cases, blender use tightly
packed format. This avoid confusion and state change for the
common case.

The only case that __might__ need alignement is DDS loader
(untested) so leaving this as it is.
2020-07-18 03:43:52 +02:00
Clément Foucault
0ef57d3fc0 Cleanup: glutil: Use GPUTexture in immDrawPixelsTexScaled_clipping
This also cleanup the code for readability.
2020-07-18 03:43:51 +02:00
Clément Foucault
122d0c8f4b Cleanup: ClipDraw: Use GPUTexture api and fix a vmem leak
Leak was silent as it was an opengl handle.
2020-07-18 03:43:51 +02:00
Clément Foucault
dcf6e12a60 Cleanup: GPUShader: Remove unused builtin shader 2020-07-18 03:43:51 +02:00
Clément Foucault
7e66616b7e Cleanup: ClipDraw: Remove usage of GPU_SHADER_3D_IMAGE_MODULATE_ALPHA 2020-07-18 03:43:51 +02:00
Clément Foucault
6d160f199c Cleanup: PaintCursor: Use GPUTexture instead of opengl calls 2020-07-18 03:43:51 +02:00
Clément Foucault
99b424334d GPU: Add immBindTexture and immBindTextureSampler 2020-07-18 03:43:51 +02:00
Clément Foucault
5b4a862f83 GPUTexture: Add better swizzle support 2020-07-18 03:43:51 +02:00
Clément Foucault
2840782d84 Cleanup: GPU: Make icon drawing use GPUTexture
This remove all gl function calls. Adds a new sampler only
for icon drawing.
2020-07-18 03:43:51 +02:00
Clément Foucault
02c09773ea Cleanup: GPU: rename bglPolygonOffset to GPU_polygon_offset
And move it to GPU module.
2020-07-18 03:43:51 +02:00
Clément Foucault
acad0d75b1 Cleanup: GPU: Replace glBlendFunc by GPU equivalent 2020-07-18 03:43:51 +02:00
Jacques Lucke
aa8279648e Simulation: extract node tree parsing code to separate file 2020-07-17 21:20:51 +02:00
Jacques Lucke
25582aef61 Simulation: separate code from node tree parsing and solver 2020-07-17 21:20:51 +02:00
Hans Goudey
69d14c0ddb Fix T78959: Show current frame indicator when interface is locked
When the playhead drawing moved to an overlay, a check was added to keep
it from drawing with a locked interface. This is necessary for some overlays,
but not this one, so this removes the check, making it the responsibility of
the editor.

A context function is added to make that check easier in the future.

Differential Revision: https://developer.blender.org/D8313
2020-07-17 15:18:54 -04:00
Germano Cavalcante
8b0df381d9 Transform: use GHASH_ITER when restoring customdata 2020-07-17 14:33:40 -03:00
Sybren A. Stüvel
d8a6eec1a3 Cleanup: Removed incorrect // namespace DEG comment
No functional changes.
2020-07-17 16:49:00 +02:00
Jacques Lucke
e3f8768d8a Refactor: move ParticleFunction to separate file 2020-07-17 14:23:57 +02:00
Jacques Lucke
2679236047 Cleanup: avoid static initialization order issues when accessing CPPTypes
Instead of depending on static initialization order of globals use
static variables within functions. Those are initialized on first use.
This is every so slighly less efficient, but avoids a full class of problems.
2020-07-17 14:15:06 +02:00
Jacques Lucke
3ef59121a4 Simulation: move initial simulation code from bf_blenkernel to bf_simulation
I removed bf_blenkernel from `nodes/CMakeLists.txt` again (added it yesterday),
because now this was causing me unresolved symbol errors... Without it, cmake
seems to link the libraries bf_simulation, bf_blenkernel and bf_nodes in the right
order. Not sure if that is just luck or if it is guaranteed.

It was possible to fix the issue by using cmakes `LINK_INTERFACE_MULTIPLICITY`,
but that is probably bad style.
2020-07-17 13:49:18 +02:00
Jeroen Bakker
9582797d4b Fix T77867: Link Duplicate Object crashes during batch creation
When using link duplicated objects it could happen that one object is
calculating the GPUBuffers and the second object is marking these
buffers invalid. This introduces threading issues.

This patch fixes this by combining the surface and surface per material
batches. Most likely the surface per material batches are used and when
requested you will most likely need the surface batch for the depth
tests and overlays.

During tests it slightly improves performance as batches aren't thrown
away without using it.

After this patch we can add a quick path for meshes with one material
and two materials.

Alternative approaches that have been checked:
- sync extraction per object: reduced performance to much (-15%)
  ({D8292})
- post checks: reduced the threading issues, but didn't solve it.
- separating preparation and execution of the extraction ({D8312})

Reviewed By: Clément Foucault

Differential Revision: https://developer.blender.org/D8329
2020-07-17 13:47:53 +02:00
Ankit Meel
bf2bb6db26 Cleanup: silence unused variable warning
Reviewed By: fclem

Differential Revision: https://developer.blender.org/D8328
2020-07-17 17:12:46 +05:30
Jacques Lucke
0e3d34e48f BLI: add StringRefNull.c_str() method
This should be used whenever you rely on the fact, that the
returned pointer points to the beginning of a null-terminated array.
2020-07-17 12:38:15 +02:00
Jacques Lucke
0fcd23a388 Simulation: use better api for adding and removing simulation states 2020-07-17 12:36:23 +02:00
Sybren A. Stüvel
c5f61fbf48 Cleanup: avoid warning about redundant access specifier
No functional changes.
2020-07-17 11:49:51 +02:00
Jacques Lucke
5910dbdbf7 Nodes: move some code from blenkernel directory to nodes
This also introduces the `blender::nodes` namespace. Eventually,
we want to move most/all of the node implementation files into
this namespace.

The reason for this file-move is that the code fits much better
into the `nodes` directory than in the `blenkernel` directory.
2020-07-17 11:36:59 +02:00
Campbell Barton
0a40c671b0 Cleanup: consistent ordering for scene argument to UV functions 2020-07-17 17:39:47 +10:00
Campbell Barton
618f31312c Fix vertex selection error from recent refactor
Temporary fix for regression in 8084b7e6e2.
2020-07-17 17:37:35 +10:00
Jeroen Bakker
89a7a1c156 Cleanup: extract draw cache sanity checks to own function 2020-07-17 08:31:03 +02:00
Hans Goudey
608d9b5aa1 UI: Add shortcuts for constraint panels
Only the delete shortcut applies here, although the move up and down
operators can optionally be assigned in the keymap.

See rB1fa40c9f8a81 for more details and rB5d2005cbb54b for the
grease pencil modifier panel implementation, which is the same.
Some refactoring of the constraint delete operator was necessary,
including adding an invoke function.

Differential Revision: https://developer.blender.org/D8238
2020-07-16 14:07:47 -04:00
Jacques Lucke
b13bbb22e4 Fix link error in bf_nodes
I got undefined reference errors on the `NodeMFNetworkBuilder::get_default_fn`
function under some circumstances. This symbol is definitely defined in bf_blenkernel.
The error seemed a bit undeterministic and was probably caused by some incorrect
link order. I don't get the error with this change.
2020-07-16 19:52:28 +02:00