1
1
Commit Graph

119711 Commits

Author SHA1 Message Date
9c4381216f Merge branch 'master' into temp-ghost-vulkan 2022-11-22 11:25:29 +01:00
efa87ad5eb Merge branch 'blender-v3.4-release' 2022-11-22 10:48:55 +01:00
8c82d4cbf6 Fix T102684: GPencil Crash when trying to sculpt with Dot Dash
The problem was the original pointer was not set.

There is a technical limitation with dots of 1 point
because it cannot assign orig pointer.
2022-11-22 10:47:58 +01:00
89349067b6 Merge branch 'blender-v3.4-release' 2022-11-21 18:01:29 -06:00
b53c4fa8da Fix T102522: Geometry nodes boolean doesent respect material index
The refactor in f1c0249f34 incorrectly placed the material index
remapping before the transfer of generic attributes. Now that the
material index is a generic attribute, it was overwritten.
2022-11-21 15:49:18 -06:00
25ddb576ff Cleanup: add ATTR_FALLTHROGUH 2022-11-21 10:43:12 -08:00
02e045ffbe Merge branch 'blender-v3.4-release' 2022-11-21 19:19:58 +01:00
Nathan Vegdahl
03b5be4e3c Cycles: use more PMJ patterns and make their size adaptive.
This resolves some issues with correlation artifacts at higher sample counts.

Fix T101356, correlation issues in new PMJ pattern.

Differential Revision: https://developer.blender.org/D16561
2022-11-21 18:49:13 +01:00
be1745425c Nodes: Remove "level" building pass on update
The node level was an indication of how deep the node was in the tree.
It was only used for detecting link cycles. Now that the node topology
cache from 25e307d725 exists, this calculation can be removed
completely.

The level calculation was quadratic and very slow on larger node trees.
In the mouse house file with a few thousand nodes, it took 23ms on
every single update. Another benefit is storing slightly less runtime
data, though this was only 2 bytes per node.

Differential Revision: https://developer.blender.org/D16566
2022-11-21 11:34:22 -06:00
b391037424 Nodes: Use topology cache for node exec node list
Instead of generating a dependency sorted node list whenever evaluating
texture or EEVEE/viewport shader nodes, use the existing sorted array
from the topology cache. This may be more efficient because the
algorithm isn't quadratic. It's also the second-to-last place to
use `node.runtime->level`, which can be removed soon.

Differential Revision: https://developer.blender.org/D16565
2022-11-21 11:30:49 -06:00
41a3de878f Fix part of T102450: Cycles OSL render issues for with normals in shader nodes
Commit c8dd33f5a37b6a6db0b6950d24f9a7cff5ceb799 in OSL changed behavior of
parameters that reference each other and are also overwritten with an
instance value. This is causing the "NormalIn" parameter of a few OSL nodes
in Cycles to be set to zero somehow, which should instead have received the
value from a "node_geometry" node Cycles generates and connects automatically.

I am not entirely sure why that is happening, but these parameters are
superfluous anyway, since OSL already provides the necessary data in the
global variable "N". So this patch simply removes those parameters (which
mimics SVM, where these parameters do not exist either), which also fixes
the rendering artifacts that occured with recent OSL.

While this fixes built-in shader nodes, custom OSL scripts can still have
this problem.

Ref T101222

Differential Revision: https://developer.blender.org/D16470
2022-11-21 18:15:35 +01:00
b0e38f4d04 Cleanup: Strict compiler warnings
Remove `private:` from the PBVHFaceIter. This is not really a C++
class, and the C++ code generates a lot of warnings about unused
fields.

Also mark function static and run clang-format.
2022-11-21 16:57:46 +01:00
Iliya Katueshenock
2f69266c64 Cleanup: use topology cache for frame timings overlay
Differential Revision: https://developer.blender.org/D16571
2022-11-21 16:10:05 +01:00
5d08396970 Merge branch 'blender-v3.4-release' 2022-11-21 15:53:42 +01:00
Jarrett Johnson
8fe423a7a9 DRW: Fix pointcloud selection
Fixes point cloud selection by using new draw call.

Reviewed By: fclem

Maniphest Tasks: T102659

Differential Revision: https://developer.blender.org/D16501
2022-11-21 15:51:29 +01:00
Jarrett Johnson
1c0f5e79fa DRW: Fix pointcloud selection
Fixes point cloud selection by using new draw call.

Reviewed By: fclem

Maniphest Tasks: T102659

Differential Revision: https://developer.blender.org/D16501
2022-11-21 15:50:32 +01:00
2910be8f19 Cleanup: Correct semantics for .blend listing in file/asset browser
When attempting to load contents of a .blend, the code would just assume
if the number of added items is 0, that means it's not a .blend (but a
directory, although the previous commit fixed that part already).
However there may be situations where a .blend file simply doesn't
contain anything of interest to be added (e.g. when listing assets
only), so have a proper "none" value for this.
2022-11-21 12:29:18 +01:00
c58e7da43e Asset Browser: Avoid non-existent directory prints
When loading asset libraries, there would be a bunch of "non-existent
directory" prints because we were calling a function to list directory
contents on .blend file paths. Make sure the path actually points to a
directory.
2022-11-21 12:29:18 +01:00
9f83ef2149 BLI: make different pointer types compatible in hash tables
For example, this allows doing a lookup using a raw pointer in a
hash table that uses `std::unique_ptr` as key.
2022-11-21 12:02:10 +01:00
85990c877c Merge branch 'blender-v3.4-release' 2022-11-21 11:45:12 +01:00
b75946bcb6 Fix T102620: Display dynamic socket label in uiTemplateNodeView
Some nodes, like Combine Color or the math nodes, label sockets
differently depending on the mode to be more descriptive.
`uiTemplateNodeView` now also uses this dynamic label rather than the
socket's name for labeling in the UI so the shown labels always match
the ones on the node itself.

Reviewed By: Hans Goudey

Differential Revision: http://developer.blender.org/D16563
2022-11-21 11:43:30 +01:00
71efb7805b Merge branch 'blender-v3.4-release' 2022-11-21 11:23:18 +01:00
3648fd9917 Fix: node frame boundaries incorrect when opening files
Make sure that frame dimensions are updated in the correct order.
2022-11-21 11:22:44 +01:00
7a6cdeb242 Merge remote-tracking branch 'origin/blender-v3.4-release' 2022-11-20 18:31:53 -07:00
24bd2d0bea Fix T98726: Include blender version number in windows shortcuts
You can install several versions of blender side by side and all
of them will try to create a "Blender" shortcut, which if already
exists the msi installer throws a warning about.

This change adds the blender version number to the desktop and start
menu shortcuts, side steps the problem and it's easier to tell the
various blender versions apart.
2022-11-20 18:31:00 -07:00
Wannes Malfait
e83f46ea76 Geometry Nodes: Use Mesh instead of BMesh in split edges node
Rewrite the edge split code to operate directly on Mesh instead
of BMesh. This allows for the use of multi-threading and makes
the node around 2 times faster. Around 15% of the time is spent
just on the creation of the topology maps, so these being cached
on the mesh could cause an even greater speedup. The new node
gave identical results compared to the BMesh version on all the
meshes I tested it on (up to permutation of the indices).

Here are some of the results on a few simple test cases:
(Intel i7-7700HQ (8 cores) @ 2.800GHz , with 50% of edges selected)
|       | 370x370 UV Sphere | 400x400 Grid | Suzanne 4 subdiv levels |
| ----- | ----------------- | -------------- | --------------------- |
| Mesh  | 89ms              | 111ms          | 76ms                  |
| BMesh | 200ms             | 276ms          | 208ms                 |

Differential Revision: https://developer.blender.org/D16399
2022-11-20 15:42:10 -06:00
97e0cc41ca Nodes: Simplify view panning when selecting node
The "Activate Same Type Next/Prev" and "Find Node" operators pan
the view to the newly selected node if it's outside of the view. This
simplifies that check and improves it in the case where the node
is only partially visible-- now it pans in while it didn't before.
2022-11-20 14:45:58 -06:00
984edb2c4e Nodes: Replace implementation of select next/prev type operator
The previous code was quadratic; it looped over every link for every
node. For one large node tree I tested the operator took 20ms. On the
same node tree it now takes less than 1ms.

The change replaces the current building of the "dependency list"
on every call with a use of the topology cache from 25e307d725.
2022-11-20 14:45:58 -06:00
012895e8a1 Cleanup: Remove unused node operator property 2022-11-20 14:45:58 -06:00
47c92bf8de Cleanup: Remove unused boolean in node select function 2022-11-20 14:45:58 -06:00
afb7da5538 Sculpt: Add comment explaining PaintMaskFloodMode 2022-11-20 09:53:29 -08:00
b041678028 Merge branch 'blender-v3.4-release' 2022-11-20 09:44:53 -08:00
03b7982301 Sculpt: Fix T102349: improperly aliased enum
PaintMaskFloodMode is supposed to be an alias
of eSelectOp.  paint_intern.h now includes
ED_select_utils.h and simply assigns the
relevent members of eSelectOp to PaintMaskFloodMode's
members.
2022-11-20 09:41:53 -08:00
42c30f3b9c Sculpt: Fix missing const in recent commit 2022-11-20 08:17:02 -08:00
6b3cee2538 Sculpt: Face iterator API
This patch adds basic face iterators to the sculpt API.  The interface is similar to the existing vertex iterators.  It's not C++ (though it does mark private fields in PBVHFaceIter as private if compiling under C++).

Example:

```
PBVHFaceIter fd;

BKE_pbvh_face_iter_begin(pbvh, node, fd) {

  /* Face reference and face index */
  PBVHFaceRef face = fd->face;
  int face_index = fd->index;

  /* Can read and modify hide flag if it exist (it may not) */
  if (fd->hide) {
    *fd->hide ^= true; /* toggle hide */
  }

  /* Can read and modify face set if it exists */
  if (fd->face_set) {
    *fd->face_set = something;
  }

  /*Can read vertices*/
  for (int i=0; i<fd.verts_num; i++) {
    float *co = SCULPT_vertex_co_get(ss, fd.verts[i]);
  }
}
BKE_pbvh_face_iter_end(fd);
```

Reviewed By: Brecht Von Lommen and Hans Goudey
Differential Revision: https://developer.blender.org/D16225
Ref D16225
2022-11-20 08:08:26 -08:00
5097105b3c Sculpt: Fix T102567: multires crash with high subdivision levels
Previous fix did not work for ngons.
The pbvh leaf limit minimum is now set
to the maximum ngon's vertex count.
2022-11-20 07:32:21 -08:00
7193e5aa10 Sculpt: Fix T102567: multires crash with high subdivision levels
Previous fix did not work for ngons.
The pbvh leaf limit minimum is now set
to the maximum ngon's vertex count.
2022-11-20 07:30:14 -08:00
41d29a1603 Merge branch 'blender-v3.4-release' 2022-11-20 07:18:45 -08:00
567ae90374 Sculpt: fix T102584: Boundary propegation for automasking not working 2022-11-20 07:18:04 -08:00
d24c0011cf GPencil: Make Ignore Transparent option more consistent
The code was doing the oposite of the UI option.

Related to T102625
2022-11-20 11:22:20 +01:00
0fd94a1f5e Tests: enable element-wise multiplication for mathutils API tests 2022-11-20 10:42:17 +11:00
9100cc0f39 Merge branch 'blender-v3.4-release' 2022-11-20 10:41:19 +11:00
4cac8025f0 Cleanup: use int32_t type, update comments
Reference WIP patches for warping on the spot, follow up to T102346.
2022-11-20 10:39:43 +11:00
4d17301ba4 Merge branch 'blender-v3.4-release' 2022-11-19 20:47:16 +01:00
63c4ec89e1 Fix T102514: wrong scene reported for missing compositing camera
If compositing uses renderlayers, and a camera was missing in the
associated scenes, the error message also referred to the scene the comp
tree was in (not the scene of the renderlayer -- which can potentionally
be different).

This was confusing and is now rectified.

Maniphest Tasks: T102514

Differential Revision: https://developer.blender.org/D16542
2022-11-19 20:43:52 +01:00
dfb157f9c4 Merge branch 'blender-v3.4-release' 2022-11-19 19:09:49 +01:00
331e8007ed Fix T102520: Positioning of nodes added via search
Always position the nodes added with the node search at the point where
the search operator was invoked by ensuring the operator context is the
main node editor region.

This was an unintended change of rBbdb57541475f, caused by the operator
now getting the cursor position in region space. So when the operator
was called from the menu, it would get the cursor position in the
region space of the menu, which lead to an offset when adding the node
since it expected the coordinates to be in the space of the node editor.

Setting the correct operator context also fixes inconsistent transform
sensitivity depending on zoom when adding nodes via the search in the
menu which has been an issue since as far back as Blender 2.79.

Also includes a small fix for the vertical offset of nodes added by the
search which varied depending on the UI scale. Same fix as in
rB998ffcbf096e.

Reviewed By: Hans Goudey

Differential Revision: http://developer.blender.org/D16555
2022-11-19 19:03:38 +01:00
2654c523c1 Cleanup: use nullptr in C++ 2022-11-19 11:51:42 +01:00
7ca9fb9865 Merge branch 'blender-v3.4-release' 2022-11-19 21:15:28 +11:00
9fd6dae793 Fix T102346: Mouse escapes window during walk navigation
Regression in [0] which exposed a problem with GHOST_kGrabHide on Win32
and to some extent X11.

Prior to [0], walk mode used it's own warping logic (hiding the cursor
& recording the motion between events). Using GHOST's grabbing makes
sense in this case as it's not very convenient for operators to
implement their own cursor warping, however doing so exposed a problem
where the mouse cursor could leave the window.
This would happen because the cursor needed to be within 2px of the
screen edge before warping.

Resolve by warping within a small region in the middle of the window.

Note that warping to the window center on each motion would be ideal
but is more involved as the logic for Win32 & X11 doesn't work properly
when every motion warps, so this needs further investigation to support.

This problem doesn't apply to GHOST/Cocoa which warps every motion event
on the spot and GHOST/Wayland doesn't set the mouse position at all to
implement this functionality.

[0]: 4c4e8cc926
2022-11-19 20:57:59 +11:00