No functional changes.
This deals with the TODO
`/* TODO(sergey): How to ensure this is a constexpr? */`
by just making it a `constexpr`.
The line in question was `square_f(0.000001f)`
so the constexpr is just `0.000001f * 0.000001f`
Pull Request: https://projects.blender.org/blender/blender/pulls/142872
The Join Selection operator can remove the original selected points, but
this often removes the wrong points. The reason is that the point ranges
are removed sequentially, and each removal changes the curve topology,
invalidating subsequent ranges. The solution is to combine the ranges
into a single index mask for each drawing before removing points, so
that each drawing is only modified in a single operation.
Pull Request: https://projects.blender.org/blender/blender/pulls/142834
This suppreses -Wnonnull compiler warnings that would previously appear
when trying to pass a nullptr title to this function.
Internally, this function passes its `title` argument to `WM_window_open()`,
which in turn passes it to `WM_window_title()`, which can take a nullptr
as a title, in which case the title is computed dynamically from the
window area name.
In #139438 we added three path template variables that get their values
from user-specified names:
- `scene_name`
- `camera_name`
- `node_name`
These names can contain characters that are illegal in filenames on some
systems, and also characters like "/" that would be interpreted as path
separators in a filepath. This can lead to unexpected outcomes.
For example, if a node's name is "Hue/Saturation" and the `{node_name}`
variable is used in a path, it would result in a "Hue" directory which
in turn contains a "Saturation" file. This is almost certainly not what
the user intended, because the slash in that name is not semantically
supposed to be a path separator.
This PR addresses this problem by splitting string variables into two
types: strings and filepaths. The contents of string variables are
sanitized to be valid filenames when substituted into a path template,
but the contents of filepath variables are left as-is.
Variables such as `blend_name`, `blend_dir`, etc. that actually
represent path components are then added as filepath variables, while
variables such as `scene_name` that represent plain strings without path
semantics are added as string variables.
Pull Request: https://projects.blender.org/blender/blender/pulls/142679
The commit `b3a5d03bd0` introduced a new draw option for cage gizmos to
draw corners. This was turned off by default to prevent it being
visible in circular 2d gizmos.
This fix turns the corner draw option back on explicitly. Note: The
relevant 2D gizmo already sets `ED_GIZMO_CAGE_XFORM_FLAG_SCALE`, so no
changes in transform options are required.
Pull Request: https://projects.blender.org/blender/blender/pulls/142840
Adding a custom node socket in a node group fails, because the socket
type no longer passes the poll function.
Socket type polling for generated enum items was changed in #138824:
The socket type enum is based on the position in the socket types list,
but regular sockets generate many subtypes that should not appear in the
enum. Therefore only the "base type" of the socket is used for the enum
entry. Custom sockets, however, do not have a base type and are used
directly. This broke because now any socket type without a base type
is always rejected.
Fixed by handling a missing base type as indicator that the socket type
should be used directly.
Pull Request: https://projects.blender.org/blender/blender/pulls/142816
When hovering on a matrix field socket, `get_field_type_name` can fail
because of missing `float4x4` case. Now it will properly return a
"Matrix Field" name.
Pull Request: https://projects.blender.org/blender/blender/pulls/142794
Now that multi-select works with shape key, support deleting selected
keyblocks. New function `shape_key_is_selected` being introduced that
returns true for selected/active shape keys
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/141881
Crash popups were being displayed even when Blender was running in
background mode, causing the process to hang and blocking automated
workflows (e.g., render farms).
Therefore, disable the crash popup when running in background mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/142518
BLI_snprintf and related functions could truncate partial UTF8
code-points, which would then cause problems elsewhere -
Python raises an exception when accessing for example.
Existing uses of BLI_snprintf should use the UTF8 versions in most
cases, except for file paths which are not required to be UTF8.
This fixes a bug caused by 96e549c092. Before the change, the
`randomize_color` function passed through the `color.a` value in the
returned rgba color. The alpha is `1` when the color mode is Color
Attribute and `0` when it's Material. After the patch, it was hard
coded to `1`. This fixes it by passing the `color.a` back through
again.
Pull Request: https://projects.blender.org/blender/blender/pulls/142642
At low scale and on regular DPI displays the editor outline, being just
a single pixel can sometimes look blurry. Padding by half a pixel (that
is not increased with scale, DPI, or line size) avoids this blurriness.
Pull Request: https://projects.blender.org/blender/blender/pulls/142777
Switching to full screen mode with panel hiding normally shows a button
at the top-right to switch back. But only for RGN_TYPE_WINDOW regions.
This PR just adds RGN_TYPE_PREVIEW to the regions that show this.
Pull Request: https://projects.blender.org/blender/blender/pulls/142754
Caused by a slightly weird API, that has no good way to recieve
the final size of a partially used index buffer. Until this is refactored
more, just assign this data manually.
Pull Request: https://projects.blender.org/blender/blender/pulls/142748
HDR video files are properly read into Blender, and can be rendered out
of Blender.
HDR video reading / decoding:
- Two flavors of HDR are recognized, based on color related video
metadata: "PQ" (Rec.2100 Perceptual Quantizer, aka SMPTE 2084) and
"HLG" (Rec.2100 Hybrid-Log-Gamma, aka ARIB STD B67). Both are read
effectively into floating point images, and their color space
transformations are done through OpenColorIO.
- The OCIO config shipped in Blender has been extended to contain
Rec.2100-PQ and Rec.2100-HLG color spaces.
- Note that if you already had a HDR video in sequencer or movie clip,
it would have looked "incorrect" previously, and it will continue to
look incorrect, since it already has "wrong" color space assigned to
it. Either re-add it (which should assign the correct color space),
or manually change the color space to PQ or HLG one as needed.
HDR video writing / encoding"
- For H.265 and AV1 the video encoding options now display the HDR mode.
Similar to reading, there are PQ and HLG HDR mode options.
- Reference white is assumed to be 100 nits.
- YUV uses "full" ("PC/jpeg") color range.
- No mastering display metadata is written into the video file, since
generally that information is not known inside Blender.
More details and screenshots in the PR.
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/120033
Add an explicit 'is owning' tag for libraries' FileData pointer, and
factorize code cleaning it up into a small util function.
Also allows to get rid of the weird ugly exception case in `link_end`
code for the 'root' library filedata, which is usually owned by caller
code and should not be freed here.
Pull Request: https://projects.blender.org/blender/blender/pulls/142723
The "curve_type" attribute in curves geometry is built-in and only valid with
a `int8` type on the `Curves` attribute domain. Adding it with a different type
on instance geometry is fine though, but causes invalid attribute writer access
when realizing the instances.
Pull Request: https://projects.blender.org/blender/blender/pulls/142218
The UV values for a face are contiguous anyway, there's no need
to put them into a temporary vector. Also compute them the UV
map windings in parallel, and avoid unnecessarily adding up the
size of every face.
Pull Request: https://projects.blender.org/blender/blender/pulls/142415
On the Vulkan side, ensure that unbound textures don't result in
accessing uninitialized or out of bounds memory.
On the Draw side, ensure all Hair and Curves attributes have, at least,
a dummy attribute bound.
Pull Request: https://projects.blender.org/blender/blender/pulls/142265