Move `GeometrySet` and `GeometryComponent` and subclasses
to the `blender::bke` namespace. This wasn't done earlier since
these were one of the first C++ classes used throughout Blender,
but now it is common.
Also remove the now-unnecessary C-header, since all users of
the geometry set header are now in C++.
Pull Request: https://projects.blender.org/blender/blender/pulls/109020
Fixed an issue where meshes without loose elements or hidden triangle
faces were not taking into account the relevant masks.
From the user's perspective, this might not have seemed like a
significant problem. However, hidden faces in edit mode were
occasionally still snappable.
No functional changes
In preparation to tackle the following 2 Todos
* TODO: view scale should factor into this someday too...
* TODO: optimize this to not have to calc stuff out of view too?
I did the following cleanup
* extracted drawing code for `BEZT_IPO_BEZ` into a separate function
* extracted code that calculates the resolution between 2 points into a separate function
* cleaned up comments
* renamed variables to have a more telling name
* moved variables closer to where they are used
* added `const` where possible
Pull Request: https://projects.blender.org/blender/blender/pulls/108748
Duplicating will otherwise keep the same bake directory, which causes
a path conflict and requires manual fixing by users. Clearing the path
on copy makes it so the default path is generated on baking.
This does not change the path when doing internal copies, like
- Depsgraph "evaluated" object vs "original"
- Appending or linking objects
- Making a linked object local
Pull Request: https://projects.blender.org/blender/blender/pulls/109014
This commit implements several changes aimed at enhancing the
readability of the transform snap object code.
The changes are:
- Reduce number of parameters in functions;
- Unify functions;
- Replace enum `eViewProj` with a bool;
- Remove unused members;
- Deduplicate code;
Pull Request: https://projects.blender.org/blender/blender/pulls/109012
Caused by 5621154185.
The Perpendicular Snap needs a `prev_co` to work.
But in `Snap With` `Closest` mode the `prev_co` is not calculated.
Thus, when isolated, the snap to Perpendicular is never done.
So this commit puts the `center_global` fallback back to `prev_co`.
Also, if `Snap Base Edit` is used when only the snap to
`Edge Perpendicular` is enabled. `Snap To` will be temporarily set to
`Vert`, `Edge`, `Face` and `Edge Midpoint`.
The counters for polygons count and face corners count were inverted,
leading to various out of bounds accesses due to wrong data size
allocation.
Not sure where the bug comes from, whether it's original, or a typo from
some refactor.
The Alembic procedural was refrenced here even if USD was loaded.
Now check the CacheFile type and let the user know Render Procedurals
are only supported for Alembic atm.
Pull Request: https://projects.blender.org/blender/blender/pulls/108701
Since we scale the GPU matrix a certain way (in order to draw a round
circle even for different UI x/y scaling), we have to also compensate
with GPU matrix translation (instead of drawing the raw
frame/value as coords untranslated).
There might be ways to solve this differently (e.g. manipulating the passed
coords instead of the GPU matrix or having a version of imm_drawcircball
that can do this in a way that compensates UI view scaling), but this seems
to be the most straightforward.
Thx @mano-wii hinting at the way to do this with GPU matrix alone.
Should probably go into 3.3 LTS as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/108979
The current Vulkan resource management has some issues as context that
are not active can still use resources that are freed via another
context.
When this happens incorrect data can be read on the GPU and even crash
Blender. When trying to bind something that now contains other memory
pointers.
This change introduces that contexts are tracked via the device.
Context will be registered/unregistered with the device instance.
Unbinding of resources must pass the device and the device will check
all registered contexts. Binding of resources will happen via the active
context only.
On user perspective this now allowes:
- Opening/switching files
- Switching workspaces
- Switching render engines
Pull Request: https://projects.blender.org/blender/blender/pulls/108968
As Alembic stores hierarchies as paths separated by a forward slash, such
character cannot be used in a name. This resulted in an uncaught thrown
exception. To fix this, replace '/' with '_' like for other illegal
characters.
The Alembic data streaming can optionally interpolate between vertex of
two adjacent frames in order to smooth out the transition between
frames.
However, the decision to interpolate is only based on the vertex count.
This is not too robust as topology/connectivity can still differ even if
the number of vertices is the same (for example physics simulations and
videogrammetry can be set to output the same vertex count, but optimize
the triangle placement). This lead to vertices of unrelated polygons
being interpolated across frames.
To fix this, we now also check if the connectivity across frames is the
same, instead of just checking the topology counters. Although the bug
is revealed by the vertex interpolation routine, a similar fix is applied
to the check on topology change used to decide if the modifier has to be
evaluated for orco evaluation.
Pull Request: #105867
Until point clouds support multiple materials, just copy
the material from the first point cloud. This approach is the
same as for texture coordinate of meshes, active color attribute
of custom data, etc.
Pull Request: https://projects.blender.org/blender/blender/pulls/108990
Currently on Windows some dependencies are built with MinGW/GCC 3.x
this commit removes that, in favor of building them with MSVC
via msys2. This will make it easier in the future to offer Win/Arm64
builds of blender.
Notable changes:
- This change drops support for the external libxvid library in favor
of ffmpegs built in support for this format. This has been done with
permission from the VFX module.
Pull Request: https://projects.blender.org/blender/blender/pulls/108983https://projects.blender.org/blender/blender/pulls/105502
The named attribute node gave connections from the "Exists" socket
to the new rotation socket type, and the sample volume node set its
type to unsupported values, causing a crash.
Add a quaternion rotation socket type, and using the recently added
rotation attribute type, support the type in most of the multi-type
geometry nodes, and modifier attribute inputs and outputs.
The socket is still exposed with an XYZ Euler default value.
In the future we can add modes to this rotation value similar
to object rotations.
Rotation values have no implicit conversions to other types.
Nodes to convert to and from rotation values will be added
in a follow-up commit.
For now, the new socket type is hidden behind and experimental
option, because we haven't chosen the final color for it yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/108903
This commit splits the `transform_snap_object.cc` file into 4 files:
- `transform_snap_object.hh`
- `transform_snap_object.cc`
- `transform_snap_object_editmesh.cc`
- `transform_snap_object_mesh.cc`
The `transform_snap_object.hh` header, in addition to sharing common
types, allows functions defined in each of these files to be shared
between them.
This makes the code easier to read and simplifies maintenance.
Pull Request: https://projects.blender.org/blender/blender/pulls/108949
Adds an optional list of panels to node trees. Each socket can be
assigned a panel. UI panels will be created in the future in the
modifier for these grouped sockets.
Panels are stored as a pointer array in node trees, next to socket
declarations. Each panel has a name, but it does not have to be unique.
In future a panel might also store whether it is visible by default and
similar information.
C API and RNA API are both added. Panels and their socket
assignments are accessible to users through another list in the "Group"
tab of the node editor sidebar.
Sockets in the same panel will remain together even when adding,
removing, or moving sockets or panels, renaming, etc.
A socket can be moved up or down within a panel but each panel
remains a contiguous block. Actual tree views may be created later.
Pull Request: https://projects.blender.org/blender/blender/pulls/108649