Besides not using CustomData directly which allows future changes,
this should result in proper conversion of vertex groups to generic
point cloud attributes.
Previously, it was somewhat difficult to know if a dragged node will be attached
to a frame or not. This patch highlights the frame that dragged nodes will be
attached to which removes the guesswork. This is similar to how we highlight the
link that a dragged node will be inserted onto.
Pull Request: https://projects.blender.org/blender/blender/pulls/138648
Remove the addition of the position attribute from the default
"init data" callback where we don't know the desired number
of points. Add it in the other functions that add the data-block
(except the version that purposefully doesn't add attributes).
Pull Request: https://projects.blender.org/blender/blender/pulls/138697
Previously, nested frames were very hard to see and therefore to work with. This
patch solves this by alternating between two different frame colors depending on
the nesting depth.
Custom colors can still be used like before. There is still a single theme
option. The alternating color is derived from that.
Pull Request: https://projects.blender.org/blender/blender/pulls/138649
This converts the public `uiItemFullR` function to an object oriented
API (an overload of `uiLayout::prop`), matching the python API.
This reduces the difference between the C++ API with the python version,
its also helps while converting code from python to C++ code (or vice-versa),
making it almost seamless.
Part of: #117604
Pull Request: https://projects.blender.org/blender/blender/pulls/138683
The Properties NavBar region can be resized by dragging an edge, but
this only allows either normal width or hidden. The edge is along the
line of category tabs and it is extremely easy to hide the region
rather than select a tab. This PR remove the ability to drag the edge,
but adds a "Hide" option to the region's context menu. It also leaves
the triangular disclosure widget visible while hidden so that it can
be shown again.
Pull Request: https://projects.blender.org/blender/blender/pulls/138628
While in 3D View Perspective Mode you are able to disable the Floor
and/or the XYZ axis lines. But in Orthographic views turning off the
axes lines has no effect, but turning off the grid also turns off the
lines. This PR just makes these work independently, as you'd expect
from the options in Viewport Overlays.
Pull Request: https://projects.blender.org/blender/blender/pulls/138694
The issue was caused by the shader always applying exposure even if
it is 1. When the input image had negative values this lead to nan
values to the input of the shader which converts to the display
space.
Solved by only doing to-scene-linear transform in the shader which
does this.
Caused by 18110744a2
Pull Request: https://projects.blender.org/blender/blender/pulls/138666
Going from fullscreen to temporary fullscreen (usually file browser),
and back, is AREA_FLAG_STACKED_FULLSCREEN. In this case we need to
ensure that we restore the last-used area subtype and not just the zero
base type.
Pull Request: https://projects.blender.org/blender/blender/pulls/138682
In some cases, multiple viewers can be active and the active viewer is
not the desired one. This is only a problem for the compositor
The fix has two parts:
1. Tag the node tree as changed after the output changes. This solves
the issue of two viewers being active at the same time
2. Deactivate all other viewers before activating the desired viewer
node (similar to how `NODE_OT_activate_viewer()` works). This ensures
that the only active viewer is the one that the user just set.
Pull Request: https://projects.blender.org/blender/blender/pulls/138671
As described in #122398, implement read and write support for a new
attribute storage system. Currently this is only implemented to support
forward compatibility; the format used at runtime isn't changed at all.
That can be done one step at a time during the 4.5 and 5.0 development
cycles. A new experimental option for testing tells Blender to always
save with the new format.
The main benefit of the new structure is that it matches the attribute
system design, it allows for future attribute storage optimization, and
each attribute is an allocated struct, which will give pointer stability
for the Python API.
The next step is to connect the attribute API and the RNA API to
AttributeStorage for the simplest geometry type, point clouds.
Pull Request: https://projects.blender.org/blender/blender/pulls/133874
This patch removes the translation Offset from the Scale node. The
reasoning is that it is easy to insert a Translate node afterwards to
perform any necessary translation. And since we are moving options to
inputs, it doesn't seem worth it to provide those offsets as inputs in
the process.
Pull Request: https://projects.blender.org/blender/blender/pulls/138668
Briefly about this change:
- OpenColorIO C-API is removed.
- The information about color spaces in ImBuf module is removed.
It was stored in global ListBase in colormanagement.cc.
- Both OpenColorIO and fallback implementation supports GPU drawing.
- Fallback implementation supports white point, RGB curves, etc.
- Removed check for support of GPU drawing in IMB.
Historically it was implemented in a separate library with C-API, this
is because way back C++ code needed to stay in intern. This causes all
sort of overheads, and even calls that are strictly considered bad
level.
This change moves OpenColorIO integration into a module within imbuf,
next to movie, and next to IMB_colormanagement which is the main user
of it. This allows to avoid copy of color spaces, displays, views etc
in the ImBuf: they were used to help quickly querying information to
be shown on the interface. With this change it can be stored in the
same data structures as what is used by the OpenColorIO integration.
While it might not be fully avoiding duplication it is now less, and
there is no need in the user code to maintain the copies.
In a lot of cases this change also avoids allocations done per access
to the OpenColorIO. For example, it is not needed anymore to allocate
image descriptor in a heap.
The bigger user-visible change is that the fallback implementation now
supports GLSL drawing, with the whole list of supported features, such
as curve mapping and white point. This should help simplifying code
which relies on color space conversion on GPU: there is no need to
figure out fallback solution in such cases. The only case when drawing
will not work is when there is some actual bug, or driver issue, and
shader has failed to compile.
The change avoids having an opaque type for color space, and instead
uses forward declaration. It is a bit verbose on declaration, but helps
avoiding unsafe type-casts. There are ways to solve this in the future,
like having a header for forward declaration, or to flatten the name
space a bit.
There should be no user-level changes under normal operation.
When building without OpenColorIO or the configuration has a typo or
is missing a fuller set of color management tools is applies (such as the
white point correction).
Pull Request: https://projects.blender.org/blender/blender/pulls/138433
This patch removes the Max Blur option from the Bokeh Blur node. The
reasoning is as follows.
- The option was unused in case of non-variable sized blur, which was
the default, so the option did nothing for the default case of the
node.
- The option was originally introduced to define the search window of
variable size blur. This is no longer the case, since we compute the
search window dynamically from the input using parallel reduction,
which is now very fast. So currently, it only works as an upper limit.
- The node options will be exposed as inputs, so the user will see two
inputs that control the radius, which can be confusing for users that
are not experienced.
- The plan is to make the node take absolute pixel sizes in the future,
instead of the arbitrary relative size now in place, which would make
it very easy for the user to impose such limits manually.
It is difficult to version this change, since the size is relative to
the image size, while max blur is in pixels. But we assume the user
chose a sufficiently large max blur for the node to be useful, so the
composite should not be expected to be drastically different.
Pull Request: https://projects.blender.org/blender/blender/pulls/138659
The use of `sprintf()` was causing compiler warnings on Apple's version
of Clang. This replaces those uses with `fmt::format_to_n()` from
libfmt, which is safer and silences those warnings.
Additionally, the format string given to `printf()` in debugging
functions for the path template unit tests was also causing warnings due
to type mismatch (long long vs long). This replaces those with
`fmt::print()`, which infers the correct type on its own, silencing
those warnings.
Pull Request: https://projects.blender.org/blender/blender/pulls/138660
Starting with C++20, `fmt::format` will process the format string at
compile time by default. We need to opt out in the cases where this is
not possible by using `fmt::runtime(...)`, like, for example, when using
our various translation utilities.
This mirrors prior commit e62aa986b2 and
fixes 2 cases that have slipped back in.
Pull Request: https://projects.blender.org/blender/blender/pulls/138640
Previously, the outline of frames was sometimes unexpectedly invisible.
The solution is to draw the frame outlines together with the zone outlines
after all the zone and frame backgrounds have been drawn already.
Pull Request: https://projects.blender.org/blender/blender/pulls/138645
By convention str_len excludes the nil terminator.
Also assert the increment is a single unit as larger numbers aren't
supported (or needed currently).
The idea here is to use `UI_but_func_tooltip_label_set` which has a shorter
duration until the tooltip shows (besides also being easier to use). It does
seem like it makes sense to use it here, because the only purpose of the error
icon is to hover over it. Therefore, one shouldn't have to wait for long until
the tooltip shows.
Pull Request: https://projects.blender.org/blender/blender/pulls/138583
Previously, we had shown link errors on the target node as part of the node
warning system. While better than not showing any information about invalid
links (as was the state before that), it's still not ideal because it's easy to
miss when just looking at the link.
This patch adds an error icon in the middle of the invalid link. When hovering
over it, it shows the error text. When the middle of the link is not in view but
part of the link is, then the error icon will also stay visible.
Pull Request: https://projects.blender.org/blender/blender/pulls/138529
Moving the cyclic mode check into a separate function simplifies the
code. Avoiding an additional local variable to track the result, and
better encapsulates the behavior.
Pull Request: https://projects.blender.org/blender/blender/pulls/138375
The old versioning code was not guarded in a `MAIN_VERSION_FILE_ATLEAST`
check and the RNA hard minimum was not updated to prevent setting this
to an invalid value.
Pull Request: https://projects.blender.org/blender/blender/pulls/138572
Recent increases in region edge hit sizes, to work better with tablet
pens, made the hitspace for Properties NavBar encroach into the tab
space. This PR just narrows it and moves it away from the tabs.
Pull Request: https://projects.blender.org/blender/blender/pulls/138622
This converts the public `uiItemR` function to an object oriented
API (`uiLayout::prop`), matching the python API.
This reduces the difference between the C++ API with the python version,
its also helps while converting code from python to C++ code (or vice-versa),
making it almost seamless.
Part of: #117604
Pull Request: https://projects.blender.org/blender/blender/pulls/138617
This is loosely related to #136285, which allows changing numerical
values while in text entry mode. Outside of that, just hovering over
numerical inputs we are currently able to increment and decrement by
Ctrl + Mouse Wheel. This works for integers, floats, sliders. Current
code also allows cycling through expanded enums. This PR extends that
so Ctrl + Mouse Wheel also changes toggles and checkboxes and also
changes values inside of strings.
Pull Request: https://projects.blender.org/blender/blender/pulls/138344
Add a new shader node to control volume coefficients (scattering,
absorption and emission) directly, making it easier to model existing
volumes with measured data.
Pull Request: https://projects.blender.org/blender/blender/pulls/136287
... if only a single view is enabled
Logic for touching placeholder files in `RE_RenderAnim` uses
`BKE_scene_multiview_filepath_get` (no matter if only a single view is
enabled), but logic in `BKE_image_render_write` falls back to using the
"regular" filepath (once gotten from `BKE_image_path_from_imformat`) if
there are less than two views.
That would also break the behavior of "Skip Overwrite".
Digging in git history is a bit hard, so not exactly sure why this was
added, but this PR changes behavior so that
`BKE_scene_multiview_filepath_get` is always used (even for a single
(non-empty) view. Done by implementing `RE_ResultIsMultiView`
Pull Request: https://projects.blender.org/blender/blender/pulls/138507
It would not use topological distances.
This was the case for Grease Pencil, Curves were right though (even
though both use the same code `curve_populate_trans_data_structs` /
`calculate_curve_point_distances_for_proportional_editing`)
So that calculation is actually right, the thing that made it fail for
Grease Pencil was that `init_proportional_edit` was calling
`set_prop_dist` with the `with_dist` argument as `true` [this would
overwrite the already calculated dist with the "plain", "non-
topological" distance again... leading to wrong values being used in
`calculatePropRatio`]
So to resolve, skip the `set_prop_dist` alltogether if T_PROP_CONNECTED
is used. Done for both Curves and Grease Pencil and move into own block.
Legacy Curve get their own codeblock (with a comment where their
topological distances are calculated).
Pull Request: https://projects.blender.org/blender/blender/pulls/138588
Part of #136993.
Share as much of the ShaderCompiler implementations as possible.
Remove the ShaderCompiler/ShaderCompilerGeneric split and make most of
its functions non virtual.
Move the `get_compiler` function from `Context` to `GPUBackend` and
creation/deletion to `GPUBackend::init/delete_resources`.
Add a `batch_cancel` function to `ShaderCompiler` (needed for the
GPUPass refactor).
As a nice extra, the multithreaded OpenGL compilation has become faster
too.
The barbershop materials + EEVEE static shaders have gone from 27s to
22s.
I have not observed any performance difference on Vulkan or Metal.
Pull Request: https://projects.blender.org/blender/blender/pulls/136676
Expand the already-existing safety margin to correct for the implosion
scenario, by a factor of 100x. That way it doesn't zoom in too much,
and makes it easy for an animator to zoom out again if necessary.
Pull Request: https://projects.blender.org/blender/blender/pulls/138235