getpwuid for accessing home wasn't used when looking up the path
for older Blender versions. There is no reason for the code-paths
to differ. Use a shared utility function to access home.
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`.
The API would return `None` if the number of strokes in the drawing was `0`.
Instead this should return a slice that has a length of 0 to be consistent.
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`.
The API would return `None` if the number of strokes in the drawing was `0`.
Instead this should return a slice that has a length of 0 to be consistent.