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
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
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.
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.
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
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.
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
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
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