Commit Graph

118684 Commits

Author SHA1 Message Date
Aaron Carlisle
9cd99684b0 Py Docs: Update to sphinx 5.2.3
Notable change is the improvements made to search.
2022-10-10 23:17:23 -04:00
Campbell Barton
b51d337adc GHOST/Wayland: print all dynamic loading failure when using Wayland
Previously only failure to dynamically load libdecor would report a
warning. Now report failure to load all Wayland libraries.

This was done because Wayland libraries (besides libdecor) are likely to
be installed on systems running Wayland. However it makes it difficult
to troubleshoot failure to load Wayland on systems with libdecor.

Only silence Wayland dynamic loading warnings when Wayland isn't running.
2022-10-11 11:14:40 +11:00
Campbell Barton
f495939e6e Correct argument type for BKE_pbvh_node_get_bm_orco_data, format 2022-10-11 11:06:32 +11:00
Joseph Eagar
7f133b7a38 Sculpt: Clean up Dyntopo's original triangle api
Cleaned up Dyntopo original triangle API (which is deprecated):

* BMVerts for original triangles are now stored.
* BKE_pbvh_bmesh_update_topology now handles original triangle
* data properly.
* BKE_pbvh_bmesh_node_save_orig can now initialize the original
  coordinates from the current BMLogEntry.
* Ray casting of original data now returns active vertex.
  Should fix various random crashes.

Hopefully this will fix a number of bugs.
2022-10-10 14:45:48 -07:00
Joseph Eagar
dc1418e5d9 Sculpt: Fix T101674: Passing null to GPU_batch_elembuf_set 2022-10-10 14:08:02 -07:00
Joseph Eagar
da25006bc4 Sculpt: T101699: Face set change visibility crashes on no face sets
Cleaned up sculpt_face_sets_change_visibility_exec some more:

* SCULPT_UNDO_HIDDEN is now pushed instead of SCULPT_UNDO_FACE_SETS
  (since face sets no longer encode visibility).
* Added branches for if face sets do not exist.
* Cleaned up independent if statements into a switch.
2022-10-10 13:34:37 -07:00
Joseph Eagar
473df37134 Sculpt: Fix T101729: Automasking crash in elastic deform brush
Was missing a call to SCULPT_automasking_node_update.
2022-10-10 13:05:43 -07:00
Ray Molenkamp
9b8be81eef deps_builder: Add support for cve-bin-tool
This change adds support for intels cve-bin-tool [1]
in the deps builder. This adds 2 new targets to the
builder that do not build automatically but can be
build on demand when required.

`make cve_check` will output to the console.
`make cve_check_html` will output a html file that
can be shared with other people.

Requirements:

- A working installation of cve-bin-tool on the system

Not required but higly recommended:

- Obtaining a key from the nvd [2] to speed up the
  database download. you can pass the key to cmake
  using `-DCVE_CHECK_NVD_KEY=your_api_key`

[1] https://github.com/intel/cve-bin-tool
[2] https://nvd.nist.gov/developers/request-an-api-key

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D16160
2022-10-10 11:48:05 -06:00
Sebastian Parborg
03fd2f7a5a Fix building WITH_HEADLESS
An earlier commit removed the '#ifdef' check for the function call but not for
the function declaration.
2022-10-10 18:16:29 +02:00
Lukas Stockner
9a8746dff1 Cleanup: clang-format 2022-10-10 17:57:25 +02:00
Lukas Stockner
95aac5df73 Fix T101651: Cycles crashes when failing to initialize render device
The issue here was that PathTraceWork was set up before checking if
any error occurred, and it didn't account for the dummy device so
it called a non-implemented function.

This fix therefore avoids creating PathTraceWork for dummy devices
and checks for device creation errors earlier in the process.
2022-10-10 17:55:08 +02:00
Damien Picard
7d7318f6c5 I18n: disambiguate message "World"
The confusion is about World as an ID type, and the World coordinates.

Use no context for the latter, and either `BLT_I18NCONTEXT_ID_WORLD`,
or other more fine-grained contexts when needed as part of enums for the
former.

The message from the custom HDRI installation operator cannot be
disambiguated right now, because Python enums don't support contexts.

Ref T43295

Reviewed By: mont29

Maniphest Tasks: T43295

Differential Revision: https://developer.blender.org/D16194
2022-10-10 17:37:32 +02:00
Thibault de Villèle
962b647690 Cleanup: NLA transforms, simplify recalcData_nla()
Refactor the `recalcData_nla()` function, which takes data from the
transform system and updates NLA strips, such that the actual logic to
change the strip is moved into its own function.

This also moves some generic code (find prev/next strip) from that
function to BKE.

This is to make the code easier to adjust when different transform
operations need to perform different modifications of the strip (i.e. to
fix T101130).

Manifest Task: T101130

Reviewed By: sybren

Differential Revision: https://developer.blender.org/D16181
2022-10-10 17:28:35 +02:00
Nikita Sirgienko
82a5790d2a Cycles: oneAPI: Trigger compilation of used kernels only
JIT compilation of oneAPI kernels now happens during load stage
and proper message gets shown in the GUI during compilation.
Also, this implementation skips kernels that aren't needed for
the used scene, reducing overall (re)compilation time.
2022-10-10 16:38:11 +02:00
Alexander Gavrilov
bb8dba8609 Fix missing view layer update when iterating a collection from Python.
The previous fix ignored the most fundamental access operation.

Follow up to 4a60c4746ddf fixing 68589a31ebfb.
2022-10-10 17:13:06 +03:00
Charlie Jolly
f5e1a2119d Node: Add blend modes to Mix node link drag search
Allows searching for Mix blend modes
e.g. Overlay when using link drag search

Requested by @simonthommes in GN chat

Reviewed By: HooglyBoogly

Differential Revision: https://developer.blender.org/D16209
2022-10-10 14:36:44 +01:00
Aras Pranckevicius
25b745ae85 IO: support Presets in Alembic, Collada, OBJ, STL, USD importers
The exporters already had Preset functionality, but the importers
did not.
2022-10-10 16:01:18 +03:00
Aras Pranckevicius
499af28a35 IO: remove BKE_layer_collection_resync_forbid & allow
Part of T101073: after the view layer sync was made lazy (D15885), the
BKE_layer_collection_resync_forbid and BKE_layer_collection_resync_allow
in Alembic/USD/OBJ importers is no longer needed, as long as they do
view layer dependent operations (selecting new objects) in a separate
loop after creating all the objects.

Verified that this does not regress import times for 26k objects OBJ
scene (Blender 3.0 splash) and 250k objects USD scene (Moana).
2022-10-10 14:06:54 +03:00
Damien Picard
b099cf73ae I18n: disambiguate or extract a few messages
Disambiguate:
- "Active Only" (GPencil copy material and layer, add NLA modifier)
- "Clip" (movie clip, image extension mode)
- "Emission" (particles)
- "New" (scene)
- "Tracking" (movie clip)

Extract:
- "ViewLayer", the default view layer name when creating new scene

Ref T43295

Reviewed By: mont29

Maniphest Tasks: T43295

Differential Revision: https://developer.blender.org/D16196
2022-10-10 13:03:26 +02:00
Damien Picard
9b2d682394 I18n: fix popup menus context
When calling `wm.call_menu_pie` and `wm.call_menu`, the menu context
was ignored when showing its name in the header or pie menu center.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D16195
2022-10-10 13:01:18 +02:00
Clément Foucault
9df9397ae8 EEVEE-Next: Fix surface deferred shader compilation in debug mode 2022-10-10 11:09:29 +02:00
Campbell Barton
f77eadc203 GHOST/Wayland: warn when falling back to X11 because of missing libdecor
X11 is used as a fallback when libdecor isn't found on the users system.

Now print a warning when Blender falls back to X11 and a missing
libdecor is the only reason wayland could not be used.

Only print this warning when using Wayland so this warning doesn't show
on X11 systems which have Wayland libraries installed.

Addresses T101715.
2022-10-10 19:50:33 +11:00
Bastien Montagne
d855f5fdcd Fix typos & co in UI messages. 2022-10-10 10:36:15 +02:00
Aras Pranckevicius
42b1a7d4c6 OBJ: add global scale factor import setting
Requested in D16095 proposal - also USD & Alembic have import scale
option; OBJ has an export scale object but the import scale
was not there for some reason.
2022-10-10 10:10:46 +03:00
Campbell Barton
a24f11e0ec UI: show the windowing environment in the "About" splash
Show the windowing environment on non MS-Windows/Apple systems,
since X11/WAYLAND are selected startup there was no convenient way
for users to know which back-end was being used.

Include the windowing environment in the About splash & system-info.txt
since it will be useful for handling bug reports.

This commit adds a private API call not intended for general use
as I would like to be able to remove this later and it's only needed
in the specific case of testing if Blender is using WAYLAND or X11
(which maybe be used via XWayland).

Python scripts can already inspect the system to check which windowing
environment used, the API call is mainly useful for troubleshooting.
2022-10-10 11:22:41 +11:00
Campbell Barton
210f4db81c Cleanup: spelling in comments 2022-10-10 11:22:41 +11:00
Campbell Barton
e0ad4712f6 Cleanup: quiet warnings, format 2022-10-10 11:22:41 +11:00
Lukas Stockner
aaa731a782 Partially fix T101702: OSL Shaders with boolean inputs crash
OSL (like Cycles) has no internal boolean type, instead an integer
input can be flagged to be shown as a boolean in the UI.
Cycles reacts to this by creating a boolean socket on the Blender
side, but as a result incorrectly called the boolean overload of the
set function even though the internal type is an integer.

There's another unrelated crash in the GPU viewport shader code that
appears to apply to every OSL node that outputs a shader, and the file
in T101702 triggers both, so this is only a partial fix for the report.
2022-10-10 01:03:12 +02:00
Aras Pranckevicius
bd2f002e71 Fix T101685: OBJ importer does not assign proper material if "usemtl" is before "o"
The importer logic was wrongly resetting "current material name"
upon encountering a new object ("o" command). However as per OBJ
specification, this is incorrect:

> Specifies the material name for the element following it. Once a
> material is assigned, it cannot be turned off; it can only be
> changed.

Fixes T101685. Test coverage for this was added in svn tests repo.
2022-10-09 21:21:31 +03:00
Aras Pranckevicius
c2fb85282d OBJ: extend importer tests to test imported material expectations
Previously "which material got assigned to an object in the end"
was not covered by tests. This is preparation for fixing T101685.
2022-10-09 20:52:23 +03:00
Jesse Yurkovich
af34c13da4 Cleanup: Remove data duplication from large array in eevee_camera.hh
Use `inline constexpr` instead of `static const` to prevent these
variables from being duplicated in each translation unit that includes
the eevee_camera.hh header (was included into 17 different object files
with MSVC).

Differential Revision: https://developer.blender.org/D16200
2022-10-09 00:34:59 -07:00
Colin Basnett
cee6c07f9e Set operator poll message when vertex group is locked
Differential Revision: https://developer.blender.org/D16190
2022-10-08 11:43:38 -07:00
Alexander Gavrilov
f61ff22967 Attribute Node: support accessing attributes of View Layer and Scene.
The attribute node already allows accessing attributes associated
with objects and meshes, which allows changing the behavior of the
same material between different objects or instances. The same idea
can be extended to an even more global level of layers and scenes.

Currently view layers provide an option to replace all materials
with a different one. However, since the same material will be applied
to all objects in the layer, varying the behavior between layers while
preserving distinct materials requires duplicating objects.

Providing access to properties of layers and scenes via the attribute
node enables making materials with built-in switches or settings that
can be controlled globally at the view layer level. This is probably
most useful for complex NPR shading and compositing. Like with objects,
the node can also access built-in scene properties, like render resolution
or FOV of the active camera. Lookup is also attempted in World, similar
to how the Object mode checks the Mesh datablock.

In Cycles this mode is implemented by replacing the attribute node with
the attribute value during sync, allowing constant folding to take the
values into account. This means however that materials that use this
feature have to be re-synced upon any changes to scene, world or camera.

The Eevee version uses a new uniform buffer containing a sorted array
mapping name hashes to values, with binary search lookup. The array
is limited to 512 entries, which is effectively limitless even
considering it is shared by all materials in the scene; it is also
just 16KB of memory so no point trying to optimize further.
The buffer has to be rebuilt when new attributes are detected in a
material, so the draw engine keeps a table of recently seen attribute
names to minimize the chance of extra rebuilds mid-draw.

Differential Revision: https://developer.blender.org/D15941
2022-10-08 16:43:18 +03:00
Hans Goudey
a716e69658 Cleanup: Use helper function for previous mesh loop 2022-10-07 22:46:52 -05:00
Hans Goudey
577a79b485 Cleanup: Fix outdated mesh data comments 2022-10-07 22:46:52 -05:00
Campbell Barton
f9ab2214ae Linux: enable WAYLAND by default
Enable the following CMake options:

- WITH_GHOST_WAYLAND
  Enable Wayland which is now included as part the bundled dependencies.
  When the pre-compiled libraries aren't used, only X11 will be enabled.

- WITH_GHOST_WAYLAND_DYNLOAD
  So systems without libwayland can fall back to X11.

- WITH_GHOST_WAYLAND_LIBDECOR
  To draw window frames on WAYLAND compositors such as gnome-shell which
  expect client-side decorations (without this the Blender window is
  borderless).

  Unfortunately there doesn't seem to be a reliable way to know if the
  compositors handles server-side decorations, so libdecor is required
  for Wayland to be used even with KDE and tiling compositors where it's
  not needed. Although this is an area that could use some further
  investigation - possibly bundling libdecor or handling client-side
  decorations in Blender.

The final part of D16091.
2022-10-08 13:26:33 +11:00
Campbell Barton
18c045a35f Build: show X11 & Wayland options on first run 2022-10-08 13:16:11 +11:00
Iliya Katueshenock
3d209d1619 Mesh: Multithread some boolean domain interpolation logic
This can improve performance by 3-10x in some simple test cases,
when reading a boolean attribute on a different domain from the
one it's stored on.

Differential Revision: https://developer.blender.org/D16054
2022-10-07 17:54:24 -05:00
Joseph Eagar
af288a09a5 Viewport: Enable draw_debug.cc code when WITH_DRAW_DEBUG is on 2022-10-07 15:40:41 -07:00
Laurynas Duburas
f3f0ea8dc2 Curve: Retain active NURBS curve after point deletion
Before, the active spline index and the active point index were always
cleared. Now the active index is only cleared when the curve/surface is
deleted. This was accomplished by making the surface patch delete
function handle that correctly. The spline deletion already handled it.

This fixes only vertex deletion mode.
Fixes problem mentioned in T101160.

Differential Revision: https://developer.blender.org/D16133
2022-10-07 16:33:50 -05:00
Campbell Barton
d779792977 Build: reference bundled wayland and libdecor headers
When using pre-compiled libs, reference the bundled wayland headers,
needed so the headers from the bundled wayland-scanner are compatible.

Part of D16091.
2022-10-08 08:00:17 +11:00
Campbell Barton
66f184d981 Deps: add libdecor for Wayland window frames
Include libdecor, note that this only bundles a header file
as Blender dynamically loads on the system at run-time.

Part of D16091.
2022-10-08 08:00:08 +11:00
Campbell Barton
b083755c20 Deps: harvest Wayland headers, build Wayland libraries
The headers on centOS7 (Wayland 1.15) aren't compatible with the headers
generated by wayland-scanner 1.20.

Include the headers to support building Wayland on systems with
older Wayland installed.

Using these headers will be part of a separate commit.

Part of D16091.
2022-10-08 08:00:04 +11:00
Hans Goudey
f63179cc9f Fix T101424: Empty group node added to node add search
The group node type polls true, but adding an empty group node isn't
useful, so just skip it.
2022-10-07 12:32:23 -05:00
Nate Rupsis
f96b729d7b FIX T101275: Regression in NLA causes Actions to be ignored by Context menu (I.e influence, etc)
Reviewed By: sybren

Differential Revision: http://developer.blender.org/D16154
2022-10-07 11:03:24 -05:00
Brecht Van Lommel
9cf2b413c2 Fix small errors in tool tips for path guiding
Contributed by Alaska.

Differential Revision: https://developer.blender.org/D16166
2022-10-07 17:59:22 +02:00
Hans Goudey
349091ce00 Cleanup: Move editmesh_undo.c to C++
To allow moving mesh runtime data to C++ (D16180).
2022-10-07 10:41:19 -05:00
Ray Molenkamp
1a5c57cdec Fix: One-API build issue on windows.
Flags were not properly passed to the
compiler.
2022-10-07 09:16:29 -06:00
Antonio Vazquez
bf85074148 GPencil: New Fill Extend lines adjust with MMB
The actual length of extension lines can be adjusted using wheel mouse 
but this is very inconvenient for tablet users.

Now, the extension can be adjusted using MMB of the pen.

There was a similar request in Right-Click Select

Reviewed By: Matias Mendiola, Daniel Martinez Lara

Differential Revision: https://developer.blender.org/D16128
2022-10-07 16:18:56 +02:00
Xavier Hallade
3714d3c3ce Cycles: link oneAPI backend with debug version of sycl when in Debug
It fixes SYCL runtime issues in Debug builds that were due to mixing
Release and Debug MSVC runtimes.
This commit also removes specific handling of dpcpp compiler executable
to simplify the CMake implementation. Using it like clang++ works and
clang++ executable is also available from Intel oneAPI DPC++ compiler in
case it doesn't.
2022-10-07 16:14:50 +02:00