Commit Graph

99007 Commits

Author SHA1 Message Date
Hans Goudey
aabbb515d6 UI: Use consistent geometry icon color
The grease pencil weight sculpt icon was using a slightly different
shade of blue than the other icons.
2020-08-13 12:13:21 -04:00
Hans Goudey
0664194497 UI: Simplify more geometry icons
Again, no visual changes, just removed internal vertices where they
were unecessary.
2020-08-13 12:09:20 -04:00
Bastien Montagne
4ff414d40d Merge branch 'blender-v2.90-release' into master 2020-08-13 17:48:41 +02:00
Bastien Montagne
9813778a2d Fix T79591: Liboverride: do not update overrides on missing linked data.
It makes no sense to generate/update overrides from missing (broken
linked) reference data, just keep existing ones unchanged then.
2020-08-13 17:41:33 +02:00
Hans Goudey
53683dec7d UI: Simplify geometry icons
Many of the icons had lots of interior geometry left over from
subdivision. In these cases we should remove the interior geometry
and leave the object with the modifier for the future.
2020-08-13 10:30:08 -04:00
Hans Goudey
52e7d0bebe Merge branch 'blender-v2.90-release' 2020-08-13 10:05:20 -04:00
Hans Goudey
4e103101f7 UI: Add sculpt cloth filter tool icon
This icon mimics the details of the cloth brush icon while using the
frame style extablished for the other "filter" tools.

Differential Revision: https://developer.blender.org/D8467
2020-08-13 10:04:48 -04:00
Hans Goudey
f66fc94da6 UI: Add sculpt cloth filter tool icon
This icon mimics the details of the cloth brush icon while using the
frame style extablished for the other "filter" tools.

Differential Revision: https://developer.blender.org/D8467
2020-08-13 10:03:44 -04:00
Sergey Sharybin
6fe609d4c3 Sequencer: Implement zoom-to-fit view mode
In this mode the preview image is always using the most of the preview
area space: it is scaled to fit, preserving aspect ratio. This makes it
possible to always have maximum of the preview region even after resize
of other areas.

This mode is enabled by default, is available in the View -> Zoom to Fit
menu. It is enabled when View All (Home key) is used, and is disabled
when manual navigation ([panning, zooming) is performed.

There is no versioning code, which means existing files will open as-is,
but new projects will have this option enabled.

Ref T78987

Maniphest Tasks: T78987

Differential Revision: https://developer.blender.org/D8549
2020-08-13 15:24:21 +02:00
Sergey Sharybin
0df28e8c20 View2D: Inform region type on current view changes
Allows to hook per-space code which is to be run on view navigation.
This is required to have zoom-to-fit implemented in the sequencer.

There might be more cases where the clalback is to be called from,
but it could be easier to address those on the case-by-case basis
when its needed.
2020-08-13 15:24:21 +02:00
Sergey Sharybin
c27123632b View2D: Centralize handling of changes to v2d->cur
Currently there are no functional changes, preparing code to add more
functionality which is to be run from navigation/zoom operators.
2020-08-13 15:24:21 +02:00
Jacques Lucke
4f209fab2c Fix T79082: Softbody self-collision does not work on lattices
Reviewers: zeddb

Differential Revision: https://developer.blender.org/D8562
2020-08-13 14:41:44 +02:00
Clément Foucault
b89521de21 UVEdit: Fix drawing after recent refactor 2020-08-13 14:27:16 +02:00
Clément Foucault
a6447ca72d GPU: Fix MSVC warning 2020-08-13 14:20:24 +02:00
Clément Foucault
d52f28380b GPU: Fix issue with MDI and recent refactor 2020-08-13 14:20:24 +02:00
Clément Foucault
f349ea5508 GPUDrawList: Fix gl error with drawing without the correct VAO bound 2020-08-13 14:20:24 +02:00
Clément Foucault
985070b1ce GPUShader: Add more uniform functions 2020-08-13 14:20:24 +02:00
Clément Foucault
ac60a67b3f Cleanup: GPU: Remove Batch vao cache reset
This is done at drawtime automatically.
2020-08-13 14:20:24 +02:00
Clément Foucault
efc97b3919 GPUBatch: GL backend isolation
This changes the drawing paradigm a bit. The VAO configuration is done
JIT-style and depends on context active shader.

This is to allow more flexibility for implementations to do optimization
at lower level.

The vao cache is now its own class to isolate the concept. It is this
class that is reference by the GLContext for ownership of the containing
VAO ids.
2020-08-13 14:20:24 +02:00
Clément Foucault
47bfb0f7ad GPUBatch: Move allocator to backend 2020-08-13 14:20:24 +02:00
Clément Foucault
9443da6166 GPUBatch: Merge phase and ownership flags and cleanup there usage
Also add new flags to communicate specific behavior to future backend.
2020-08-13 14:20:24 +02:00
Clément Foucault
e0f5f95e66 DRW: InstanceData: Remove hacks of batch freeing callback
We instead use a handle reference counter on the GPUVertBufs used by
the instancing batches. This make sure that if an update happens on the
GPUVertBuf used to contruct the batch, they will never have the same
memory address than the previously allocated ones (since they are still
pending deletion thanks to the refcounter).

This avoid the linear search to update the GPUBatch in the case a
batch is deleted (which was even a bad option since they could be only
cleared)
2020-08-13 14:20:24 +02:00
Clément Foucault
157f2a20e6 GPU: Use GPU_vertbuf_create & GPU_indexbuf_calloc instead of manual alloc 2020-08-13 14:20:23 +02:00
Clément Foucault
00a3c297d2 GPUVertBuf: Add handle refcount
A handle refcount is here to avoid freeing of the GPUVertBuf datablock
if it is still referenced somewhere else.

This does not prevent deleting the actual data. This is to avoid too
much zombie data usage.

This is in order to avoid most hacks inside `draw_instance_data.c`.
2020-08-13 14:20:23 +02:00
Clément Foucault
93165cbf47 GPUBatch: Remove most use of GPU_batch_draw_advanced()
This is in order to better encapsulate / isolate the drawing code.
2020-08-13 14:20:23 +02:00
Clément Foucault
de4eb115ac Cleanup: GPUBatch: Remove GL functions from uniform assignment 2020-08-13 14:20:23 +02:00
Clément Foucault
b0f30bd684 Cleanup: GPUBatch: Move gpu_batch_private.h to CPP header 2020-08-13 14:20:23 +02:00
Clément Foucault
16b28ff974 Cleanup: GPUShader: Remove unused code 2020-08-13 14:20:23 +02:00
Clément Foucault
854c999d82 GPUShader: Change shader state tracking to be part of the GPUContext
This remove the use of batch->program and replace it with batch->shader.

This will allow GL abstraction latter.
2020-08-13 14:20:23 +02:00
Clément Foucault
186abf7d3b GPUBatch: Remove usage of gl_prim_type outside of GPU module 2020-08-13 14:20:23 +02:00
Clément Foucault
38ef35b1ed GPUDrawList: GL backend isolation 2020-08-13 14:20:23 +02:00
Sybren A. Stüvel
cb2565195e Fix T65148: Drivers can't access shape keys
It was impossible for drivers to use shape key properties, modifiers
generate a new mesh. After mesh evaluation the shape keys are no longer
necessary, and because of this the `key` pointer was not copied. As
drivers work on evaluated data, however, they do need this `key`
pointer.

This commit makes the `key` pointer available in evaluated meshes, but
this is somewhat dangerous. There was an explicit reason why the key on
result was kept at null pointer: to have the evaluated mesh in a
consistent state. Assigning this pointer makes it potentially
inconsistent, as the evaluated mesh and the original shape key may have
different topologies.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D7785
2020-08-13 13:56:41 +02:00
Philipp Oeser
46aa302400 Merge branch 'blender-v2.90-release' 2020-08-13 11:50:07 +02:00
Philipp Oeser
ada98869df Preferences: correct property description for keyitem restore
Spotted while checking T79657.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D8517
2020-08-13 11:44:57 +02:00
Brecht Van Lommel
0843d5b024 Fix T79743: baking still uses cage object after removal 2020-08-13 11:30:56 +02:00
Jacques Lucke
28c1300115 Fix T79653: Change soft min frame start of cache from 1 to 0
It was always possible to set it to zero by typing in the value.
This new soft limit is more consistent with the fluid cache
and the Scene.frame_start property.
2020-08-13 11:03:05 +02:00
Antonio Vazquez
7c380119a7 GPencil: Remove unused parameter and fix warning 2020-08-13 08:39:46 +02:00
Campbell Barton
29c28ac022 Cleanup: incorrect comment wrapping
Missed this comment when updating fix for T77409.
2020-08-13 16:38:01 +10:00
Campbell Barton
e84ffae7ba Cleanup: warnings 2020-08-13 16:23:43 +10:00
Campbell Barton
357547b010 Cleanup: spelling 2020-08-13 16:21:10 +10:00
Campbell Barton
608ec79bc3 Cleanup: clang-format 2020-08-13 16:01:38 +10:00
Campbell Barton
38b5f56dad Merge branch 'blender-v2.90-release' into master 2020-08-13 15:46:55 +10:00
Campbell Barton
f875d3e504 Merge branch 'blender-v2.90-release' into master 2020-08-13 15:46:46 +10:00
Campbell Barton
ad05e1100f Fix T77409: Crash showing vertex/face duplicators in edit-mode
This was a regression in deaff945d0 which skips copying a mesh.
Dupli-verts/faces were not updated to account for this.

This supports iterating over edit-mesh vertices & faces,
since falling back to a full copy (as we do in some places)
will be slow while transforming geometry.

This commit looks as if it would change behavior with orcos,
since any edit-mesh deformation causes them to be assigned.
However in practice there is no functional change, details in comments.
2020-08-13 15:41:57 +10:00
Campbell Barton
9bf8b6799d Cleanup: remove two sided face check
Two sided faces aren't supported and would cause many issues elsewhere.
2020-08-13 15:41:57 +10:00
Campbell Barton
ee909783de Cleanup: use 'inst_ob' variable name for consistency
Dupli verts/faces named these arguments differently.
2020-08-13 15:41:57 +10:00
Campbell Barton
494560f19d Cleanup: remove unused struct members from dupli-face/vert
Replace the evaluated mesh with VertexDupliData.mvert since only
vertices are used. This makes dupli-vert similar to how dupli-face
was already working.
2020-08-13 15:41:57 +10:00
Campbell Barton
a45f2fd1fb Cleanup: move mesh access for dupli vert/face into shared function
De-duplicate mesh access & comments.
2020-08-13 15:41:57 +10:00
Campbell Barton
12c24ecf6e Cleanup: pass normal as a float to dupli-vert function
Needed for supporting edit-mode dupli-verts.

Currently the un-scaled short values are used to avoid
changing behavior (noted in comments).
2020-08-13 15:41:57 +10:00
Campbell Barton
51a461dcab Cleanup: spelling, use full sentences for object_dupli.c 2020-08-13 15:41:52 +10:00