Code in readfile that copies over brush assets (and related data) from
the old Main to the new one cannot use the namemap reliably, due to how
the linked IDs of the library get temporarily spread between both Mains.
Since in theory there should be no need for name uniqueness processing
in this case anyway, for now disable the relevant code when the library
is re-used.
NOTE: Issue reported in #135315, revealed by recent refactor in
00f406c34c and 16e552298c.
NOTE: This fix is a bit hackish, but seems to be the simplest most
straight-forward way to address the problem. More invasive solution can
be investigated if this proves to still be problematic.
NOTE: While 4.4 also has the same invalid handling, this PR should
likely not be ported to it, as previous BKE_main_namemap code was more
permissive with such invalid behaviors, and there is no known bad
consequences in practice.
Pull Request: https://projects.blender.org/blender/blender/pulls/135362
The transform gizmo in the sequence editor does not show highlights properly for rotation, when hovering over it or while dragging it.
This patch has no further side effects on operators that use the 2d cage gizmo without rotation such as the crop gizmo and the viewer (transform) gizmo in the compositor.
Pull Request: https://projects.blender.org/blender/blender/pulls/135065
Mistake in 6704647c66. Test coverage being added for another bug fix
uncovered this one.
Problem occurs when exporting an object that is duplicating at least two
other objects with the dupli vert system.
Pull Request: https://projects.blender.org/blender/blender/pulls/135369
ED_area_newspace correctly changes an area's space when the type and
subtype are set beforehand. But SCREEN_OT_space_type_set_or_cycle, when
changing to a new editor rather than cycling, needs newspace to ignore
the set subtype and use the last-used saved in the space. This
situation cannot be tested for in newspace. Instead have the operator
pass -1 as subtype to signal this intended behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/135367
The line-width is used to calculate the `U.pixelsize` which should only
be used to control the size of lines & points.
Update doc-strings to mention the intended use, remove unused defines.
This is due to accessing member of nullptr Asset. After deleting the
action id from asset library, `CTX_wm_asset` won't return value because
force reset for files was tagged (`FL_FORCE_RESET_MAIN_FILES`).
Instead of updating library from active asset, use library reference to
clear then read/draw the updated asset library
Pull Request: https://projects.blender.org/blender/blender/pulls/135219
* Uses const where possible
* Joins declaration with assignment
* Use std::array where possible instead of C-style array
* Use float3 instead of C-style array for position and normal
* Reduces scope of variables where possible
Pull Request: https://projects.blender.org/blender/blender/pulls/135336
This commit changes usages of `GHash` inside `bmesh_log.cc` into their
equivalent `blender::Map` declarations and functions.
Additionally, some debug functions are put inside a NDEBUG section
instead of being kept in a broken state behind `#if 0`
Pull Request: https://projects.blender.org/blender/blender/pulls/135276
A recent bug fix to light tree building lead to a issue where some
lights with light linking would incorrectly share nodes in the
light tree.
To help detect failures like this in the future, this commit adds a
test based on the file found in the original report
blender/blender#135200.
Ref: blender/blender-test-data!63
Patch #132957 added helpful UI feedback when attempting to rotate or
scale an object whose transforms are set to "only affect locations."
But it neglected to check for invalid trackpad rotations that are
affected the same way. This patch renames the original `HLP_ERROR` to
`HLP_ERROR_DASH` to distinguish it from a `HLP_ERROR` transform cursor
with no dashed line present, which matches trackball's normal state.
Pull Request: https://projects.blender.org/blender/blender/pulls/134653
This adds support for panel toggles from 2822777f13
to the materials tab in the properties editor. At the same
time, it also starts making use of layout panels which
offer a more standardized UI than the ad-hoc panels
implementation that was used there beforehand.
Adds the option to create a boolean socket that can be used as a panel toggle.
This allows creating simpler and more compact node group UIs when a panel
can be "disabled".
The toggle input is a normal input socket that is just drawn a bit differently in
the UI. Whether a boolean is a toggle input or not does not affect evaluation.
Also see #133936 for guides on how to add and remove panel toggles.
Pull Request: https://projects.blender.org/blender/blender/pulls/133936
While joining and docking areas there is hint shown near the mouse that
describes the potential operation. But it is cut off if your mouse is
at the extreme right or bottom edge of the window. This PR just clamps
the position so it is always visible.
Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Pull Request: https://projects.blender.org/blender/blender/pulls/135211
Various fixes in the HIP-RT BVH building related on making sure
curves motion blur is supported and is working correctly, as well
as properly handle motion pass configuration when path tracing is
to ignore motion blur (and instead write vector pass).
This PR contains #134797 with fixes needed to fully finish it:
moving commits from that PR here made it easier to ensure all
moving parts are tested without mental overhead.
Fixes#134510
Co-authored-by: Sahar A. Kashi <sahar.alipourkashi@amd.com>
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/135125
Note: This commit is essentially non-behavioral change, expect in some
fairly rare edge cases.
This commit does a few things:
* Move the whole BKE_main_namemap code to modern C++.
* Split API calls to work with the global namemap, or the local ones.
* Simplify and make the code easier to follow and understand.
* Reduce 'default' memory usage by using growing BitVector for numeric
suffix management, instead of a fixed 1K items.
* Fix inconsistent handling of 'same base name and numeric suffix,
different name' issues (e.g. 'Foo.1' and 'Foo.001'), see
`re_create_equivalent_numeric_suffixes` new unittest.
* Fix completely broken handling of `global` namemaps. This was
(probably!) OK so far because of their currently very limited
use-cases.
It also adds a few minor improvements to existing behavior (essentially
in exotic rare edge cases):
* Names that get too long are now only shortened by one char at a time,
trying to modify the requested base name as little as possible.
* Names that are short, but for which all the manageable numeric suffixes
are already in use, are extended with an (increasing) number, instead
of being shortened.
This work also allowed to detect a few (apparently harmless?) bugs in
existing code, which have been fixed already in 4.4 and main, or in this
commit as well when they depend on changes in namemap code itself.
About performances: This commit introduces a minor slow-down. Some tests
heavily relying on this code (like `bl_id_management` and `blendkernel`
e.g.) get slightly slower (resp. about 1% and 5%). This seems to come
mostly from the added complexity to handle correctly multiple different
names with the same base and numeric suffix value ('Foo.1' and
'Foo.001', but also in the global namemap context where IDs from
different libraries can have the same name).
Pull Request: https://projects.blender.org/blender/blender/pulls/135199
Rewrite the ONEAPI Blender texture allocation code to make use of
1D images backed by linear USM memory. This increases parity
with the CUDA implementation and sets the ground work for enabling
host USM allocations in Blender. By enabling this functionality,
previously failing benchmarks are now passing.
Together with the previous commit, no functional changes are expected.