Commit Graph

79204 Commits

Author SHA1 Message Date
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
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
Campbell Barton
f0285e347e Cleanup: use const for dupli vert/face, 'r_' prefix for return value
Make it obvious which values are used read-only, which are written to.
2020-08-13 14:03:46 +10:00
Hans Goudey
536b6b6376 Merge branch 'blender-v2.90-release' 2020-08-12 21:04:19 -04:00
pembem22
bb2908472c UI: Fix curve widget fill artifacts
Disable antialiasing which caused artifacts.

Differential Revision: https://developer.blender.org/D8497
2020-08-12 21:02:05 -04:00
Germano Cavalcante
579cb774da Fix hair collision error introduced in recent commit 2020-08-12 18:40:48 -03:00
Germano Cavalcante
5319eb36a5 Cleanup: Silence some arithmetic overflow warnings 2020-08-12 18:25:45 -03:00
Germano Cavalcante
c5e469a3e4 Cleanup: Move definitions of some variables closer to their use 2020-08-12 18:25:45 -03:00
Germano Cavalcante
7d16db417b Cleanup: move assignment out of loop 2020-08-12 18:25:45 -03:00
Germano Cavalcante
6d9358d453 Cleanup: Rename variable 'cloth1' to 'cloth' 2020-08-12 18:25:45 -03:00
Pablo Dobarro
ca827e36ac Fix Boundary Brush symmetry with no constant falloff
When using constant falloff symmetry was working fine because the same
deformation is applied twice on the same vertices. When using no
constant falloffs, the deformation is different between symmetry passes,
so vertices need to be separated by symmetry areas to get the right
deformation from its symmetry pass without being overwriten by the next
one.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8541
2020-08-12 23:07:52 +02:00
Antonio Vazquez
1260baf16b GPencil: Remove unused variable and fix memory leak
This was missing in previous commit
2020-08-12 23:07:27 +02:00
Pablo Dobarro
c77bf95221 Sculpt: Boundary Brush Falloff Types and Offset
This adds the boundary_falloff_type and boundary_offset to control how the
falloff of the Boundary Brush is applied.

Boundary Origin Offset is the same concept as the Pose Origin offset in
the Pose Brush. It is a multiplier that adds extra length to the brush
radius to locate the deformation pivot further from the boundary without
affecting the falloff.

The Falloff type includes Constant (previous default), brush radius, loop
and loop and invert. Loop and Loop and Invert can be used to create
deformation patterns in a mesh.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8526
2020-08-12 23:06:42 +02:00
Antonio Vazquez
db7cfd03b0 GPencil: Remove unused parameter in convert curve
The only_stroke parameter is not used
2020-08-12 22:48:19 +02:00
Antonio Vazquez
e188a798c6 GPencil: Clean material list when convert a curve
Now the list of materials is cleanup and any duplicated material is removed.
2020-08-12 22:48:14 +02:00
Antonio Vazquez
cd49c7b5ea GPencil: Move merge similar materials code to BKE
This is required in other places and need to be shared.
2020-08-12 22:48:10 +02:00
Antonio Vazquez
01636ed159 GPencil: Fix unreported problem in merge similar materials
When two similar colors were adjacent, the colors were not merged.
2020-08-12 22:48:06 +02:00
Antonio Vazquez
b126e38f6b GPencil: Fix unreported error in merge similar materials
When the color was black, the original value was not initialized and get a NaN value with unexpected results.

Also cleanup code.
2020-08-12 22:48:00 +02:00
Antonio Vazquez
3d247abb78 GPencil: Remove unused lines 2020-08-12 22:47:56 +02:00
Antonio Vazquez
145445c6b4 GPencil: Recode all material management when convert SVG 2020-08-12 22:47:51 +02:00
Antonio Vazquez
504c257dae GPencil: Add Sample parameter to Convert curve
This allows to resample the stroke to avoid too dense geometry.
2020-08-12 22:47:47 +02:00
Antonio Vazquez
9abdafe840 GPencil: Add parameters to scale thickness when convert Curves
This parameter allows to scale the thickness.
2020-08-12 22:47:43 +02:00
Antonio Vazquez
19cef4073d GPencil: Interpolate thickness when convert Curve to GPencil
The curve was using only the last point radius of the segment. Now, the value is interpolated between start and end points.
2020-08-12 22:47:38 +02:00
Clément Foucault
54b3168c4a Fix T77424 Overlay: Editmode: Issue with multi edit and in-front option
This is a nice addition to the refactor. Now any combination of in-front
/ not in-front will work in non x-ray edit mode.
2020-08-12 19:57:23 +02:00
Germano Cavalcante
f21cdf0d12 Clenaup: Deduplicate cloth collision code
And do the clamp by vertex instead of triangle.
2020-08-12 14:49:59 -03:00
Bastien Montagne
eee88f7cec Merge branch 'blender-v2.90-release' into master 2020-08-12 19:03:32 +02:00