This class was used to make `AssetLibraryReference` work as a key
in `Map`. But defining a class for that is unnecessary. Instead it's
simpler to just declare the equals and hash operators separately.
Reducing the number of wrappers and indirections should make
this code slightly easier to understand.
This is a solution to avoid redrawing the depth buffer for each Zoom
with `Auto Depth`.
The solution is to move the `ED_view3d_depth_override` function out of
`ED_view3d_autodist` and only call `ED_view3d_depth_override` if the
depth buffer is not used by any current engine.
Pull Request: https://projects.blender.org/blender/blender/pulls/113026
The hard eraser changes end caps to "flat" when cutting strokes. This
requires detecting when the start or end points of a stroke have been
cut.
The previous method relied on checking the next curve's start point for
cuts to determine end point cuts, but this only holds true for cutting
strokes in the middle. When only the start point is cut the preceding
curve should not be affected.
The new test uses local properties of the `PointTransferData` to detect
unchanged source curve end points, instead of doing a look-ahead for the
next curve. This works using the source point indices, which are
inverted for end points. Combined with checking for the `is_cut` flag
this gives a reliable answer to when a stroke end point is cut.
Pull Request: https://projects.blender.org/blender/blender/pulls/119151
The property is actually there, but was marked PROP_SKIP_SAVE |
PROP_HIDDEN in 4234cddda9
This PR removes this again (with the consequence that shortcuts/menu
entries will now remember the select setting from the last time).
This is now in line to how editmode does this (the "Reveal Hidden"
operator).
Pull Request: https://projects.blender.org/blender/blender/pulls/119153
When in mesh editmode, skin_vertices point to bmesh customdata, the
skin_vertices data is empty since custom data is stored per element
instead of a single array there (same es UVs etc.).
Fix similar to 3e2619b3e7, 5179b8236b (basically disallowing the
access in editmode).
Pull Request: https://projects.blender.org/blender/blender/pulls/119149
The Edge Slide code was practically redone to correct errors and to
enable this operator to become a generic transform operator.
The errors are;
1. Unpredictable slide direction when the vertex "slides" over multiple
edges.
2. Incorrect direction when the sliding edge has disconnected faces.
The fixes were:
- When the sliding direction splits into multiple directions, the
chosen target is now the intersection of the destination edge lines
(instead of the average point or a randon point)
- If the edge faces disconnect, the vertex slides in different
directions on each face.
Other changes:
- Use C++ for Array e Vector types.
- Create methods to access or edit struct parameters.
- Use `TransData` to access the initial position of the vertex.
- Acess slide vertice by reference.
Changes:
- Use C++ for Array e Vector types.
- Create methods to access or edit struct parameters.
- Use `TransData` to access the initial position of the vertex.
These changes will allow Vert Slide to be compatible with other
transform "convert_types".
In future files from 4.2, `object_to_world` is moved to a runtime struct
and therefore isn't saved in files. It was always considered runtime information
though, since it's built by depsgraph evaluation and copied back to the original
object. Therefore to have the proper data in `object_to_world` we need to
evaluate the depsgraph.
This partially solves #118694, but there is still an issue with the snap cursor
system never running before using the `plane_omat` value.
This is a different solution to #32068
The sliding edge occlusion test is done to prevent a non-visible
reference vertex from being used to calculate the factor direction.
This commit changes the behavior, but the difference is difficult to
notice.
The changes in behavior are:
- Other objects affect occlusion.
- Slide direction is used to test occlusion instead of edge.
- The reference point is now the point whose direction is visible and
is closest to the mouse cursor.
The code checked to see if `v_side` existed to create the drawing, but
the direction can exist without a `BMVert` in the target.
Remove this `v_side` member as there is really no use for it.
Currently user feedback suggests this overlay is getting in the way
more often then not, since it is usually quite large compared to the
scale of the model. In the future it could be enabled/disabled based
on the "strand/strip" display option, which is planned to move to
objects instead of the scene in the future. However, until then, it
seems better to disable the preview.
This replaces the somewhat hackish and usafe code used previously.
Also fixes a potential bug, where the newly created `local_id` was
dereferenced before checking for it to be non-null.
Pull Request: https://projects.blender.org/blender/blender/pulls/108328
Seems to work OK in basic cases, but needs more work when copying
outside of Main at least.
Note: There is no behavioral changes expected from this commit.
Note that there are at least two known usecases for this change:
* Liboverrides, as with recursive resync and proxies conversion it
often ends up creating 'virtual' linked data that does not actually
exists in the library blend files.
* Complex versionning code (`do_versions_after_setup`) when it needs
to create new IDs (currently handling linked data that way is just not
supported!).
Implements #107847.
For example, creating the "position" attribute with the wrong name or type
could crash Blender when exiting edit mode. This is because some data isn't
stored as attributes in Blender, and the attribute API doesn't work very well
with BMesh.
Two parts to the solution:
- Remove builtin attributes with incorrect domains or names when
converting from BMesh to Mesh.
- Add error messages when creating builtin attributes in edit mode. It's still
possible to create name-convention attributes, because Blender should be
able to handle different types and domains for them.
Pull Request: https://projects.blender.org/blender/blender/pulls/119110
* Only works on machines with a Qualcomm Snapdragon 8cx Gen3 or above.
Older generation devices are not and will not be supported due to
some driver issues
* Requires VS2022 for building.
* Uses new MSVC preprocessor for sse2neon compatibility.
* SIMD is not enabled, waiting on conversion of blenlib to C++.
Ref #119126
Pull Request: https://projects.blender.org/blender/blender/pulls/117036
The `StepObject` stores customdata but relies on C++ object destruction.
CustomData is a C struct and doesn't get freed automatically, the
StepObject needs a destructor that takes care of the owned custom data.
Pull Request: https://projects.blender.org/blender/blender/pulls/119125
The copy constructor of the Layer class didn't do a copy
of the frames storage (DNA) and only a copy of the frames map (runtime).
This is fine, but we need to make sure to tag the frames storage,
because it is out of sync otherwise.
During edit mode undo, the layers were copied (but the frames storage not tagged) which meant that after undoing and then saving the file,
the frames would be gone after reloading.
The fix makes sure we tag the frames storage, so that it is properly synced.
The angle of the outline modifier caps was computed in a [-pi, +pi)
interval, but this creates an unstable situation for angles close to
180. Small variation can lead the angle to flip from +180 to -180 and
change the direction of the semi-circle. Instead generate arcs always
in counter-clockwise direction and use angles in the [0, 2pi) intverval.
This creates stable directions for end caps and also allows larger
arcs where necessary.
Pull Request: https://projects.blender.org/blender/blender/pulls/119122
Regression in 427eed292d.
Root of the issue was that animation system was using a single same
check to decide if an F-Curve/driver was valid to use to animate some
data, and whether user can create/edit animation for that data.
Both cases are actually different, since e.g. linked data is not
user-editable, but it can still be animated (either by related linked
Actions, drivers defined in the linked data, or some more hackish
changes like py API/RNA scripting).
This commit now defines two checks:
* `RNA_property_animateable`: whether a RNA pointer & propoerty is
animateable, based on their types and definition.
* `RNA_property_anim_editable`: whether a specific data referenced by
the RNA pointer and property is effectively user-editable.
The new `driveable` check added by 427eed292d is also renamed to
`RNA_property_driver_editable` (since the basic type-based
`RNA_property_animateable` is also valid for drivers currently).
Pull Request: https://projects.blender.org/blender/blender/pulls/119089
The Realtime Compositor crashes with intricate node setups. That's
due to hardware limitations where shaders can't have as many output
images as needed by the compositor shader operations. To fix this, we
recursively split shader operations until their output count fits the
hardware limitation.
Pull Request: https://projects.blender.org/blender/blender/pulls/119075