Add performance test for subdividing a multiresolution mesh from level
2 to 3. This test ends with a total fine vertex count of approximately
10m, similar to the stroke and BVH tests for multires.
Pull Request: https://projects.blender.org/blender/blender/pulls/141168
This adds to the fix done with #110059.
With the changes of this patch, the smoothing still happens ONLY on full frames.
Any subframe data is linearly interpolated to reduce the stepping seen before this PR.
As a side effect, the operator now has to store the original y values of the keys in question.
This is needed for correct blending, whereas before it was assumed that the samples
contain the original y values.
No changes to the butterworth filter, because that already has a property to increase the
sample rate for sub-frame data.
Pull Request: https://projects.blender.org/blender/blender/pulls/140928
The crash seems to come from libepoxy GL functions pointing to null.
It seems that libepoxy "Automatically initializes as new GL functions are used."
and that to call a function without a GL context bound, the function
must have been called before with a bound context.
This just modifies the scope of the context binding from
DRW_module_exit to RE_engines_exit, which seems the safest solution
for 4.5.
Pull Request: https://projects.blender.org/blender/blender/pulls/141233
The issue was that the depsgraph was not rebuilt, thus
the driver node still stuck around. This then crashed when the
depsgraph evaluated.
The reason why this wasn't caught in the unit tests, was because the
depsgraph was not updated between creating and removing the data.
Pull Request: https://projects.blender.org/blender/blender/pulls/141272
TLAS wasn't being refreshed when empty.
This PR removes a spurious early-exit during BVH build that was preventing
the TLAS from being recreated when it was empty.
Pull Request: https://projects.blender.org/blender/blender/pulls/141215
It seemed "stuck" if the initial voxel size value under the remesh tab
was larger than or equal to the longer side of the bounding plane. It
actually was not stuck, but needed long mouse travels to get into the
range that we were clamping to (behavior from 4221f827cf clamps to
"sane" values on modal that make sense for differently sized meshes).
The "sane" sizes are kept, but this PR makes sure we actually start off
with an `init_voxel_size` that is already based on the clamped minimum/
maximum (so we dont have to mousetravel that far)
Pull Request: https://projects.blender.org/blender/blender/pulls/141208
GPU devices can only be selected in the user preferences if a suitable
device is available. This uses a dynamic enum and the items are not
always defined in RNA, so they need to be extracted manually using
`n_()`.
Also rephrase one message slightly to respect the style guide
("Don't" -> "Do not").
In addition, fix my mistake where an import was mixed up
(`pgettext_tip` was imported as `n_`).
Pull Request: https://projects.blender.org/blender/blender/pulls/141244
This call to `BKE_reportf()` uses a tertiary operator to select a
message using singular or plural, which cannot be translated
automatically. This commit adds `RPT_()` translation for both
variants.
Reported by Ye Gui in #43295.
Geometry Nodes' Add > Input > Import menu includes file format items
such as "Standford PLY (.ply)", "STL (.stl)", "Text (.txt)". The
latter needs to be translated because "Text" is a generic format.
These items are declared using a custom function
`node_add_menu.add_node_type`, with a `label` argument. This commit
adds the `label` argument to the function arguments that can be
extracted from specific node declaration functions, and specifies the
argument position for each:
"add_node_type", "add_node_type_with_outputs", "add_simulation_zone",
"add_repeat_zone", "add_foreach_geometry_element_zone",
"add_closure_zone".
There is currently no facility to specify a translation context but it
could be easily added if the need arises.
Most of these functions do not actually declare new, unique messages,
but it could happen in the future. In addition, two messages were
extracted using manual `iface_()` calls, which are no longer needed
after this change.
Reported by Ye Gui in #43295.
Toggle support for brushes was added back in 4.5 with
9e1e9b0859. The intent of this feature is
to allow for easy switching between a specified brush upon using a
hotkey.
Whils this behavior works well in the case of switching between brushes,
the initial implementation didn't account for using other non-brush
tools.
To fix this issue, when activating a tool, if it doesn't handle brushes,
clear the last active brush.
Pull Request: https://projects.blender.org/blender/blender/pulls/141161
In a fix to manifold boolean, commit a20f367379, the code
sometimes dissolved vertices in triangles and then didn't remap
those vertices. This prevents the dissolve in the first place.
The boolean modifier Exact solver has a solver option "Materials"
with choices "Index Based" and "Transfer". The former uses
only materials that were in the first operand object/mesh.
The Transfer option copies new materials as needed from other
object/mesh operands and uses those on the pieces of faces from
those operands that survive into the output.
Users very often use boolean to cut away from a main mesh, and
in such cases usually don't care about the materials on the cutter
operand, and don't want materials from them transferred, so the
"Index Based" choice is the default in the modifier.
It was regarded as in important bug/lack that the new Manifold
solver did not have such an option, so this commit adds one.
The Boolean Geometry Node at the moment does not have an option
and always uses the "Transfer" method, for all three solvers.
It is a matter of discussion whether such an option should be added
in the node also, so this commit does not include such a change.
The Manifold solver, up to this point, ignored the material_remaps
argument and relied on the realize_instance code to remap the
materials (it uses the Transfer strategy).
This change overrides that remapping with the explicit mapping
handed in through the API, if the mapping has non-zero size.
Since the old way (ignoring the mapping argument) worked fine for
the Boolean Geometry Node, I changed that code to make the map
have size zero in the node, in the case that the solver is Manifold.
This is a little hacky but I couldn't think of anything much better.
Long term it might be nice to have the internal boolean API not take
in remaps at all, but rather a remapping strategy choice. One thing
that makes that difficult right now is that the modifier can get
materials from either the object or the mesh (at least that used
to be true) and the internal boolean api only knows about meshes.
Another thing that would have made this task easier (for me) would
be to have realize_instances take in a material mapping strategy
as a parameter.
The Dilate node clamps negative values on GPU but works fine on CPU.
This is because the minimum value was used as FLT_MIN, but it should
actually be -FLT_MAX.
Pull Request: https://projects.blender.org/blender/blender/pulls/141144
At the moment there are two main usability issues that make it hard to
recommend to enable HIP RT by default:
- Dramatically increased memory usage during BVH construction on
high poly meshes compared to BVH2 (#136174)
- This issue can be fixed by using the "balanced" HIP RT BVH, but
it requires a HIP RT update that won't make it into 4.5 (!136622)
- Many Blender and GPU driver crashes when modifying objects in the
viewport. #140763, #140738, #139013, #138043
Pull Request: https://projects.blender.org/blender/blender/pulls/140794
#138435 was an attempt to fix the issue in #138168 where the Smooth
Operator modifies locked vertex groups. Unfortunately, the fix actually
changed some already-correct code to be incorrect to compensate for the
buggy code in the Smooth Operator.
This reverts that fix and applies a correct fix, which is to exclude
locked vertex groups in the Smooth Operator's code itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/141093
I18n: Translate a few messages
- Translate add-on types in the user preferences.
- Translate a report which uses formatting.
- Do not translate scene names in `sequencer.scene_strip_add` operator
UI.
- Do translate the type of new scene in
`sequencer.scene_strip_add_new` operator.
- Translate Half and Float image format color depth enum items.
- Translate Mix node header with non-color data types.
- Translate sequencer modifiers' names if data translation is enabled.
Most issues reported by Ye Gui in #43295.
Pull Request: https://projects.blender.org/blender/blender/pulls/141145
"Volume Min" can mean:
- The volume of a bone when modified by a constraint.
- The audio volume of a speaker object.
Reported by Alexandr Fatih in #43295.
"Mirror" can mean:
- To symmetrize something (i.e. generate a new mirrored copy of it or
edit it in a symmetric fashion).
- To flip something (i.e. invert its values along X, Y or Z axes).
- To repeat a texture in a mirrored fashion outside its bounds.
Reported by Gabriel Gazzán in #43295.
The `StringRef` in `MemoryBlobReader` was referencing data
that was freed under some circumstances. While the actual packed
data is shared between the original object and copy-on-eval object,
the name of the blobs are not.
The default nodes were still present in the node tree when Setup
Tracking Scene operator was called.
The issue was that the operator assumed the default tree always has the
same number and types of nodes, which wasn't true anymore after the
default node tree was changed in df6e65dd93
This PR keeps the changes to a minimum by updating the assumption
about the default node tree.
Pull Request: https://projects.blender.org/blender/blender/pulls/141141
Use a separate index for indexing into `Array<TransDataVertSlideVert>
r_sv`, as that only contains the selected items (and not all items
considered for proportional editing).
Since the introduction of the sorted index map (df6d345bb4) the
selected "transform items" are simply visited first, but not sorted to
the front of the array. This means that these array indices cannot be
used to index into other arrays that only contain sorted data, because
they will overflow.
Ref !140976
Introduced with 96e549c092
While the above commit applied versionings to the related flags, it did
not convert either the UI elements or the underlying grease pencil code
to use the now generic `Brush` properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/141001
This check was meant to catch unknown failure cases but instead it
meant any attribute with an empty array (e.g. from a mesh with no
faces) would not be loaded. Instead the failure case should only be
when there is no data when the array is not meant to be empty.
Pull Request: https://projects.blender.org/blender/blender/pulls/141096