Note: this is a back-port from `main`, details below,
Original message:
Add support for dynamic NDOF orbit center calculation.
- When "Auto" NDOF preference is enabled:
All visible objects in the viewport are used to calculate a
bounding box center, if the bounds are outside the view or the center
is behind the viewport, use a Z-Buffer test to calculate the depth in
the middle of the region.
- When "Use Selected Items" NDOF preferences is enabled,
calculating the bounds from the selection.
- An option to show the orbit center as a guide has also been added.
Ref !129594
Co-authored-by: Kamil Galik <kgalik@3dconnexion.com>
Back-ported as this change as this only missed the 4.4 branch by hours
and is considered an important feature for 4.4 by 3dconnexion.
This includes the following commits from main:
1a14d6949830399fd1653a8658958fda8d9d989e2a0ce11104fb539baa89
The Status Bar often shows context menu items as the name of that menu,
which is confusing in this context. For example in Object mode it shows
"Object" as the right-click operation. In Grease Pencil it shows this
as "Draw" even though you don't draw with it. In "Sculpt" mode you see
two items as "Sculpt", one on left click and the other on right click.
This PR makes all these show as "Options" instead. This seems like a
very succinct description of what is available on right-click.
Pull Request: https://projects.blender.org/blender/blender/pulls/134191
Remove the `ActionLayer.mix_mode` and `ActionLayer.influence` properties
from RNA. The animation evaluation already takes these into account, but
there is no guarantee that the mixing that is currently implemented is
going to be mathematically identical to the eventual implementation. So
better to not expose the properties quite yet.
Pull Request: https://projects.blender.org/blender/blender/pulls/134186
The stroke index was wrong when a influence filter is active in the
modifier, this would lead to crashes. Now corrected this by only
iterating duplicated strokes in front of the curves geometry.
Pull Request: https://projects.blender.org/blender/blender/pulls/134038
Don't template size for matrix is_negative. These are causing random
build failures on the Windows buildbot.
Note that these already have the assumption of 3D coordinates baked
in. For 2D or 4D coordinates the implementation would have to be
different. So templating these for arbitrary dimensions does not
make much sense.
Pull Request: https://projects.blender.org/blender/blender/pulls/134137
User may think of the `radius` vector value as RGB color, however it's
meant to be the depth of scattering for R/G/B channels. Now clarified in
the desctiption.
Pull Request: https://projects.blender.org/blender/blender/pulls/134088
It already doesn't work in a very fairly simple case when the Grease Pencil
geometry is transformed. This simple case used to work before we changed
the Transform Geometry node to transform layers instead of points.
Pull Request: https://projects.blender.org/blender/blender/pulls/134131
The issue was that the topology of the drawing changes when the bezier
curves get resampled to poly curves in the armature modifier.
This means that the crazyspace code fails to find deformed positions
with the same length as the original positions.
The fix does multiple things:
* First, we make sure that we create an `GeometryComponentEditData` in
weight paint mode.
* When the armature modifier runs, we remember the current positions in
this component.
* Then, we store the curve offsets and weights _before_ converting the
bezier curves.
* Finally we deform the positions stored in the edit hint component
(which have the same length as the original positions).
Since the resampling just adds new points, there might be a way to
avoid running the armature deformation a second time on the edit
hints, but I'll leave that for another day as a performance improvement.
In any case, this is only done when we actually need the deformation
(e.g. in weight paint mode when we paint the weights).
Pull Request: https://projects.blender.org/blender/blender/pulls/134030
Yet another remaining case of non-trivial data created with C-style
allocation.
While 4.4 and previous did not exhibit the crash, the invalid code
responsible for this crash is present here as well, and it would be
dangerous not to fix it.
As indicated by pablovazquez , operators that open a pop up should end with `...`.
I decided to change the operator name instead of doing it in python with `text=`
This seemed more reasonable to me because it can't be forgotten when adding this operator
somewhere else, but I am not sure if this is the right way to do it.
Pull Request: https://projects.blender.org/blender/blender/pulls/134062
Blender crashes when appending a Bloom node. This is because the scene
is needed to infer the render size while versioning, and the scene
doesn't exist while appending, so we need to fallback to a default
render size in those cases.
Most event icons shown on the status bar are made up of an icon with
text inside of it. The icon sizing used 2D zoom aspect value, but the
text does not. I had not noticed any use of these outside of Status Bar
so this wasn't tested. Using aspect requires much more precise
measurement and placement of the text using calculated margin values.
Pull Request: https://projects.blender.org/blender/blender/pulls/134146
This was caused by the input matrix not being used.
Instead EEVEE was trying to derive the projection matrix
again based on the actual viewport state. But this state
was not reflecting the input matrix.
To fix this, we remove any camera setup from the rv3d during
the offscreen drawing and set the lens param to 0.
This ensure EEVEE loads the input projection matrix.
Second part to fix#130007, after 50f7666785.
When saving a new file with the current file asset library loaded, the
library wasn't converted properly to an on-disk library. While the
library was loaded again as on-disk library, the previous runtime
version of it wasn't cleared, so catalog definitions could be duplicated
across available libraries.
Make sure the runtime only library is destructed properly, and the UI
refreshed.
There seem to be more issues with converting the runtime current file library to
a on-disk current file library, but these can be addressed after the crashes and
hangs are fixed, see report.
Pull Request: https://projects.blender.org/blender/blender/pulls/133341
If "Playback Frame Rate" is enabled (Preferences / ViewPort / Display)
and showing the "Text Info" viewport overlay, then "fps" is shown in
the place of the View Name while the animation is played. Every time
this starts there is a jiggle where the Object Info line is drawn at
the first line instead. This is because the FPS can early exit and not
update the vertical line position. This PR fixes that.
Pull Request: https://projects.blender.org/blender/blender/pulls/134074
Previous approach was using non-evaluated meshes to find the closest edge from a face index retrieved from the selection buffer.
This can fail though if the mesh is deformed or even altered to not have the same indices anymore (e.g. generating/masking modifiers).
In order to make this work, added `ED_mesh_pick_edge` which switches the selection context to edges directly
and picks from those. No need to map anything back and forth between original and evaluated, the selection buffer contains the original indices already.
Further logic (following the face loop) is untouched (and happens on the original geometry which is fine)
Should go into 4.2 LTS as well
Pull Request: https://projects.blender.org/blender/blender/pulls/132803
The changes from 29356e2bf7
fixed a readability issue with loose wire not being as prominent as
regular surface wireframe.
But also added a regression where the object color wireframe mode
made the object color imperceivable when the object is selected.
This commit fixes the issue by setting the facing factor to 0.5 for
loose wires. This way, both the theme color and object color wireframe
more are blended enough to be distinguishable and still retain the
object color hint.
The issue was that the code did not handle input sockets that are fields
implicitly correctly. It just retrieved a single from them, instead of
treating them as having an unknown value.
Use sub-pixel differentials for bump mapping helps with reducing
artifacts when objects are moving or when textures have high frequency
details.
Currently we scale it by 0.1 because it seems to work good in practice,
we can adjust the value in the future if it turns out to be impractical.
Ref: #122892
Pull Request: https://projects.blender.org/blender/blender/pulls/133991
Partial fix for #130007.
The catalog tree mutex would be set in `catalog_tree()` and
`invalidate_catalog_tree()`. The former could end up adding catalogs and thus
calling `invalidate_catalog_tree()`, which would attempt to set a mutex that the
caller set already. This seems like a good use-case for `std::recursive_mutex`.
would make sure there's a catalog for each catalog path by calling
`create_missing_catalogs()`
The compositor crashes when the user goes into a muted group that has a
viewer node while the backdrop is enabled. The compositor should not
schedule viewer nodes inside muted contexts, so we need to add checks to
prevent this.
Pull Request: https://projects.blender.org/blender/blender/pulls/134093
When active node is clicked again, the image editor does not update and
keeps showing the old image. Always run `ED_space_image_sync`, when
clicked node is image texture node to resolve this issue.
Pull Request: https://projects.blender.org/blender/blender/pulls/133956
`compositor_is_in_use` sets `used_by_compositor` true when GPU device is
selected. This draws render pass warning even when viewport
compositor is disabled. Remove the condition to fix the unintentional
warning. Following function is just used in node drawing, seems safe to
remove then.
Pull Request: https://projects.blender.org/blender/blender/pulls/133753
What is (or isnt) supported here depends on object types (but we were
getting most of the options for all object types):
| **obtype** | **supports Armature modifier** | **supports vertex groups** | **supports envelopes** | **supports automatic weights** |
| -- | -- | -- | -- | -- |
| OB_MESH | yes | yes | yes | yes |
| OB_CURVES_LEGACY | yes | no | yes | no |
| OB_CURVES | no | no | no | no |
| OB_SURF | yes | no | yes | no |
| OB_MBALL | no | no | no | no |
| OB_FONT | yes | no | yes | no |
| OB_VOLUME | no | no | no | no |
| OB_GREASE_PENCIL | yes | yes | yes | yes |
| OB_LATTICE | yes | yes (broken though) | yes | no |
| OB_EMPTY | no | no | no | no |
| OB_SPEAKER | no | no | no | no |
| OB_LIGHTPROBE | no | no | no | no |
| OB_LAMP | no | no | no | no |
| OB_ARMATURE | no | no | no | no |
| OB_POINTCLOUD | no | no | no | no |
This PR does two things:
- tidy up the popup menu we get for parenting (removing non-funtional
options)
- enable "With Empty Groups" for lattices (no reason why this should not
work)
What this PR does not touch:
- the poll function for parenting (since this acts on selected objects,
checking all of them can be a costly operation which should not be part
of a poll function)
Pull Request: https://projects.blender.org/blender/blender/pulls/134037
Replace ED_view3d_calc_zfac with a matrix multiply because the "zfac"
is never negative and near zero values are set to 1.0.
This makes sense for tools & viewport logic that use the value for
division and don't handle negative values but not for depth comparison.