Typically, we use this function to determine whether or not a subset of
data that has been collected with `gather` needs to be then persisted
into a larger array with `scatter`. As such, it makes sense to assert on
equality of the indices and smaller array size.
Pull Request: https://projects.blender.org/blender/blender/pulls/140752
We need to ensure that the compositor preview depsgraph gets updated
properly after undo, now that the compositing node tree is not embedded
in the scene anymore.
A test case will be committed separately in #140595
Pull Request: https://projects.blender.org/blender/blender/pulls/140596
This allows such functions' callbacks to receive the 'self' data as a
PointerRNA, instead of a pointer of the relevant DNA type.
This commit also adds some validation of flags when defining them for
a FunctionRNA.
Part of !135807.
Previously, Float2 images were internally stored as either Float3 or
Float4 images due to limitations in the implementation, which no longer
exists. So this patch refactors the compositor code to store Float2
images in actual Float2 containers, which gives better performance and
memory savings.
Some algorithms were adjusted to operate on Float2 instead of Float3 as
was previously the case.
Pull Request: https://projects.blender.org/blender/blender/pulls/140855
The code around view transform selection accidentally got too coupled
to the scene. However, the file output settings do not have scene, so
the enumerator getter was crashing.
Caused by 7ceb4495c5.
This patch brings the code closer to the Blender 4.4 behavior by
maintaining a global from view name to an ID.
There is still a bug in the code which displays views from the active
scene's display settings in the override panel. This is because the
itemf() callback is hardcoded to use the display settings from the
active scene (via bContext). However, this issue exists since the
initial commit of the color management override option.
Pull Request: https://projects.blender.org/blender/blender/pulls/140729
This removes the need to deal with void pointers and explicit casts in many
places. Also it simplifies possibly extending what kind of values can be stored
for each socket in the future.
Pull Request: https://projects.blender.org/blender/blender/pulls/140844
The versionning was not inside `do_versions_after_linking_`
which made files created before 4.2 not switch back to
`BLENDER_EEVEE`.
# Conflicts:
# source/blender/blenloader/intern/versioning_500.cc
Previously, there was the issue that `SocketValueVariant` had a constructor that
took a forwarding reference as parameter. This was problematic, because this
could potentially hide copy/move constructors which is not intentional. This
patch makes sure that these special constructors are not overridden and adds two
static utility functions to make sure it's still straight forward to construct
the `SocketValueVariant` on a single line.
Clangd also warned about this case.
Pull Request: https://projects.blender.org/blender/blender/pulls/140842
This replaces API for accessing the uiLayout fixed_size,
red_alert, root_panel, search_weight and width properties
with methods, following uiLayout refactors and the
Python API naming
Pull Request: https://projects.blender.org/blender/blender/pulls/140673
When movie strip is added and redo panel is tweaked, operator failed to
re-execute.
Caused by c4eab49b9. This added `sequencer_generic_invoke_xy__internal`
call in operator exec function, but did not specify `SEQPROP_NOPATHS`
argument, which caused `directory` and `filepath` properties to be
overwritten.
This PR adds clarification for `SEQPROP_NOPATHS` use case, because it
isn't immediately obvious what this is doing.
Pull Request: https://projects.blender.org/blender/blender/pulls/140736
When the colored titlebar decoration style was implemented in
PR #123982, both the titlebar background and foreground were exposed
to the OS backends to be used when styling the Blender window titlebar.
In practice, both backends that implement this decoration style (Win32
and macOS/Cocoa) only use the background color, and they either rely on
the OS to automatically set the text color or use the color HSV value
component to switch between the OS dark/white color.
While it was thought to still keep this value around for a potential
future backend implementation, the color settings parsed to obtain the
titlebar color (`TH_BUTBACK_TEXT_HI`, which wasn't properly suited for
this feature to begin with) has been replaced by `TH_TEXT` in #140726,
which ends up being too bright to be used as titlebar text for most
themes/use cases.
As such, this PR removes this unused titlebar decoration style setting.
Future backends that wishes the implement the colored titlebar
decoration style should either use an existing OS/DE text color or use
a set white/dark text color, similarly to what the Cocoa backend does.
Pull Request: https://projects.blender.org/blender/blender/pulls/140823
Previously in 308292b5d7 an error message
was added to notify that some selected objects are not valid for mesh
data transfer, that message didn't take account that src==dst is also a
case where the transfer is skipped, that doesn't mean the object is
invalid. So update the logic for this.
Pull Request: https://projects.blender.org/blender/blender/pulls/140463
Correct an oversight in df6d345bb4: without proportional editing, all
the transform data is "selected" by definition. This means that the
assumption "the selected data is sorted first in the array" is
trivially true, without calling any sorting function. So instead of
using the sorted index map in these cases, just fall back to regular
iteration.
To make the code handle this nicely, I made two "foreach" functions.
The first one transparently uses the sorted index map when available,
and performs regular iteration otherwise. The second function only
visits the selected items.
This makes the usage of these functions clearer, and the fact that
selected items are expected to be sorted first (either trivially or
explicitly) can be documented in a central place.
Pull Request: https://projects.blender.org/blender/blender/pulls/140720
This changes the naming of "Custom Split Normals" or "Split Normals" to be "Custom Normals"
This addresses #134744, only UI naming has been adjusted.
Internal/External APIs are left unchanged.
Pull Request: https://projects.blender.org/blender/blender/pulls/140440
Restore expected behavior of the NDOF, especially in the context of
non-3D editors. It addresses the following issues:
- Object mode, 3D viewport:
With "Lock Horizon" off, the rotation axes will invert unexpectedly,
making the camera behave similar to a "Fly mode".
- Fly mode, 2D editors:
Changing a navigation mode to "Fly" makes no effect.
Applies to UV and Nodes editors, Camera Preview etc.
Related to #140165
This includes some minor API changes back-ported from `main`
since the PR was created for `main`.
Co-authored-by: Patryk-Skowronski <patryk_skowronski@3dconnexion.com>
Ref !140537
Historically, the `UnifiedPaintSettings` struct has been used to
provide users the ability to set brush values at a scene level. Examples
of such attributes are the brush size, strength, and color, to name a
few.
Instead of these values being shared across all of the grease pencil,
mesh painting, and curves sculpting modes. This commit migrates the
data to the `Paint` struct, meaning that each individual mode (e.g.
Sculpt, Vertex Paint, Grease Pencil Draw) now has the ability to change
these values without affecting other modes.
While this change is large, the majority of the work is simply
refactoring access to the `UnifiedPaintSetting` struct. to ensure the
correct property is being retrieved.
Resolves#134077
Pull Request: https://projects.blender.org/blender/blender/pulls/139766
Text strip had a fixed size buffer of 512 bytes to hold the displayed
text (this can be much fewer actual characters with non-English
languages). Switch to dynamically allocated buffer instead, which can
hold longer text.
In order to support forward/backward compatibility, TextVars continues
to hold the 512 byte buffer in memory. When writing out the .blend file,
dynamic text buffer is copied into the fixed one. If it is longer, the
text is truncated, so opening the .blend file in an older version
will contain the first 512 bytes of the longer text. When reading
existing files without the dynamic text buffer, it is created from the
static buffer. Conceptually this approach is similar to constraints
name length increase PR !137310.
The text strip editing code was switched to operate on the dynamic
buffer, resizing it as needed. seq::CharInfo internal struct was
switched to be more independent of the actual buffer address; now
each char entry just stores an index into the buffer instead of direct
pointer (side effect: makes the struct smaller as well).
Pull Request: https://projects.blender.org/blender/blender/pulls/140733
Recently, panel styling was moved to a global setting instead of being
per-editor. However, the panel's title and labels inside still rely on
the per-editor region's text and title settings.
Move panel title and text colors to the global "Panel" settings.
See PR for details and screenshots.
Part of #135192
Pull Request: https://projects.blender.org/blender/blender/pulls/140726
Outliner is currently drawing row highlighting with a combination of
immediate mode drawing and widget shaders. The complaint shows it not
working correctly in some circumstances. This PR simplifies it by using
only widget shaders. There should be no other visual change.
Pull Request: https://projects.blender.org/blender/blender/pulls/140687
Incoming string attributes from USD have never been fully processed yet
they were added to our list of convertible types. This list originally
came from the Mesh reader before it was made common, but for Meshes the
string type was being skipped elsewhere so there was no harm. Now that
Point Clouds and Curves use this common code, it does matter.
Files containing string attributes for these object types will hit the
`BLI_assert_unreachable` call inside `copy_primvar_to_blender_attribute`
and trace an error to the console requesting the user to file bugs. This
was discovered while looking into the old Moana scene.
Remove the string entry for now as there's no regression in behavior and
it prevents the assert from firing (functionally harmless in Release
builds but the output to the terminal is unnecessary).
Pull Request: https://projects.blender.org/blender/blender/pulls/140681
When whole text strip bounding box is narrower than the hardcoded
cursor width (10.0), there was an assert from inside of std::clamp
since min was larger than max.
Pull Request: https://projects.blender.org/blender/blender/pulls/140739
Text strip along with other effect strips draws into buffer, which is
defined by common render size. However this makes selection, snapping
and other features not work correctly from user perspective.
There are 2 ways to remedy this:
- Draw text into buffer which size is defined by text boundbox
- Just draw the correct size boundbox and make UI use it correctly
This PR implements second option, as there are multiple difficulties
asociated with first option. Main problem is, that one would need to
calculate boundboxes for all individual text effects(blur, shadow, ...),
but many of these effects need to know the size of buffer we are trying
to calculate.
Big question here was: What the boundox should look like?
For selection it is best, if it encapsulates the text itself along with its
effects like shadow, blur or box. However for snapping and pivot range
it seems, that encapsulating only the text without any effects applied is
the best solution. This was discussed with UI module and we agreed,
that encapsulating only the text would provide better usability.
The implementation:
Most of the features are on "preview side", where all dimensions are
related to scene render size. Temporary `TextVarsRuntime` is created to
calculate apparent text strip image size. This allows boundbox of
correct size to be drawn.
However to draw boundbox and do transformations correctly, it is
necessary to remap origin point to the subset of image defined by the
boundbox. Since recalculated origin is relative, this function is used
for image transformation during rendering as well.
Main drawback of this method is, that boundbox and origin point
calculation may be needed from multiple places, and `TextVarsRuntime`
may be recalculated about 10x on redraw. `text_effect_calc_runtime`
function can be executed from ~5us for single character to 0.5ms with
512 characters with default font(not sure if that matters).
Drawing origin only during transformation would help with general UI
responsiveness. During playback, these overlays are not drawn, so
there should be no change in performance.
Pull Request: https://projects.blender.org/blender/blender/pulls/140420