Commit Graph

117289 Commits

Author SHA1 Message Date
Campbell Barton
3bab869c0d Fix BMeshElemSeq.sort(key=None) argument
Allow passing key=None to BMesh element sorting callback,
matching the doc-string & Python's list sort.
2024-11-04 11:55:37 +11:00
Sean Kim
2c5eabca73 Merge branch 'blender-v4.3-release' 2024-11-03 15:08:17 -08:00
Sean Kim
43bbd9fd2d Fix: Paint: Unified strength value should be off by default
Introduced in 1bc5c488d4

The value used in DNA_scene_defaults.h was out of sync with the actual
default startup value. In all currently supported and in development
versions (3.6 LTS, 4.2 LTS, 4.3, and 4.4), the `UNIFIED_PAINT_ALPHA`
bit value is set to false.

Pull Request: https://projects.blender.org/blender/blender/pulls/129711
2024-11-04 00:07:29 +01:00
Bastien Montagne
397286e985 Cleanup: Silence unused var warning in NDBEUG builds. 2024-11-03 16:53:25 +01:00
Jacques Lucke
a17ac76d13 BLI: support accessing underlying memory buffer of Vector container
This extends the `Vector` API to support transfering ownership of a memory
buffer to and from a `Vector`. This reduces the need for unnecessary copies in
some cases which converting between data-structures. A new
`VectorSet::extract_vector` method is added that takes O(1) time. Previously,
this was only possible in O(n) time by copying the entire array.

The `Vector::release` method can be used to e.g. build a vector with the C++
container, but then extract it for use in DNA data.

Pull Request: https://projects.blender.org/blender/blender/pulls/129736
2024-11-03 12:09:05 +01:00
Campbell Barton
d40a0fc5c3 Merge branch 'blender-v4.3-release' 2024-11-03 22:04:51 +11:00
Campbell Barton
ba3c53f200 Merge branch 'blender-v4.3-release' 2024-11-03 22:04:48 +11:00
Campbell Barton
d920ef5425 Merge branch 'blender-v4.3-release' 2024-11-03 22:04:44 +11:00
Campbell Barton
470173bbc4 PyDoc: use keyword only specifier for bpy.props & bpy.ops 2024-11-03 21:50:33 +11:00
Campbell Barton
091ee2833b PyDoc: replace references to the deprecated "bgl" with "gpu"
Also correct bullet-points in gpu.state.blend_set.
2024-11-03 21:50:33 +11:00
Campbell Barton
b00550916c PyDoc: correct use of single back-ticks 2024-11-03 21:50:33 +11:00
Hans Goudey
aa62c1b5d1 Fix #129741: Two issues creating GPU shader from Python
1. Log printing casted a span of `StringRefNull` to a span of `char **`
2. Creating the shader tried to create `StringRefNull` from `nullptr`.
2024-11-03 10:49:16 +01:00
Campbell Barton
f17379a5d0 Merge branch 'blender-v4.3-release' 2024-11-03 16:07:40 +11:00
Campbell Barton
3bcfb151c1 PyDoc: use Python's type annotation syntax for doc-strings
Replace plain-text type information with the type syntax used
for Python's type annotations as it's more concise, especially for
callbacks which often didn't include useful type information.

Note that this change only applies to inline doc-strings,
generated doc-strings from RNA need to be updated separately.

Details:

- Many minor corrections were made when "list" was incorrectly used
  instead of "sequence".
- Some type information wasn't defined in the doc-strings and has been
  added.
- Verbose type info would benefit from support for type aliases.
2024-11-03 15:44:35 +11:00
Hans Goudey
9a30cb0c1e Cleanup: Remove unused grease pencil legacy kernel functions
Also remove the bounds from DNA since it was just runtime data
and was no longer referenced.

See #123468.
2024-11-02 23:16:04 +01:00
Hans Goudey
a804320138 Cleanup: Remove unused grease pencil legacy handling in some operators
See #123468.
2024-11-02 23:14:41 +01:00
Hans Goudey
a1e63eeb8a Cleanup: Remove unused grease pencil legacy overlays
See #123468.
2024-11-02 23:07:16 +01:00
Hans Goudey
a8f41a618c Cleanup: Remove unused GP V2 transform, curve edit code
See #123468.

Pull Request: https://projects.blender.org/blender/blender/pulls/129731
2024-11-02 22:24:59 +01:00
Hans Goudey
5ed65e6608 Cleanup: Remove unused grease pencil V2 update cache, DLRB tree
See #123468.

Pull Request: https://projects.blender.org/blender/blender/pulls/129729
2024-11-02 22:18:10 +01:00
Clément Foucault
afaa315418 GPU: Printf: Print buffer content even in case of overflow
The start of the buffer is ensured to be correct. So there
is no downside in printing the content of the overflowed
buffer.

At least, we get a feedback at which command is flooding it.
2024-11-02 21:51:26 +01:00
Hans Goudey
d4011668dd Cleanup: Remove unused gpencil_geom_legacy.cc functions
See #123468.
2024-11-02 21:08:14 +01:00
Jesse Yurkovich
919aad31d6 Cleanup: Use fmtlib instead of iostream for import/export status print
Removes the last remaining, direct, usage of streams inside USD.

CLOG is not used here because there's no way to have a trace be "always
printed," even if using a log-level of -1 or similar.

Pull Request: https://projects.blender.org/blender/blender/pulls/129702
2024-11-02 21:01:45 +01:00
Hans Goudey
a222aa609c Cleanup: Remove outdated references to DLRB tree 2024-11-02 20:45:59 +01:00
Hans Goudey
405e2aeb71 Cleanup: Remove unused include from attribute header 2024-11-02 20:29:36 +01:00
Leon Schittek
0d3b7ec82b Merge branch 'blender-v4.3-release' 2024-11-02 17:04:58 +01:00
Leon Schittek
3347aa4017 Fix: Geometry Nodes: Matrix socket not connecting after link-drag search
Ensure the matrix socket is made available, when connecting to it via
the link-drag search.

Pull Request: https://projects.blender.org/blender/blender/pulls/129713
2024-11-02 17:03:42 +01:00
Hans Goudey
65da82f67c Fix #129715: Crash with GPU subdivision in wireframe mode
Mistake in 9b97ba1462.
2024-11-02 14:32:20 +01:00
Jacques Lucke
b239dead79 Merge branch 'blender-v4.3-release' 2024-11-02 12:18:19 +01:00
Jacques Lucke
0c2a70e970 Fix: crash using Edit Minimum Distance operator
This fixes two crashes related to freeing the operator data incorrectly and too early.
2024-11-02 12:17:41 +01:00
Campbell Barton
71a38df6fa Merge branch 'blender-v4.3-release' 2024-11-02 18:02:15 +11:00
Campbell Barton
a05345e139 PyDoc: various corrections to function doc-strings
Add missing arguments, corrections & remove unchecked type info.
2024-11-02 17:48:21 +11:00
Campbell Barton
15c207a294 Merge branch 'blender-v4.3-release' 2024-11-02 17:34:00 +11:00
Campbell Barton
4df285ccd5 Cleanup: move function comments into headers or implementation notes
For C/C++ doc-strings should be located in headers,
move function comments into the headers, in some cases merging
with existing doc-strings, in other cases, moving implementation
notes into the function body.
2024-11-02 17:27:09 +11:00
Campbell Barton
b26be23fe8 Merge branch 'blender-v4.3-release' 2024-11-02 15:44:25 +11:00
Campbell Barton
e46c58df7c Merge branch 'blender-v4.3-release' 2024-11-02 15:44:22 +11:00
Campbell Barton
c5222a3953 Cleanup: quiet variable unused warning 2024-11-02 15:43:29 +11:00
Campbell Barton
99387c0749 Cleanup: spelling in comments, docs & error 2024-11-02 15:43:27 +11:00
Campbell Barton
b394fd55b7 Merge branch 'blender-v4.3-release' 2024-11-02 15:27:50 +11:00
Campbell Barton
e7e6bf1dfe Fix memory leak in mathutils.geometry.box_pack_2d
The set macro doesn't handle the reference count for existing values.
2024-11-02 15:08:42 +11:00
Clément Foucault
d9ff375e7e GPU: GLSL-C++ Stubs: Make compilation possible
- Add `main` workaournd.
- Define out create info class when compiling with stubs.
- Move interfaces and info namespace to global namespace.
2024-11-01 23:38:22 +01:00
Clément Foucault
01236be188 Cleanup: GPU: Remove unused shader files
These shaders have not been used for a long time.
2024-11-01 23:36:45 +01:00
Hans Goudey
6be43ffb4d Cleanup: Properly handle all subdiv shader cases with enum type
Add asserts for invalid shader types, use a proper enum type,
and move the number of shaders to not be a shader type.
2024-11-01 22:25:27 +01:00
Hans Goudey
f736c1aa93 Merge branch 'blender-v4.3-release' 2024-11-01 21:27:55 +01:00
Hans Goudey
c38484107f Fix #129697: Crash renaming node interface input to empty string
Caused by trying to construct a `std::string` from `nullptr`.
2024-11-01 21:27:25 +01:00
Clément Foucault
e311c6dd4f Cleanup: Metal: Fix clang tidy warnings
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/129656
2024-11-01 20:23:18 +01:00
Hans Goudey
2e4da3bf60 Cleanup: Reduce indentation in UI panel function 2024-11-01 20:14:56 +01:00
Hans Goudey
f59b39812b Cleanup: Remove empty namespace section in BKE_paint_bvh.hh 2024-11-01 20:14:36 +01:00
Hans Goudey
4a08d48906 Refactor: Sculpt: Store active vert as int for multires
The impetus is removing the `BKE_subdiv_ccg.hh` include from
`BKE_paint.hh`, but I also think this is a bit of a simplification in
general. There's often no need for a special type to reference a
`SubdivCCG` vertex, which is a lot like `Mesh` but with a different
topology format.

Pull Request: https://projects.blender.org/blender/blender/pulls/129687
2024-11-01 20:01:44 +01:00
Hans Goudey
9b97ba1462 Cleanup: GPU: Avoid raw pointers for shader API strings
Avoid measuring the length of strings repeatedly by passing their
length along with their data with `StringRefNull`. Null termination
seems to be necessary still for passing the shader sources to OpenGL.
Though I doubt this is a bottleneck, it's still nice to avoid overhead from
string operations and this helps move in that direction.

Pull Request: https://projects.blender.org/blender/blender/pulls/127702
2024-11-01 20:00:31 +01:00
Sean Kim
6df437be5f Fix #126939: Smooth / Enhance Details brush crash when using tablet
Prior to this commit, the brush action was determined on a step by step
basis by peeking at the `StrokeCache` `bstrength` property and
determining which brush to use based on if the value was negative or
not. The sign of this value, however, was not static across the
entirety of a brush stroke, as it is calculated from three separate
fields, one of which could vary over the course of a stroke when using a
tablet, the `pen_flip` property.

To fix this issue, this commit ensures the `pen_flip` field of the
`StrokeCache` is only updated at the beginning of the stroke. It also
adds a new boolean to store the initial direction of the stroke to
reduce further ambiguity when comparing the sign of the brush strength.

Additionally, the operator level `pen_flip` property is moved to the
generic paint stroke operator instead of being defined as a property of
the `OperatorStrokeElement` struct. This value is now only calculated
at the beginning of the stroke instead of before each stroke step.

Pull Request: https://projects.blender.org/blender/blender/pulls/129559
2024-11-01 19:43:20 +01:00