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
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
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
This wrap some functions as class methods
and rename members to reduce confusion with
the old class meaning.
Rename the old DRWManager to DRWContext.
Also wrap access to DST inside a function
to allow to change it to thread local in a
following PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/135268
Allows to use this code from C++ code/data, without duplicating strings
to char arrays. C-compatible API is kept as a wrapper around the new
implementation.
No behavioral change is expected from this commit.
Part of !135199.
The operator refused to pack libraries with absolute paths (wasnt the
case in its original implementation 16411da41e, but was added in
129fb516f4 -- for the reason of preventing "bad things happen on
unpacking" without an explanation of what these exactly are). It did so
by cancelling as soon as **one** library with ab absolute path was
found.
Now with the introduction of essential assets, we have those absolute
path linkages more or less "by default" as soon as e.g. a brush is
used, so the operator is more or less unusable now. NOTE: these absolute
essential asset library paths seem to be converted to relative on save?
Upon reload, these are then gone... (might be another hint for an
alternative fix, see below)
By "bad things happen on unpacking" I would assume the scenario of
folders being created in unwanted locations (e.g. when moving from one
OS to another), but the same thing is also true for packing **files**
instead of libraries (there, absolute paths are allowed, and unpacking
in original locations can equally fail or create folder structures that
are "unexpected"). NOTE: for files though we have the choice of
unpacking to a relative folder (which wouldnt really be possible since
libraries can be nested and we would have to correct paths all over the
place). NOTE: the chance of creating "unwanted" folder structures with
relative paths might be slimmer, but if you have a lot of "upwards"
parent folders, relative can easily "break" as well.
Possible ways to resolve this:
### [1] skip libraries identified as essentials assets (still cancel on all other absolute paths)
Can check a library path to be contained in `EssentialsAssetLibrary`
`essentials_directory_path`. This would be the safest imo since it is a no-behavior change.
### [2] lift the limitation of absolute paths alltogether
Like mentioned above, things could break with "relative" almost as
easily as with "absolute", there might even be scenarios where
"absolute" is wanted. It is a more behavior-changing fix that we might
explore more after 4.4 is out.
### [3] skip absolute libraries (but continue with non-absolute libraries)
This does change behavior as well (it does not cancel as soon as **one**
library with ab absolute path was found anymore, but the worst case
scenario is that you end up with an "incomplete" file if you really
mixed absolute and realtive lib linking).
This PR implements [1] for now, [2] or [3] can follow for 4.5.
Fixes#134665
Pull Request: https://projects.blender.org/blender/blender/pulls/134839
`ColorManagedDisplaySettings`, `ColorManagedViewSettings`,
`ColorManagedInputColorspaceSettings` were affected since these are used
from multiple places (Scene, File output nodes, ..).
Similar to how we are getting the path for `ImageFormatSettings` (which
pretty much has the distinction logic already), we can do so for the
ColorManage Settings as well (piggbacking on the already correct path to
the `ImageFormatSettings`.
With this, we can also remove these "known failures" from the test
introduced in 4032b853c3.
Pull Request: https://projects.blender.org/blender/blender/pulls/135238
Volumes' "Sequence Mode" recently got the "Sequence" context in
2b3f0d0110. The intention was to disambiguate the "Extend" enum item,
but this caused another item, "Clip" to also get this context. That
one already existed and referred to a sequencer clip.
Use the more specific "Volume" context instead.
Reported by Gabriel Gazzán.
This patch implements link validation for compositor node trees. All
links are valid in the compositor, since there is implicit conversion
between all supported types. This is needed for link gather search
operations.
This was caused by e05ef4c838. It wasn't obvious that just adding
the `filter_glob` would affect behavior elsewhere. Now there is a check
to see if the glob is non-empty.
Replace (only two remaining) usages of C-style IMB_processor_apply_threaded
with just threading::parallel_for which is much easier to use in C++ without
intermediate structs.
IMB_display_buffer_acquire got faster as a result -- parallel for has lower
overhead compared to the task pool approach that the previous
implementation was using. While at it, noticed that
IMB_display_buffer_acquire was clearing just-allocated memory, immediately
before overwriting it. So that is now gone too.
IMB_display_buffer_acquire time during playback of 4K resolution float
content in VSE (Ryzen 5950X, Windows): 10.7ms -> 7.7ms
Pull Request: https://projects.blender.org/blender/blender/pulls/135269
HI-DPI screens now select larger custom cursors on Wayland,
previously small cursors would be scaled up.
This only works well when all outputs have the same scaling
as custom-cursors don't support sending multiple sized cursors
to GHOST at once, see code-comments for details.
On Windows and Mac we use platform-specific mouse cursors that work at
multiple sizes. But Linux uses cursors that are defined in our source
code and are 16x16 pixels. This commit adds 24x24 and 32x32 versions of
all these cursors, using them will be committed separately.
Ref: !134894