Commit Graph

118684 Commits

Author SHA1 Message Date
Hans Goudey
fbbd7f0d5c Fix: Crash when reininitializing empty generic array
Noticed this while developing new code that used GArray.
2022-10-04 22:17:59 -05:00
Lukas Stockner
b804f925c7 Fix T101185: New Mikktspace crashes on meshes without valid triangles
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.
2022-10-05 02:42:43 +02:00
Hans Goudey
f9a10e7ed0 Geometry Nodes: Add soft min for points node radius input
Also remove an unnecessary cast.
2022-10-04 17:45:58 -05:00
Campbell Barton
41281cc0e7 Build: fix missing xml2 build time dependency for wayland
Also prepend the existing 'PKG_CONFIG_PATH' instead of overwriting it
as this prevents 'devtoolset-9' libraries being used in the release
environment.
2022-10-05 08:48:32 +11:00
Richard Antalik
82de17c801 Cleanup: VSE: Rename val to timeline_frame 2022-10-04 21:24:09 +02:00
Richard Antalik
6309f67718 Cleanup: Add docstrings to SEQ_time.h 2022-10-04 21:24:09 +02:00
Richard Antalik
76043bc3d6 Cleanup: VSE code readability
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()`.
2022-10-04 21:24:09 +02:00
Hans Goudey
d981418c8c Fix: Crash versioning transfer node with animation data
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
2022-10-04 13:27:24 -05:00
Brecht Van Lommel
ea95d04245 Build: integrate OpenPGL into platform files like other libraries
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.
2022-10-04 20:24:27 +02:00
Brecht Van Lommel
6167a065a5 Build: also list Cycles build options on first cmake config 2022-10-04 20:13:58 +02:00
Brecht Van Lommel
3353fc60c2 Cleanup: remove unused members from RenderResult 2022-10-04 20:13:54 +02:00
Hans Goudey
9f8b0b83a9 UI: Avoid unnecessary label in set curve normal node
"Mode" is obvious and isn't worth cutting off the text.
2022-10-04 12:36:06 -05:00
Hans Goudey
31e89ee5b9 Fix: Bump subversion after forward compatibility breakage
c3b6e372542f9fb0ff23 change node ID names. Bump the subversion and the
min file subversion so older versions get warnings opening newer files.
2022-10-04 12:33:09 -05:00
Hans Goudey
8102510482 Fix T101583: Issues applying modifier to mesh with shape keys
The wrong mesh was used to read the position attribute. Also, there was
always a warning about missing shape keys when that wasn't the case.
2022-10-04 12:10:10 -05:00
Hans Goudey
bc00666683 Fix: UI: Warning for description with period at end
The last period is added automatically, for better or worse.
2022-10-04 12:10:10 -05:00
Nikita Sirgienko
3e2d7403f9 Cycles: refine inlining thresholds for oneAPI backend
New thresholds give a few percent improvement in average.
2022-10-04 18:34:54 +02:00
Nikita Sirgienko
df29211eeb Cycles: Speed up oneAPI GPU binaries compilation by using parallel instances
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.
2022-10-04 18:19:37 +02:00
Hans Goudey
d2f0cb6745 BLI: Unroll vector loops for better performance on GCC
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
2022-10-04 11:16:25 -05:00
Bastien Montagne
4d9588ee45 Revert "install_deps: update OpenVDB for Blender 3.4."
This update has been moved back to Blender 3.5.

This reverts commit ded4604d7190adef56518dc0b65ddb452beefc16.
2022-10-04 17:35:21 +02:00
Bastien Montagne
25d162f864 Revert "install_deps: update OIIO/Boost/Python/NumPy versions."
These updates have been moved back to Blender 3.5.

This reverts commit 1e1e9014cfc9f47d8496dd283a1cccae0ce29552.
2022-10-04 17:35:21 +02:00
Pratik Borhade
4186b0ebe4 Fix T101233: Crash on deleting the object in outliner due to null pointer access
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
2022-10-04 20:49:34 +05:30
Miguel Pozo
dd4a40f42d Always initialize MaterialPass (Fixes a crash in mscv)
Differential Revision: https://developer.blender.org/D16134
2022-10-04 16:16:46 +02:00
Richard Antalik
957cb173f2 Fix T101447: Hold split not working correctly
Caused by incorrect conflict resolution in commit 302b04a5a3fc0e76.
2022-10-04 16:11:34 +02:00
Bastien Montagne
0458b24a23 Fix T101499: Do not allow unlinking objects from linked collections. 2022-10-04 14:59:06 +02:00
Jeroen Bakker
38170cd295 Cleanup: Remove commented out code in ssr_lib.glsl. 2022-10-04 13:33:41 +02:00
Miguel Pozo
6c2c3ed2c9 Fix T101438: Wrong LOD selection after clamping the mip value (Nvidia)
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
2022-10-04 13:32:15 +02:00
James
da6d6f99a8 Animation: Update tooltips to be more readable
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
2022-10-04 12:30:30 +02:00
Bastien Montagne
c3003b4346 Fix T101559: Rain Test Animation demo crashes Blender 3.3
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.
2022-10-04 10:56:49 +02:00
Bastien Montagne
501fff40e8 New viewlayer deferred resync code: add utils to ensure resync of whole Scene and Main.
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.
2022-10-04 10:53:05 +02:00
Campbell Barton
6b76381e0a Cleanup: rename BKE_appdir_folder_id_version, improve doc-strings
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).
2022-10-04 16:52:10 +11:00
Campbell Barton
bf4926b30c Support environment variables to override USER & SYSTEM resource paths
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
2022-10-04 13:54:09 +11:00
Campbell Barton
868ef9ec37 Cleanup: remove unnecessary includes from sculpt_paint 2022-10-04 13:54:04 +11:00
Campbell Barton
5c51bf2ffe Cleanup: format 2022-10-04 13:54:02 +11:00
Campbell Barton
a9918e9c0e Cleanup: undeclared function warning 2022-10-04 13:54:01 +11:00
Campbell Barton
1d629a4403 Cleanup: correct argument size for plane in planeProjection 2022-10-04 13:53:59 +11:00
Joseph Eagar
22c3db72ca Sculpt: Visibility bugfixes
* 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.
2022-10-03 17:19:50 -07:00
Joseph Eagar
2cf21604c9 Sculpt: implement Reveal All for PBVH_BMESH 2022-10-03 17:19:50 -07:00
Hans Goudey
d42f882343 Cleanup: Fix sign conversion warning in BMesh log 2022-10-03 17:43:21 -05:00
Hans Goudey
97746129d5 Cleanup: replace UNUSED macro with commented args in C++ code
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*/`
2022-10-03 17:38:16 -05:00
Joseph Eagar
ed7f5713f8 Sculpt: Fix T101430: Blank stroke undo steps corrupt dyntopo
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.
2022-10-03 15:37:23 -07:00
Joseph Eagar
416d1d0393 Sculpt: Add debug code to print sculpt undo stack. 2022-10-03 15:37:23 -07:00
Hans Goudey
4ddc5a936e Geometry Nodes: Add index input to Edge Vertices node
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
2022-10-03 16:54:23 -05:00
Hans Goudey
99cbaced3b Fix: Incorrect field status in offset point in curve node
The input supports fields, the outputs are fields only if either of the
inputs are fields. Also, .hide_value() is redundant for implicit fields.
2022-10-03 16:44:09 -05:00
Hans Goudey
c3b6e37254 Geometry Nodes: Rename Control Point Neighbors Node
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.
2022-10-03 16:41:58 -05:00
Hans Goudey
248def7e48 Geometry Nodes: Change order of outputs in topology nodes
It's a bit more natural if the "Total" output come second, and it's
also consistent with the Accumulate Field node.
2022-10-03 16:27:09 -05:00
Johnny Matthews
748fda32ed Geometry Nodes: Set Curve Normal
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
2022-10-03 15:50:21 -05:00
Phoenix Katsch
b475506cfb Cycles: add option to bake specular from active camera viewpoint
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
2022-10-03 21:59:31 +02:00
Brecht Van Lommel
af51e4b41c Cleanup: fix source comment/documentation typos
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D16071
2022-10-03 21:59:31 +02:00
Brecht Van Lommel
e2572bd89f Fix OpenEXR saving still outputting alpha when using RGB instead of RGBA mode
Contributed by linhsu0723.

Differential Revision: https://developer.blender.org/D15979
2022-10-03 21:59:31 +02:00
Brecht Van Lommel
42f40657f1 Images: remove option to choose between BW/RGB/RGBA for multilayer EXR save
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.
2022-10-03 21:59:20 +02:00