The code already had a check for meshes with zero triangles, but it
didn't catch the case where all triangles are flagged as degenerate.
A simple way to reproduce this is to take a mesh and scale it to zero.
After checking the code, it turns out that in this case it's supposed
to just set all tangents to zero, so the fix simply is to detect this
case and skip the computation.
Add function `SEQ_time_content_end_frame_get` to get content end frame.
New function is shorthand for
`SEQ_time_start_frame_get() + SEQ_time_strip_length_get()`.
This versioning needs to be done after linking in order to affect
animation data which might not be loaded in the regular "do_versions"
loop. Animation data is removed in `nodeRemoveNode`.
Fixes T101439
To avoid issues with install_deps. If we more generally switch to using
CMake configs then perhaps this code can be deduplicated again or at
least simplified.
This change speeds up the compilation at the cost of higher memory usage.
CMake implementation checks the amount of available memory to spawn a
reasonable number of parallel compiler jobs.
On GCC, the loops created by `BLI_VEC_OP_IMPL` were not always
unrolled, leading to branching. For `attribute_math::mix4<float3>`,
this lead to a significant performance regression compared to its
older `interp_v3_v3v3v3v3` counterpart.
Instead of a using macros to create the for loops, use variadic
templates to manually unroll them. The compiler might do it anyway
(I didn't observe any effect on Clang in my tests), but there should
be no reason not to unroll these small loops, and making it explicit
and removing use of macros seems better.
On a Ryzen 3700x, this commits doubles the performance of Catmull
Rom curve position evaluation (from 18-19ms to around 9-10ms).
Differential Revision: https://developer.blender.org/D16136
After rB188f7585a183 deleting the object results in crash due
to null pointer access if collections are filtered out
Reviewed by: mont29
Differential Revision: https://developer.blender.org/D16031
Fix for T101438
Clamping the mip seems to always set it to 9.0.
I couldn't find an alternative way to avoid triggering the error (ie. min(mip, 9.0)).
In any case, the results with this patch applied look the same to the (correct) ones on AMD.
And, since clamping the max mip to a hardcoded value could result in resolution-depended behavior, I guess disabling the clamp should be ok anyway.
Reviewed By: fclem
Maniphest Tasks: T101438
Differential Revision: https://developer.blender.org/D16129
Change some wording of tooltips for readability, in animation-related
areas (drivers, keying sets, animation channel visibility).
Reviewed By: sybren
Differential Revision: https://developer.blender.org/D16131
Update to liboverride creation code to add support of keeping active
object forgot to consider case when there is no known/given view layer.
NOTE: due to differences in code, fix for 3.3 will be a bit different.
Similar to existing `BKE_main_collection_sync` and `BKE_scene_collection_sync`,
in some cases code does not have access to a specific view layer,
and/or does not know exactly which view layer needs to be in sync,
or just need the full data to be up to date.
Rename BKE_appdir_folder_id_version to
BKE_appdir_resource_path_id_with_version because BKE_appdir_folder_id
and BKE_appdir_folder_id_version didn't accept compatible arguments.
Also add notes to GHOST_getSystemDir & GHOST_getUserDir that
BKE_appdir_resource_path_id(..) should be used instead (in most cases).
Even though individual USER/SYSTEM paths could be set using environment variables,
it wasn't possible to override the USER or SYSTEM paths.
This meant the result of `bpy.utils.resource_path('USER')` &
`bpy.utils.resource_path('SYSTEM')` could still be used by scripts,
making the Blender session potentially the default USER directory
(even when `BLENDER_USER_CONFIG`, `BLENDER_USER_SCRIPTS` &
`BLENDER_USER_DATAFILES` all point elsewhere).
Resolve by adding environment variables:
- BLENDER_USER_RESOURCES
- BLENDER_SYSTEM_RESOURCES
These will be used for `bpy.utils.resource_path('USER')` &
`bpy.utils.resource_path('SYSTEM')`, as well as a basis for user &
system directories, unless those environment variables are
set (`BLENDER_USER_*` or `BLENDER_SYSTEM_*`).
Resolves issue raised by T101389.
Example usage & output:
{P3225}
Reviewed By: brecht
Ref D16111
* Unhide all is no longer part of face_set_change_visibility.
* Implemented a few visibility API methods for PBVH_BMESH
* Fixed bug with unhide all not freeing all multires grid_hidden
bitmaps.
This is the conventional way of dealing with unused arguments in C++,
since it works on all compilers.
Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
Blank brush strokes never have an oppurtunity to initialize
a sculpt undo step, which results in blank global undo steps.
These confuse DynTopo's internal BMLog undo stack.
Note: I tried having the stroke operator return OPERATOR_CANCELLED,
but this didn't prevent the undo push (which is done automatically
due to the presence of OPTYPE_UNDO in the operator flags).
I might investigate removing the flag, but that might cause other
problems.
Previously the edge index was always determined by the field context,
and the node didn't work when the context was in any other domain.
Adding an index input makes it work much more nicely with the other
topology nodes. It's now in the topology submenu too.
I also reimplemented the edge positions input to use the field at index
node internally. That will probably make it slower for now, but we need
to optimize that to do nothing in some special cases anyway.
Differential Revision: https://developer.blender.org/D16105
Rename the node to "Offset Point in Curve"
Since this was committed, more mesh and curve topology nodes have been
committed with a different naming scheme (482d431bb6735e82069). Change
the name of this node to match "Offset Corner in Face". Because the
node was only added recently, it's a full rename, including the ID,
so forward compatibility is broken.
This node allows for curves to have their evaluated normal mode changed
between MINIMUM_TWIST and Z_UP. A selection input allows for choosing
which spline in the curves object will be affected.
Differential Revision: D16118
Previously it would bake viewed from above the surface. The new option can be
useful when the baked result is meant to be viewed from a fixed viewpoint or
with limited camera motion.
Some effort is made to give a continuous reflection on parts of the surface
invisible to the camera, but this is necessarily only a rough approximation.
Differential Revision: https://developer.blender.org/D15921
This was not properly respected, and in general with multiple passes and layers
it's unclear what this should do exactly without breaking some render passes.
Better to keep this image format for raw unmodified render results.