This was happening because in `apply_eval_grease_pencil_data`
we gather all the potential original layers to clear. This was done
by taking the set of all original layers and then removing layers
from the set that map to an evaluated layer.
The remaining layers are unmapped and should be cleared.
The problem is that invisible layers are no longer part of evaluated
data so there wouldn't be a mapping that could be found.
To fix this, we don't initialize the set of `orig_layers_to_clear` to
all the layers, but instead to only the layers that are visible.
This will ensure that we don't clear keyframes of hidden layers.
Pull Request: https://projects.blender.org/blender/blender/pulls/135121
Building failed with certain build options disabled, such as in my
extra-lean build.
Bisecting indicates that d0a6189b50 was
the cause, although it's not obvious to me why. But likely some
indirect include that was lost in the refactor.
This uses a fixed point size for selection, so that point selection is always visible
regardless of radius size.
The radius size is used to offset the selection point, so it is always visible, even when the radius is too large.
Co-authored by Hans Goudey.
---
Pull Request: https://projects.blender.org/blender/blender/pulls/134908
And slightly simplify two string processing functions in this API,
`GPU_vertformat_safe_attr_name` and `copy_attr_name`.
This makes the API easier to interface with from C++ code,
and can avoid unnecessary string length measurements.
Pull Request: https://projects.blender.org/blender/blender/pulls/134882
This cleanup naming convention and code clarity. There
is no functional change.
- `elem_ranges` is changed to a `Map` to avoid relying on
`sel_data->drawn_index`.
- `select_draw_utils.cc` is merged with `select_engine.cc`
- `index_drawn_len` is renamed to `max_index_drawn_len`
- Remove the usage of `DrawData`
Rel #134690
Pull Request: https://projects.blender.org/blender/blender/pulls/134940
The emissions strength was only set when using an emissive texture.
Additionally, for colors brighter than 1.0, normalize the color
into 0..1 range and set the strength accordingly.
Pull-Request: https://projects.blender.org/blender/blender/pulls/135094
This applies to modifiers, constraints and shape keys.
Any driver on such data was not removed with it,
leaving invalid drivers on objects.
With this patch, the drivers are removed, but animation is left untouched.
This is because animation might be reused somewhere else and we don't
want to introduce potential side effects there.
This also adds unit tests for the fixed cases
Pull Request: https://projects.blender.org/blender/blender/pulls/134511
Remove GP legacy obtype and unused functions
Few hidden bugs are fixed with that:
- Outliner drag-drop for GP material/effect elements now works
- Correct stats are shown in status bar.
Pull Request: https://projects.blender.org/blender/blender/pulls/133957
Only remove a grease pencil layer from the evaluated copy when its
visibility is not animated.
Animation evaluation does not recreate the evaluated copy from scratch,
and thus once a layer is removed due to it being invisible, it never got
back.
The animatedness of the `.hide` property is determined once, when the
evaluated copy is created. This is subsequently used during evaluation
to determine whether the layer can be removed or not.
Pull Request: https://projects.blender.org/blender/blender/pulls/135057
Our UI code is currently showing the text "inf" when a numerical input
contains _exactly_ the value of FLT_MAX. But this is the max value for
doubles and we enforce a maximum float precision of 6 digits. This
means that a property can start with "inf" by default but it is
impossible edit, or even keep the same value, by editing in the UI
and show as "inf". This PR defines values that are the actual minimum
and maximums currently usable in the UI and values greater than or
equal to are shown as "inf" (equivalent for "-inf").
Pull Request: https://projects.blender.org/blender/blender/pulls/131876
Currently these operators work on the active attribute for each
selected mesh or curves data-block. That doesn't really make
sense because you can only see the active attribute for the
active data-block. It's better to try to affect the attribute with
the same name for every geometry, regardless of which is active.
Pull Request: https://projects.blender.org/blender/blender/pulls/135067
Extrude refactored to use `foreach_selected_point_ranges_per_curve`.
This reduces amount of code and increases readability significantly.
Function `curves_extrude_exec` is refactored to follow structure of
other operators. Also to return `OPERATOR_CANCELLED` when extrude was
called with no points selected.
Pull Request: https://projects.blender.org/blender/blender/pulls/135056
Currently, when selecting a file path using the file browser opened from the
node socket, there is no filter active making it harder than necessary to find
the correct file. This patch adds the proper filter. Something similar is done
when using e.g. the gltf import from the menu.
Supporting this requires changes in a bunch of places:
* `StringPropertyRNA` now has a callback that returns the file path pattern.
This has to be a callback, because the same property is used on all file path
sockets, but the valid extension depends on the node.
* The string socket declaration also has the optional path pattern. This can be
set in the node declarations.
Pull Request: https://projects.blender.org/blender/blender/pulls/134931
Fill opacities of individual strokes was overlooked when implementing
the Set Uniform Opacity operator, now corrected and also added a
separate property for controlling stroke/fills opacity.
Pull Request: https://projects.blender.org/blender/blender/pulls/134982
Grease Pencil ID data was being evaluated in the
`BKE_grease_pencil_data_update` function, but this function
is called from the evaluated objects.
The fix adds a new `BKE_grease_pencil_eval_geometry` function
thats called as a callback from `build_object_data_geometry_datablock`.
Resolves#134980, #135004.
Pull Request: https://projects.blender.org/blender/blender/pulls/135051
Now import nodes are automatically created in Geometry Nodes when dropping
`.obj`, `.stl`, `.ply` and `.csv` files. Note that this is still hidden behind an
experimental feature flag.
Pull Request: https://projects.blender.org/blender/blender/pulls/135036
This patch uses the BKE implicit conversion rules to implement implicit
conversion in multi-function procedure operations in the compositor.
Since conversions use ColorSceneLinear4f to represent colors instead of
float4, we need to insert extra implicit conversions around color
sockets.
Special attention was given to variable destruction in the
implementation because it is now possible for implicit variables to be
outputs, so we need to make sure they are not destructed.
Move the code dealing with converting float3 to GPU normals
out of the vertex format header into a separate header. Use a
proper C++ namespace and remove duplication by only using
the more recently added C++ templated conversions.
Most of the diff comes from the removal of the indirect includes
from GPU_vertex_format.hh. A lot of files ended up mistakenly
depending on that.
Pull Request: https://projects.blender.org/blender/blender/pulls/134873
Update `BKE_fcurves_id_cb(id, callback)` so that it only reports
F-Curves for `id`. With legacy Actions this used to be "all F-Curves in
the Action", but with slotted Actions it should only report the F-Curves
for the assigned slot.
`BKE_fcurves_id_cb()` is used in two places:
1. Updating F-Curve paths in versioning, for example when node sockets
were added/removed. For this it is vital that the updates only happen
for those nodes that were actually affected by this versioning code,
and not blindly for all F-Curves in the Action.
2. Marking properties as 'animated' in the depsgraph, and the 'value
backup' for those properties. This should also be only done for the
properties of that ID, and thus be limited to the F-Curves for the
assigned slot.
Pull Request: https://projects.blender.org/blender/blender/pulls/134851
Entire curve points range is passed to transform-container when
proportional editing is on. Consequence is, strokes from locked
materials are also affected. Use `editable_points` mask to resolve this.
Pull Request: https://projects.blender.org/blender/blender/pulls/134838
The issue was introduced on 1584cd9aa5 (see !134911 for details).
This fixes this and rename the remaining point_cloud from the API.
The DNA is left untouched, so users don't need to re-enable the
experimental point cloud feature.
Pull Request: https://projects.blender.org/blender/blender/pulls/134927
The fix 8af27ce27e assumed that
the `edit_hints->positions()` were always empty and that we would always
fallback to using the evalauted positions instead.
But if the edit hints are populated, this fails. In this case, we populate the
positions in `remember_deformed_positions_if_necessary`.
The fix makes sure that we write to the `edit_hint` positions if they are
populated.
Pull Request: https://projects.blender.org/blender/blender/pulls/135033