Commit Graph

90372 Commits

Author SHA1 Message Date
Hans Goudey 81d75affb1 Cleanup: Use const arguments in definition, add helper variable 2022-08-03 11:59:16 -05:00
Aras Pranckevicius ac32f5ac4f Merge branch 'blender-v3.3-release' 2022-08-03 19:09:57 +03:00
Aras Pranckevicius 10c4734978 Fix T100173: fix missing removal of old name in BLO_update_defaults_startup_blend
If a screen had to be renamed, the old name was not removed from
the name map. Fixes T100173.
2022-08-03 19:09:21 +03:00
Iliay Katueshenock 55a332da64 Attribute Math: Improve performance of mixer in some cases
The `DefaultMixer` for mixing generic data types has some issues:
1. The full buffer is always zeroed, even if only some is used.
2. Finalizing also works on all values, even if only some are used.
3. "mixing" doesn't allow setting the first value, requiring that
everything is cleared beforehand.

This commit adds the following functionality:
1. Constructor with the specified `IndexMask` for preliminary zeroing.
2. `set` method to overwrite the value.
3. `finalize` with the specified mask to process a subset of values.

This is useful in situations where you want to use the
DefaultMixer without having to overwrite all the values many times.

A performance improvement was observed for NURBS curve evaluation and
attribute interpolation from the point to curve domain of about 15% and
35% respectively (100,000 curves).

Differential Revision: https://developer.blender.org/D15434
2022-08-03 10:18:02 -05:00
Sebastian Parborg 144027d70f Fix sequencer viewport render not respecting the "use_stamp" option
The sequencer OpenGL viewport renders would not render the metadata into
the image even if the option was on.

Did minor cleanups in the render function as well.
2022-08-03 17:15:19 +02:00
Hans Goudey 42f9430a3a Fix: Warning from incorrect use of macro
From d52551401e, exposed by recent C++ conversion.
2022-08-03 09:41:01 -05:00
Hans Goudey 9c8998ed11 Merge branch 'blender-v3.3-release' 2022-08-03 09:25:28 -05:00
Hans Goudey 06b6c004f5 Fix T100168: Sculpt positions undo not working after recent commit
efe0e2b183 used the "normals_update" for applying positions from
an undo step, which doesn't set the necessary flags for a redraw.
2022-08-03 09:18:13 -05:00
Antonio Vazquez bdc30bd0fb Fix T100171: GPencil toggle caps operator does not support multiframe
This was a missing feature.
2022-08-03 15:45:08 +02:00
Bastien Montagne 9896dd4d16 Merge branch 'blender-v3.3-release' 2022-08-03 10:49:45 +02:00
Bastien Montagne 25517f36bc Cleanup: Improve doc of the `BKE_id_copy` functions. 2022-08-03 10:49:20 +02:00
Sergey Sharybin d269fb1d72 Fix assert failures in the dependency graph
Happens after recent changes in the area.

The asserts were a bit too strict and were against the way how the
ID_RECALC_ALL is handled. So remove them with explanation why things
needs to be silent.
2022-08-03 09:31:05 +02:00
Aras Pranckevicius e3913ec6c1 Merge branch 'blender-v3.3-release' 2022-08-03 09:51:34 +03:00
Aras Pranckevicius 89f0fedb5c Fix T97769: new OBJ exporter does not replace spaces in object names
The Python based exporter was replacing spaces with underscores
in object/group names, mostly to handle cases where names could begin
or end with spaces. The new exporter was not doing that. Note: spaces
in material names were already handled by the new exporter.

Fixes T97769. Updated test coverage expectations; one of the test
files has an object with a space in the name.
2022-08-03 09:49:56 +03:00
Jeroen Bakker c9821b6c01 Fix compile issue in recent commit.
fallthrough in case statement.
2022-08-03 08:25:41 +02:00
Angus Stanton ea70687dd5 Image: Display GPU layout in `uiTemplateImageInfo`
Add IMB_gpu_get_texture_format and GPU_texture_format_description to
retrieve and 'stringify' an eGPUTextureFormat. These are then used in the
image info panel used in several areas across blender.

New Information:
{F13330937}

Reviewed By: jbakker

Maniphest Tasks: T99998

Differential Revision: https://developer.blender.org/D15575
2022-08-03 08:15:12 +02:00
Colin Basnett abc46d5aeb Fix: Timeline marker names are not correctly clipped in some cases
Timeline marker names are now correctly clipped instead of messily
overlapping each other and being unreadable. This change affects all
the animation editors (graph editor, NLA, action editor etc.) as well
as the VSE.

This also makes a change to when text is elevated. In the previous
behavior, a marker's text would be elevated if it was selected or if
the current frame was <= 4 frames away from the marker. This seems
like a completely arbitrary thing (probably added in to alleviate text
overlapping for markers that the user would be interested in). This
patch changes the behavior such that the marker's text will be elevated
if it is either selected or it is the last marker encountered relative
to the current frame.
2022-08-02 20:59:44 -07:00
Chris Blackbourn 68c1eb86a6 Fix unreported: Add tie-break conditions for udim search with integers
When searching for closest UDIM with integer co-ordinates, several UDIMs
can be equidistant. Previously, of all closest UDIMs, the one which was
earliest in the list would be used. Now, "half-open interval" rules are
used to break the tie.

Motivated by 0fcc04e7bf

Differential Revision: https://developer.blender.org/D15590
2022-08-03 13:20:54 +12:00
Hans Goudey 43918ec28d Geometry Nodes: Speed up reading attribute with different type
The virtual array created by the implicit conversions had a lot of
overhead when converting many values. Implement "materialize"
functions to avoid a virtual function call for every element.
This gave me a 20x improvement when copying the values
from a float attribute as a boolean, though I doubt there are
any real world situations where it's that noticible.
2022-08-02 19:23:13 -05:00
Chris Blackbourn fc1a53eb7b Cleanup: Remove unused function `uv_poly_copy_aspect` 2022-08-03 09:51:55 +12:00
Clément Foucault f4fe3fb09b EEVEE-Next: Depth Of Field: Port implementation to compute shader
This is a port of the previous implementation but using compute
shaders instead of using the raster pipeline for every steps.

Only the scatter passes is kept as a raster pass for obvious performance
reasons.

Many steps have been rewritten to take advantage of LDS which allows faster
and simpler downsampling and filtering for some passes.

A new stabilize phase has been separated from another setup pass in order
to improve it in the future with better stabilization.

The scatter pass shaders and pipeline also changed. We now use indirect
drawcall to draw quads using triangle strips primitives. This reduces
fragment shader invocation count & overdraw compared to a bounding
triangle. This also reduces the amount of vertex shader invocation
drastically to the bare minimum instead of having always 3 verts per
4 pixels (for each ground).
2022-08-02 21:53:17 +02:00
Clément Foucault 2ea4754109 EEVEE-Next: Cleanup: Remove static references for swapchains
Those are no longer necessary.
2022-08-02 21:53:17 +02:00
Clément Foucault 335dbccc33 EEVEE-Next: Fix GL errors when rendering with transparent materials
For now, we need to always bind the render pass images even if not used.
2022-08-02 21:53:17 +02:00
Clément Foucault 75dda90030 EEVEE: Depth of field: Fix incorrect variance occlusion
The change is likely not noticeable.
2022-08-02 21:53:17 +02:00
Clément Foucault 04d43e8dbb GL: Remove lingering image binds
This updates image bind tracking to be the same as texture binds.
Adding a new bind flag to avoid conflict when the texture is used in
both slots.
Fixes a gl error in glBindImageTextures about invalid image binds.
2022-08-02 21:53:17 +02:00
Clément Foucault d629402054 GL: Compute: Fix indirect compute barrier and unbind
This path is not used by any existing code so it isn't necessary to
backport.
2022-08-02 21:53:17 +02:00
Clément Foucault 35762cea91 DRW: common_math_lib.glsl: Fix weighted_sum macro
This avoids issue when the macro is followed by another operator.
Example:
`float result = weighted_sum(a,b,c,d,w) * 5.0;`
2022-08-02 21:53:17 +02:00
Clément Foucault 8a0f804e2b DRW: Add image unbind in debug mode
This allows finding missing binds more easily as the missing binds slots
won't be populated with previous texture binds.
2022-08-02 21:53:17 +02:00
Clément Foucault 24a0015dbd DRW: Add `DRW_shgroup_call_procedural_indirect()`
Replaces `DRW_shgroup_call_procedural_triangles_indirect`.
This makes the indirect drawing more flexible.
Not all primitive types are supported but it is just a matter of adding
them.
2022-08-02 21:53:17 +02:00
Clément Foucault 9a52f1f720 DRW: Add DRW_shgroup_call_procedural_triangles_indirect
Just like the name suggest, this adds a way to draw a series of proceduraly
positioned triangles using and indirect buffer.
2022-08-02 21:53:17 +02:00
Clément Foucault 710609a2e0 DRW: GPU Wrapper: Fix invalid cached texture view when ensure() reallocs 2022-08-02 21:53:17 +02:00
Clément Foucault 22143b351f DRW: GPU wrapper: Make SwapChain renference work
This make using texture reference easier. But now, it makes it mandatory
for the wrapped type to implement the `swap()` static method.
2022-08-02 21:53:17 +02:00
Clément Foucault 04160ffd12 DRW: GPU wrappers: Expose more ease of use functions and cleanup style 2022-08-02 21:53:17 +02:00
Clément Foucault 1e5ab041d7 GPUBatch: Add GPU_batch_draw_indirect
This allows rendering a batch with parameters computed by the GPU.

Contains GL backend implementation.
2022-08-02 21:53:17 +02:00
Hans Goudey c5b361335a Cleanup: Simplify functions for adding and removing color attributes
The specific functions for vertex colors and and sculpt vertex colors
can be replaced by more generic attribute functions internally.
Also remove a paramter from one function.
2022-08-02 14:43:36 -05:00
Hans Goudey 44aa9e40ff Cleanup: Remove unused sculpt and vertex color operators
The "Color Attributes" system from f7bbc7cdbb has replaced
both "Sculpt Vertex Colors" and "Vertex Colors" in the UI. The Operators
for adding and removing them are unused now.

This commit does not break backwards compatibility with the Python
API, it only removes the operators, which generally aren't used by
addons anyway. The mesh RNA properties will be removed in 4.0 (T100153).

Differential Revision: https://developer.blender.org/D15077
2022-08-02 14:17:20 -05:00
Hans Goudey a48e5c53a5 Cleanup: Simplify const cast in virtual array construction 2022-08-02 13:44:07 -05:00
Hans Goudey 2ba2efc296 Cleanup: Simplify arguments to sculpt draw functions
Instead of passing pointers to specific mesh data, rely on
retrieving that data from the mesh internally. This makes
it easier to support retrieving additional data from Mesh
(like active attribute names in D15101 or D15169). It also makes
the functions simpler conceptually, because they're drawing
a mesh with an acceleration strcture on top.

The BKE_id_attribute_copy_domains_temp call was unnecessary
because the GPU_pbvh_mesh_buffers_update function was only
called when Mesh/PBVH_FACES is used in the first place.

Differential Revision: https://developer.blender.org/D15197
2022-08-02 13:32:45 -05:00
Aras Pranckevicius 5ddaf2fa7b Merge branch 'blender-v3.3-release' 2022-08-02 21:01:54 +03:00
Aras Pranckevicius ead8260a49 Object: move collection resync after empty duplicate early-out
As pointed out in rB02b1a209be88 comment, the BKE_main_collection_sync
should be after "nothing to duplicate" early-out.
2022-08-02 21:01:25 +03:00
Sebastian Parborg b010985e4a Fix T99255: Strips inserting incorrectly
When dropping file to sequencer timeline, coordinates for strip position
and overlap handling are used even if not set.

Reset internal state in on_drag_start callback and set is_modal
variable only if coordinates are updated. This way when dragging file
from external file browser, strip is added at current frame as before
modal operator was implemented.

Reviewed By: Richard Antalik

Differential Revision: http://developer.blender.org/D15333
2022-08-02 19:36:42 +02:00
Hans Goudey 2d4498e457 Merge branch 'blender-v3.3-release' 2022-08-02 11:11:20 -05:00
Hans Goudey efe0e2b183 Fix T96810: Invalid sculpt normals after some operations
Mask and color brushes were using the existing PBVH vertex "update tag"
to mark their modifications. This was mostly unnecessary, and causes
unnecessary calculation of normals. It also caused errors though,
because they didn't tag the corresponding PBVH node for normal
recalculation, causing problems on the borders of nodes, since one
node might accumulate into another's vertex normals, but the other
node wouldn't also accumulate and normalize the normals.

The solution is to only use the update tag for tagging deformed
vertices that need recalculated normals. Everything else is handled at
the PBVH node level (which was already the case, but it wasn't clear).

The update tag was also used for undo to tag the nodes corresponding to
changed vertices. This was wrong though, because normals and visibility
would also be recalculated for just color or mask undo steps. Instead,
just use local arrays to map from vertices to nodes.

Differential Revision: https://developer.blender.org/D15581
2022-08-02 11:00:57 -05:00
Richard Antalik ac9d9c993a Merge branch 'blender-v3.3-release' 2022-08-02 17:57:12 +02:00
Richard Antalik 97b226ac51 Fix T100049: Crash when render finishes
Caused by NULL dereference of `Editing` before NULL check was done.
2022-08-02 17:52:40 +02:00
Antonio Vazquez 09ac5f97a7 GPencil: Fix compiler warning
The variable can never be NULL and the comparison was wrong.
2022-08-02 17:03:33 +02:00
Hans Goudey dadfdc8226 Merge branch 'blender-v3.3-release' 2022-08-02 09:51:08 -05:00
Hans Goudey d3eef4d22a Fix: Use evaluated materials in OBJ exporter
Since 1a81d268a1, materials on object data can change during
evaluation. But a different function is necessary to retrieve materials
taking that into account.

Solves part of T96721.

Differential Revision: https://developer.blender.org/D15595
2022-08-02 09:49:51 -05:00
Bastien Montagne 84aa8b85a2 Merge branch 'blender-v3.3-release' 2022-08-02 15:07:54 +02:00
Bastien Montagne e4dd644d6b LibOverride: Add 'editable/clear' toggle to ID template.
Now when an ID template is set to an override ID, `Shift-Click` on the
right button toggles between making it user-editable (if it's a system
override), or clearing any user edit and setting it back to system override.
2022-08-02 15:07:33 +02:00