This refactor contains the following changes:
* Each `PanelDeclaration` contains its direct children. Previously, it only knew
how many children it had. That added complexity to wherever we iterate over
the node declaration.
* Adds a new `DeclarationListBuilder` that is a base class of
`NodeDeclarationBuilder` and `PanelDeclarationBuilder`. It makes sure that the
same API for adding sockets, panels and separators exist for both.
* Modified declare functions for group, group input and group output nodes to
use the normal node builder api instead of doing something custom.
No functional changes are expected.
The main reason for this refactor is to simplify working with nested panels in
node declarations which is useful when we want to support nested panels in the
node editor. The node drawing code is not simplified in this patch, but that
should be easier afterwards.
Pull Request: https://projects.blender.org/blender/blender/pulls/128799
EXR DWAA and DWAB are conceptually similar to lossy JPG compression,
with a tunable file size vs image quality parameter. However, previously
Blender always used the fixed default setting, which is kinda similar
to very high quality (like 97) for JPG.
Internally EXR DWA/DWB quality parameter is inverted scale, i.e. 0 is
best/lossless quality, and increased setting value means decreased
quality. However the rest of Blender UI uses 1-100 JPG-like quality
scale, where values above 90 are "visually lossless", 100 is lossless,
and going below something like 50 would be visually quite lossy. So map
that to internal DWA setting:
- blender 100 -> DWA 0
- blender 97 -> DWA 45
The rest is linear relation based on those two points.
Pull Request: https://projects.blender.org/blender/blender/pulls/128790
Removes unused GPv2 functions in blenkernel.
Notes:
- Functions for layer masks are still in use, but annotations never
have layer masks in the first place. Would be good to remove the data
structures so we can remove the functions too.
- Some multi-frame edit functions are also still nominally used, but
multi-frame editing is not an active feature for annotations. This
should also be removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/128709
This introduces partial functionality of Precision mode to 'Snap to
Grid'.
However, it behaves differently from 'Absolute Grid Snap', as it lacks
smooth mouse movement.
Precision mode is now available specifically for Transform operations.
Use a generic function to access the home directory making macOS path
access match other Unix systems.
When the function was added [0] it solved access to HOME when the
environment variable wasn't set. Since then support for `getpwuid()`
has been added on UNIX systems [1], which also works on macOS,
removing the need for macOS to have a separate function.
Furthermore BLI_expand_tilde had undocumented limitations that didn't
apply to other platforms (see PR for details).
Ref !128734
[0]: 9df13fba69
[1]: 6039cb17e6
The issue occurred because the code block that read the snap flag was
out of sync with the code block that saved the flag.
The solution was to centralize snap flag handling in the
`transform_snap_flag_from_spacetype_ptr()` function. This function
retrieves the appropriate snap flag and property based on the editor
type, eliminating the need for repetitive conditional checks and
ensuring that the correct snap flag is set for each editor.
Tmp field was still used in strip duplication. This was a source of bugs
previously. Now it uses `Map` of new to old strips to fix strip
relations. The field is removed from DNA struct.
Pull Request: https://projects.blender.org/blender/blender/pulls/128402
`LH` was computed using `dot(-L, H)`, so there needs to be a negative
sign when computing `Ht2`.
`pdf` is only used for denoising, the change oesn't seem to affect the
regression test.
Allow Docking to work correctly if using a shortcut to the area header
context menu item. There is no longer a need to set the source or
target area locations.
Pull Request: https://projects.blender.org/blender/blender/pulls/128730
All geometry shaders have been ported to the
primitive expansion API. The vertex fetch API
is no longer used inside the DRAW module.
This only removes it from the new API which
only Workbench and EEVEE use.
Workbench only used it for shadow rendering, but it
was ported by #125855 .
Overlay-Next project already ported all the geometry
shaders and will not need it.
Rel #127493
Pull Request: https://projects.blender.org/blender/blender/pulls/127659
IMB_scale modifies the input image. But some places in code needed to keep
original input intact, so what they did was a sequence of IMB_dupImBuf+IMB_scale
Add IMB_scale_into_new function and use that in several obvious places:
- movieclip_build_proxy_ibuf
- icon_copy_rect
- seq_proxy_build_frame
Rebuilding proxies for VSE image sequences with 94 4K resolution EXR images
(on Ryzen 5950X/Win10/VS2022): 13.4 -> 10.3 seconds.
Pull Request: https://projects.blender.org/blender/blender/pulls/128752
Reset the 'hierarchy index' runtime `temp_index` value for all library IDs.
This prevent the assert to be triggered when trying to rebuild libraries
hierarchy and there are some orphaned (i.e. not used by anything) library IDs
around.
If points are beind the camera, we don't really want to erase them. This
patch marks invalid coordinates thus preventing them from intersecting
with a eraser.
The reason for using a large value to indicate "invalid coordinate"s are:
- No need to further break down the way we process `src_to_dist` point matching array for `hard_eraser` `soft_eraser`, makes the entire logic much easier.
- No eraser is gonna be touching such a large coordinate of `1e20`.
Technically there's this case where if a segment crosses the near or far clipping plane (to handle this correctly, you'll need to split that segment into two at the clipping plane position and it increases complexity a lot), and then you will have undefined erasing behaviour, however the worse case is that the one segment was completely removed, and in such case I think it's acceptable.
Pull Request: https://projects.blender.org/blender/blender/pulls/128738
Remove the `anim.slot_new_for_object` operator. It's no longer in use, and
replaced by the more generic `anim.slot_new_for_id` operator.
The latter is also coded in Python, and easier to follow than the code it
replaced.
No functional changes.
Pull Request: https://projects.blender.org/blender/blender/pulls/128710
After pushing down the Action to the NLA, it needs to be tagged for
reevaluation. The code was using `adt->action->id` for this, but since
the nature of the operator is that it un-assigns the Action itself, that
would always be a null pointer.
Pull Request: https://projects.blender.org/blender/blender/pulls/128707
The API did not initialize the `curve_type` for the newly created strokes resulting in unwanted behavior.
Set the curve type to the expected default: `POLY`.