Commit Graph

114874 Commits

Author SHA1 Message Date
Campbell Barton 42d748be34 pyproject: re-enable line wrapping for autopep8
The problem noted in the configuration file no longer occurs,
re-enabling line wrapping (E501).
2022-05-13 18:05:07 +10:00
Campbell Barton 0d1b9eabf2 Merge branch 'blender-v3.2-release' 2022-05-13 16:14:29 +10:00
Campbell Barton 3e5cb7b23e Merge branch 'blender-v3.2-release' 2022-05-13 16:14:26 +10:00
Campbell Barton b3938d2a36 Merge branch 'blender-v3.2-release' 2022-05-13 16:14:20 +10:00
Campbell Barton 113b8030ce Fix T89909: Circle Select tool status bar doesn't match the operations
Assign get_name functions for select picking and circle select
so modifier keys show the result of holding the modifiers.
2022-05-13 16:09:04 +10:00
Germano Cavalcante 470cbad51a Fix T97872: Annotation lines lost AA
Since rB2a7a01b339ad, `lineSmooth` has lost its default value of true.

rBa0a99fb25284 only fixed the problem on master.

But thanks to @hitrpr for spotting the bug in version 3.2 too.

Differential Revision: https://developer.blender.org/D14876
2022-05-12 22:22:27 -03:00
Campbell Barton 427a2c920a Cleanup: spelling in comments, capitalize tags
Also add missing task-ID reference & remove colon after \note as it
doesn't render properly in doxygen.
2022-05-13 09:29:25 +10:00
Brecht Van Lommel 906b9f55af Cleanup: remove redundant float to byte conversion for stereo image saving
For non-stereo cases this is automatically handled by IMB_saveiff, no reason for
stereo to do this separately.

Ref D14899
2022-05-12 22:58:27 +02:00
Brecht Van Lommel c0df1cd1b3 Cleanup: remove redundant code and data copying image save as operator
Store ImageSaveOptions directly in operator custom data instead of copying
to/from a copy on the stack.

Ref D14899
2022-05-12 22:58:27 +02:00
Brecht Van Lommel 1159b63a07 Cleanup: move image save options init to image_save.cc
The logic here is tightly coupled to the other image saving code.

Ref D14899
2022-05-12 22:58:27 +02:00
Brecht Van Lommel 6044c6d09b Cleanup: remove unused function declaration 2022-05-12 22:58:27 +02:00
Clément Foucault c09cfdb251 DRW: Fix Compilation on OSX
Caused by rBe4bb898e40ee
2022-05-12 22:10:59 +02:00
Jason Fielder 073139e329 Metal: MTLState module implementation.
MTLState module implementation and supporting functionality in MTLContext for state tracking, texture binding and sampler state caching.

Ref T96261

Reviewed By: fclem

Maniphest Tasks: T96261

Differential Revision: https://developer.blender.org/D14827
2022-05-12 20:50:11 +02:00
Clément Foucault 992ae3f282 DRW: Port draw_shader to C++ 2022-05-12 20:40:23 +02:00
Clément Foucault e4bb898e40 DRW: Port draw_hair to C++ 2022-05-12 20:40:23 +02:00
Clément Foucault f3f7f8b37b Cleanup: Remove unused gpu_shader_geometry.glsl 2022-05-12 20:40:23 +02:00
Dalai Felinto 17fc8db104 UI: Tweak Sculpting Trim icons
Update the trim icons so they don't show a dashed line. Instead they
have now a continuous red line.

This is important because the sculpting tools are planning to use the
same icons for selection as the regular tools. And those icons use
dashed line to represent selection.

Note the icon file has two new icons which are not used at the moment
(they are in the Unused collection):

* ops.generic.select_paint
* ops.generic.select_line
2022-05-12 18:55:09 +02:00
Brecht Van Lommel 018acc5688 Build: patch USD to avoid using rdtscp instruction not available on older CPUs
Disable the new more accurate timing code, this is not needed for Blender.
In USD itself this code is disabled on macOS anyway, so it should operate fine
without it.

Ref T97950, T95206

Differential Revision: https://developer.blender.org/D14928
2022-05-12 18:38:51 +02:00
Hans Goudey c5b67975cd Cleanup: Fix range loop construct warning 2022-05-12 17:51:03 +02:00
Bastien Montagne d634194cac Merge branch 'blender-v3.2-release' 2022-05-12 17:45:46 +02:00
Bastien Montagne 2c784f44cf Cleanup: use proper naming in Warp modifier read/write code. 2022-05-12 17:45:16 +02:00
Julian Eisel 766340856d UI Code Quality: Use derived struct for hot-key buttons
`uiBut` contained a variable that was only used for these hot-key
buttons. This may also help getting rid of the `UI_BUT_IMMEDIATE` flag,
which is also only used for this button type. We are running out of
available bits for flags, so this would be useful.

Continuing the work from 49f088e2d0. Part of T74432.
2022-05-12 17:41:26 +02:00
Bastien Montagne d1f32b63eb Merge branch 'blender-v3.2-release' 2022-05-12 17:27:18 +02:00
Bastien Montagne 32fd85e6f9 Fix (unreported) bad memory access in read/write code of MeshDeform modifier.
This abuse of one one size value to handle another allocated array of a
different size is bad in itself, but at least now read/write code of
this modifier should not risk invalid memory access anymore.

NOTE: invalid memory access would in practice only happen in case endian
switch would be performed at read time I think (those switches only check
for given length being non-zero, not for a NULL data pointer...).
2022-05-12 17:24:30 +02:00
Sergey Sharybin b24f204e91 Cleanup: Clarify function name and comment logic
This is a bit tricky exceptional case, which originates to an original
motion tracking commit. Took a while to remember what it is ab out so
here is a comment for the future developers.
2022-05-12 17:20:54 +02:00
Julian Eisel ccd18691fc Cleanup: Remove another unused hotkey button definition function
See f2c7b56f0f.
2022-05-12 17:05:37 +02:00
Julian Eisel f2c7b56f0f Cleanup: Remove unused hotkey button definition function
This isn't used, and I also see any use for it short-term.
2022-05-12 16:56:14 +02:00
Julian Eisel 3693e1d8e8 Revert commits to increase button flag bitfield size
This reverts the commits 8d9d5da137,
59cd616534 and
98a04ed452.

The commits are causing issues with MSVC, see D14926. I'm working on a
different solution, but that will need some work.
2022-05-12 16:56:14 +02:00
Martijn Versteegh c31f519954 CMake: Fix missing dependency in bf_editor_curves
curves_ops.cc uses RNA_Prototypes.h. so bf_rna
needs to build before bf_editor_curves.
2022-05-12 08:42:19 -06:00
Clément Foucault d9effc1cc6 Fix T98071: Overlay: UV selection inverted bewteen vertex and edge select
Self describing title.

Also remove the layout inside the geometry shader as they are now generated
by the backend.
2022-05-12 15:11:07 +02:00
Clément Foucault 092cbacd8f Fix T98026 EEVEE: Refression Crash when rendering Cryptomatte passes
This was because the main `surface_vert.glsl` was changed to accomodate the
needs of the `ShaderCreateInfo` but was still used by the cryptomatte
shader. The fix is to include the same libraries as the material shaders
and bypass `attrib_load()`.
2022-05-12 13:58:14 +02:00
Jacques Lucke 65d44093c9 Merge branch 'blender-v3.2-release' 2022-05-12 13:39:17 +02:00
Jacques Lucke 2e8089b6bf Workaround for msvc compiler bug
https://developercommunity.visualstudio.com/t/Alias-template-inside-fold-expression-fa/10040507
2022-05-12 13:38:22 +02:00
Jacques Lucke dea5d22da1 Cleanup: remove warnings due to maybe-used variables
The variable was only used in some constexpr if-statements.
2022-05-12 13:03:12 +02:00
Jacques Lucke 94a54ab554 Curves: add operator to convert hair particle system to new curves
This creates a new curves object with the name of the particle system.
The generated curves match the current evaluated state of the active hair
particle system.

Attachment information is not transferred currently.

Differential Revision: https://developer.blender.org/D14908
2022-05-12 12:55:50 +02:00
Aras Pranckevicius 9757b4efb1 OBJ: improve new importer file parsing performance on windows
The OBJ parser was primarily using StringRef for convenience, with
functions like "skip whitespace" or "parse a number" taking an input
stringref, representing an input line, and returning a new stringref,
representing the remainder of the line. This is convenient, but does
more work than strictly needed -- while parsing, only the "beginning"
of the line ever changes by moving forward; the end of the line
always stays the same. We can change the code to take a pair of
pointers (begin of line, end of line) as input, and make the
functions return the new begin of line pointer. This makes the return
value neatly fit into a processor register, which StringRef did not.

On Windows, this does result in non-trivial speedups in the actual
OBJ file parsing part, due to Windows calling convention where return
values larger than 64 bits are returned via memory. Does not
measurably affect performance on Mac/Linux, because the calling
convention there uses a pair of 64-bit registers to return a
StringRef.

End-to-end times of importing several test files, on Windows
(VS2022 build, Ryzen 5950X):

- Monkey subdivided to level 6, no normals (220MB file): 1.25s -> 0.85s
- Rungholt minecraft level (270MB file): 7.0s -> 5.8s
- Blender 3 splash scene (2.4GB file): 49.1s -> 45.5s

The full import process has a lot of other overhead besides actual
OBJ file parsing (mostly creating actual blender objects out of
parsed data). In pure parsing, in the monkey test scene above, the
parsing part goes 1.0s -> 0.6s.

Reviewed By: Howard Trickey
Differential Revision: https://developer.blender.org/D14936
2022-05-12 13:49:05 +03:00
Clément Foucault f5077e057b Fix T97380 EEVEE: Weird motion-blur on curves
This was caused by the `mb_data->obmat[]` being wrong because they are
now shared between the particle system and the object.
But Hair need the dupli parent matrix instead of the object matrix.
Disabling `Show Emitter` option fixes the bug.

To avoid this problem, request a different `EEVEE_ObjectMotionData`
for particle systems using a different key pointer in the hash.
This is a bit dirty but there is less code polution using this workaround.

Differential Revision: https://developer.blender.org/D14911
2022-05-12 12:45:56 +02:00
Sergey Sharybin 207b0c2a0f Cleanup: De-duplicate region visibility logic in clip editor 2022-05-12 12:40:12 +02:00
Campbell Barton dff11551de Merge branch 'blender-v3.2-release' 2022-05-12 20:13:16 +10:00
Campbell Barton 6f5d172d6c Fix error tagging vertices as loose in the screw modifier
Regression in 90a23dec46.
2022-05-12 20:12:36 +10:00
Hans Goudey b04de6d180 Merge branch 'blender-v3.2-release' 2022-05-12 12:00:06 +02:00
Dalai Felinto 77d3e6b439 Curves: Add notifier to update spreadsheet when sculpting 2022-05-12 11:58:11 +02:00
Campbell Barton 6dcda1b9aa Screw Modifier: avoid unnecessary normal calculation
Normals were being allocated, calculated & freed when the spin modified
merged was enabled.
2022-05-12 19:56:21 +10:00
Sergey Sharybin 89306a3a05 Cleanup: Use stronger typing in marker slide operator 2022-05-12 11:37:05 +02:00
Sergey Sharybin 87dd8dc740 Cleanup: Hide slide operator specific logic
Use a more semantically clear function in the tracking API.
2022-05-12 11:37:05 +02:00
Sergey Sharybin 993d17af90 Cleanup: Reduce indentation level in track slide operator 2022-05-12 11:37:05 +02:00
Sergey Sharybin 66dada123c Cleanup: Refactor marker area clamping
Switch from a single function with a lot of branching at its top level
to dedicated function calls with own documentation.
2022-05-12 11:37:05 +02:00
Sergey Sharybin 58fe38af9f Cleanup: Remove redundant marker clamping code path
Pattern is expected to be freely resized to any size, and the search
area s to become bigger when needed.

Remove confusing pattern size clamping which was actually clamping
search area.

There should be no functional changes.
2022-05-12 11:37:05 +02:00
Sergey Sharybin a0e63bac02 Cleanup: Strong type for track path clear API
Replace a generic int value with an enum.

Should be no functional changes.
2022-05-12 11:37:05 +02:00
Sergey Sharybin 81f23ad57a Cleanup: Move tracking constants to be printable enums
Replace old-style define with an enumerator values. Also move to the
top of the file preparing for making those stronger typed.
2022-05-12 11:37:05 +02:00