This PR adds a new operator to run a node group on object geometry.
Only curves sculpt mode is supported for now, to simplify the design.
A new geometry node editor context to edit operator groups is also
added. This allows changing any node group, rather than only node
groups that are part of the active modifier context.
3D viewport menus are added with any geometry node group
asset in a catalog that contains the `Operator` tag. Currently Blender
must be restarted to refresh the list of available operators.
This is only the first phase of the node group operator feature.
Many more features will be added in next steps.
See #101778
Pull Request: https://projects.blender.org/blender/blender/pulls/108947
`Mouse Input::in val_unproj` was disregarded when resetting the initial
mouse position.
This caused the mouse to return to the previous position before the
`Set Snap Base` after navigating the 3D view.
Usual issue of modifying the data hierarchy while iterating on it in its
outliner representation. And usual fix for this problem (only store data
to be processed during the iteration over Outliner data, and perform the
actual operation in a single call afterwards).
This commit also tries to improve a bit the 'Clear' process when applied
to a bunch of IDs, by iterating several times over the list of IDs to
clear, and only processing 'liboverrides leaves' first. That way, if
clearing a liboverride leaves turn other liboverrides into leaves, then
can also be processed that way, instead of just being reset.
Note that this is a naive and quite imperfect solution though
(dependency islands cannot be handled that way e.g.), this feature needs
a complete re-write at some point to be more complete and consistent.
Don't think this is high priority though, as it is not really that
useful in practice afaik.
Note: This should be backported to 3.6 LTS (and maybe 3.3 LTS if
applicable).
Similar to 5f16e24cc9, this adds support for edit mode
to the point cloud object type, which is currently hidden behind an
experimental option. No interaction is possible yet, for now this
can be used as a testing for a node-group-operator-only mode.
`CD_HAIRLENGTH` is not really a custom data type, it was just used to
specify the hair particle "length" attribute to pass it to EEVEE and
material preview. Because of the "typemap" array in `CustomData`,
it's better not to have this unnecessary type. Instead, use the same
mechanism used to request the active color attribute.
Pull Request: https://projects.blender.org/blender/blender/pulls/109449
The internal `use_occlusion_test` option was only being removed if it
was in conjunction with the `Snap to Face` option.
Both test occlusion and Snap to Face are conflicting. In wireframe mode
the objects are not occluded, but Snap to Face can prevent them from
being snapped.
The solution is to prioritize snapping to other non-Face elements but
still allow "Snap to Face" in X-Ray mode.
Since UDIM baking support in 6787cc13d4, the normalization of
diplacement heights was always based on the min/max height detected in
the _last_ tile, which could lead to clipping if the last tile had very
subtle (or no) displacement.
Now getting the min/max is spread across all images.
This also takes the first thread into account for getting the min/max (which for some reason was skipped).
Pull Request: https://projects.blender.org/blender/blender/pulls/109409
Since 3f26bdf840, `text_format_string_literal_find` is used to get the
length of the string literal. This can return -1 though and this can
lead to accessing negative index in the string afterwards.
Now, let `text_format_string_literal_find` return 0 (instead of -1) since 0
is never going to be a valid string length anyways.
Pull Request: https://projects.blender.org/blender/blender/pulls/109441
The new drawing operator uses the `paint_stroke` API which didn't
know about grease pencil yet. This simple change causes the redraw
to happen on every(?) event, which did not happen before.
The multiplication sign looks like an "x" but should be used in its
stead to display calculations and dimensions such as "1920x1080". It
is supported in many fonts including DejaVu Sans, the font currently
used for the UI.
Pull Request: https://projects.blender.org/blender/blender/pulls/106388
This is the minimal change required to start using modern CMake in the
blender build system. This change is designed to allow small
incremental changes to the build system rather than doing it in one
big bang which would be unmaintainable (for me)
The biggest functional change is, previously all libraries in the
`LIB` section of a `blender_add_lib` call had the `INTERFACE` scope,
which is rarely, if ever the correct scope. This diff changes this to
`PRIVATE`
Concrete implications of this diff :
The `LIB`, `INC` and `INC_SYS` sections of an `blender_add_lib` call
now allow scoping keywords (`PUBLIC`, `PRIVATE,` `INTERFACE`) to
declare the scope of the dependency.
Right now the only library using any modern cmake is
`bf_intern_atomic` which is an header only interface library that will
just advertise its include directories.
This allows us to clean up any `CMakeLists.txt` that adds
`../../../intern/atomic` to its `INC` section to remove it in `INC` by
adding a `PRIVATE bf_intern_atomic` to the `LIB` section.
Pull Request: https://projects.blender.org/blender/blender/pulls/107858
As suggested in #108669, the "Navigate during Transform" option has
been removed and this feature works by default.
Now if you press `G`, `R` or `S` to move, rotate or scale an object you
can also navigate in the viewport.
Note that this update modifies the default keymap.
Now pressing `Alt` is required for the following modals:
- `PROPORTIONAL_SIZE_UP`,
- `PROPORTIONAL_SIZE_DOWN`,
- `PROPORTIONAL_SIZE`,
- `AUTOIK_CHAIN_LEN_UP`,
- `AUTOIK_CHAIN_LEN_DOWN`,
- `AUTOCONSTRAIN`,
- `AUTOCONSTRAINPLANE`.
Pull Request: https://projects.blender.org/blender/blender/pulls/109388
The root of the issue was that when localizing all linked data, it makes
no sense (and there is no way) to keep liboverrides, since some linked
data would then remain linked.
The solution is then to clear any override data from localized IDs.
While simple in theory, this adds a noticeable amount of complexity to
the 'append' process, as now some IDs should remain linked, and some
should be forcefull copied (instead of directly made local), such that
the liboverride reference data remains valid.
NOTE: Appending without `Localize All` remains unchanged here, and will
keep the liboverrides untouched, since in that case having some linked
data as result of the append operation is expected.
This fix should be backported to the 3.6 LTS.
In some cases, when making a linked liboverride data local, the
liboverride data should be preserved (and therefore produce a local
liboverride data).
However, it implies that the data is not really, fully made local, since
it has (critical) dependencies to linked data.
This new option allows 'make local' code to also clear any liboverride
data in the processed ID, making it effectively fully local.
Preliminary step to solve #109004.
- Use C++ types for matrices and vectors;
- Deduplicate code with `SnapData::register_result`;
This commit also improves the way of detecting supported snap types.
In 3957a1ad03 was
added the new Rotation socket to a Mix node.
Mix node can be used in shaders node tree. This cause problem,
rotation socket is not supported in shader currently. This fix
just add check to ignore any unsupported sockets in shader and
to fix any related problem.
Pull Request: https://projects.blender.org/blender/blender/pulls/109410
This commit implements building of the layer tree hierarchy in the
layer tree UI.
Layer Groups that contain layers are now collapsible and visibility as well
as locking can be toggled.
This adds a `groups` collection property to the grease pencil data
to access group information.
For now groups have a `name`, `hide`, and `lock` property.
Similar how nodes and layers are cached in a flat vector, this commit
adds caching of layer groups. This will be used e.g. by the python API
to access all the groups as a collection property.
This adds functions to check if a `LayerGroup` is visible or locked.
Additionally, visibility and the lock state is now inherited.
E.g. `Layer`s that are the children of a hidden `LayerGroup` will also
be hidden. This does not change their stored visibility. It just means
that the function `is_visible()` on the layers will return `false`.
The same applies for locking.
`uiDefAutoButR` (or actually `uiDefButR_prop` > `ui_def_but_rna` later
down the line) has this behavior when "" string is passed in, it will
not display text on or next to the button.
This is of course desired in most scenarios -- it might even be desired
for non-icon enums in certain cases (though this is already a bit harder
to find cases for), so changing behavior in said functions is probably
not what we want.
The behavior - from the dopsheet sliders - would seem like a bug though.
Passing NULL (instead of "") to `uiDefAutoButR` results in properly
displaying the chosen item on the dropdown for enums, but for other
property types it would then show the property ui name alongside the
button (which is not what we want in the dopsheet, UI names are already
drawn there separately).
So now, pass "" or NULL conditionally (depending on property type
`PROP_ENUM`).
Pull Request: https://projects.blender.org/blender/blender/pulls/109205
This happened, because `SEQ_retiming_find_segment_start_handle()` does
not consider last handle as valid return value, so it was never checked
against.