Commit Graph

120409 Commits

Author SHA1 Message Date
Germano Cavalcante
1a986f7eba Revert "Fix erratic mouse wrapping movement on Windows (2)"
This reverts commit a3a9459050a96e75138b3441c069898f211f179c.

And fixes T103337.

a3a9459050a9 has some flaws and it needs to go through review (See D16803).

Conflicts:
	intern/ghost/intern/GHOST_SystemWin32.cpp
2022-12-19 10:41:05 -03:00
Clément Foucault
4cb2204d3a Fix T103037: Regression: Grease Pencil Line Texture last point gets distorted
This was due to a missing endpoint case that wasn't handled in the port.

The last point still have to be discarded manually because of the
dot/stroke setting of the material.

The first test `ma1.x == -1` is not necessary anymore since the index
buffer do not contain this point (which was rendered using instance
rendering before.

Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D16812
2022-12-19 14:04:58 +01:00
Jacques Lucke
288d4c9545 Fix: asset handle in context is always none
The issue was introduced in rBf0ac5e8aec03f7d0ca07d3792e5.
2022-12-19 12:50:09 +01:00
Philipp Oeser
923f394485 Fix Outliner: Click next to View Layer name triggers object select
Unlike other (closed) hierarchies, view layers dont show their contents
next to their names.

Code would still find the item via outliner_find_item_at_x_in_row though,
this is now prevented (same as if the viewlayer was open [instead of
collapsed]).

Fixes T102357.

Maniphest Tasks: T102357

Differential Revision: https://developer.blender.org/D16662
2022-12-19 09:25:10 +01:00
Omar Emara
c3cc8d2f6a Realtime Compositor: Implement Streaks Glare node
This patch implements the Streaks Glare node. Which is an approximation
to the existing implementation in the CPU compositor. The difference due
to the approximation is bearily visible in artificial test cases, but is
less visible in actual use cases. Since the difference is rather similar
to that we discussed in the Simple Star mode, the decision to allow that
difference would probably hold here.

For the future, we can look into approximating this further using a
closed form IIR recursive filter with parallel interconnection and
block-based parallelism. That's because the streak filter is already
very similar to the causal pass of a fourth order recursive filter,
just with exponential steps.

Differential Revision: https://developer.blender.org/D16789

Reviewed By: Clement Foucault
2022-12-19 10:08:59 +02:00
Omar Emara
67318b1977 Realtime Compositor: Implement variable size blur
This patch implements the variable size mode of the blur node. This is
not identical to the CPU implementation, but is visually very close.

That's because of two things. First, the Extend Bounds option introduces
a 2px offset that doesn't make sense, which is likely a bug in the CPU
implementation. Second, the CPU implementation approximate the result
using three passes, the first two of which are separable morphological
operators applied on the size input. But this approximation does not
provide an advantage because the last pass is non-separable anyways. So
the GPU implementation does not attempt this approximation for more
accurate and faster results.

Differential Revision: https://developer.blender.org/D16762

Reviews By: Clement Foucault
2022-12-19 10:04:03 +02:00
Hans Goudey
1eb90ee519 UI: Use vector instead of linked list for block button groups
This simplifies some memory management, ammortizes some of the many
small allocations when building UI layouts, and simplifies the code
that deals with the groups. `uiBlock` is no longer a trivial type.
In my testing this saved a few ms when drawing a large node tree.
2022-12-18 21:45:32 -06:00
Hans Goudey
7d7e90ca68 UI: Use vector instead of linked lists for context store
Duplicating context lists took a measurable amount of time when drawing
large node trees in the node editor. Instead of using a linked list of
entries, which results in many small allocations, use a vector. Also,
use std::string and StringRefNull instead of char buffers and pointers.
2022-12-18 19:13:15 -06:00
Hans Goudey
d59f6ffdcb Fix: Wrong const iterator type for blender::Vector 2022-12-18 18:35:40 -06:00
Hans Goudey
f0ac5e8aec Cleanup: Move context.c to C++ 2022-12-18 14:40:30 -06:00
Hans Goudey
50c7eb14f4 Fix T103321: NodeSocket.node is None in Node.copy callback
Tag the topology cache dirty before Python can do arbitrary things
in the RNA copy callback.
2022-12-18 14:06:43 -06:00
Joseph Eagar
8666791b2e Fix T103261: Undo after mask extract doesn't restore active object 2022-12-18 07:50:35 -08:00
Joseph Eagar
17e266cd55 Cleanup: make paint_init_pivot an api method.
I had forgotten about curves sculpt mode when I wrote
this function. It just initializes the viewport
pivot point to the evaluated object bounding box.
Should be used inside the mode entry function.
2022-12-18 07:20:12 -08:00
Joseph Eagar
0beb358a69 Fix T103198: Missing bounds check for material_index attr in texpaint
Texpaint now bounds checks material indices when looking up
materials, in case the user has corrupted the material_index
attribute somehow.  We may wish to report this to the user
somehow on entering texture paint mode.
2022-12-18 07:08:57 -08:00
Campbell Barton
5a761a47e1 Cleanup: replace StringIO seek() & read() with a call to getvalue() 2022-12-18 14:18:01 +11:00
Antonio Vazquez
8709a51fa9 Fix T103293: GPencil Multiframe Scale affects stroke thickness inversely
The problem was the falloff factor was applied directly
and in the thickness must be inversed. Now the thickess
is calculated using an interpolation.
2022-12-17 16:36:02 +01:00
Jacques Lucke
28511ac6cf Fix T103294: bring back modifyMesh function for geometry nodes modifier
This was removed inrBb1494bcea7b6bb608 under the assumption that
it is not needed anymore. Apparently it is, so this commit brings it back.
2022-12-17 14:46:15 +01:00
Jacques Lucke
c18055ba5c Cleanup: quiet warning 2022-12-17 11:51:12 +01:00
Campbell Barton
e07c5a14c9 Cleanup: sort cmake file lists 2022-12-17 16:00:40 +11:00
Campbell Barton
0cc573c8c4 Cleanup: white space around comment blocks 2022-12-17 15:58:30 +11:00
Campbell Barton
a0a7db9f70 Cleanup: duplicate words in comments 2022-12-17 14:11:11 +11:00
Campbell Barton
02c8ce449e License headers: add missing license identifiers 2022-12-17 14:04:34 +11:00
Campbell Barton
68ba311c5c Cleanup: use SPDX license headers 2022-12-17 13:59:20 +11:00
Campbell Barton
dc8355cfe2 Correct GCC version in message
Missed last commit.
2022-12-17 13:56:01 +11:00
Campbell Barton
025570c44e Build: bump minimum GCC version from 9.3.1 to 11.0.0
Increase the minimum version as part of the VFX platform 2023.
2022-12-17 13:54:38 +11:00
Campbell Barton
2ac6e26c25 Cleanup: cmake formatting 2022-12-17 13:33:27 +11:00
Campbell Barton
6797de4e10 Cleanup: spelling in comments 2022-12-17 13:15:33 +11:00
Campbell Barton
067fe443d8 Cleanup: consistent naming for normals
Use consistent naming for {vert/poly/loop/face}_normals.
2022-12-17 13:06:43 +11:00
Campbell Barton
6d3cc9c38a Cleanup: cmake indentation 2022-12-17 12:33:55 +11:00
Lukas Stockner
347c82be6d Fix T98951: Shadow catcher objects are double-counting data passes
Differential Revision: https://developer.blender.org/D16627
2022-12-17 01:45:07 +01:00
Lukas Stockner
7c85f11c42 Cycles: Change bake jittering to avoid issues with skinny triangles
Partially addresses T72011.

The problem here is that the previous barycentric clamping did not deal well
with skinny triangles and would end up generating "sub-pixel jittering"
locations that were actually >20 pixels away.

Differential Revision: https://developer.blender.org/D16727
2022-12-17 01:16:14 +01:00
Hans Goudey
4254810e50 Cleanup: Slightly refactor cancelling link drag operator
Clarify that the dragged links aren't stored in the tree, use a
separate function for cancelling vs. applying the links to the tree.
2022-12-16 14:43:44 -06:00
Hans Goudey
4352ac0558 Cleanup: Return early in node link operator, remove useless comments 2022-12-16 14:43:44 -06:00
Hans Goudey
c9288ab41f Cleanup: Remove redundant information from node link drag struct 2022-12-16 14:43:44 -06:00
Hans Goudey
a43e498878 Cleanup: Remove unnecessary node link flag
Links that are currently being dragged are now stored outside
of the node tree, so we don't need a flag to distinguish them
from "proper" links.
2022-12-16 14:43:44 -06:00
Jacques Lucke
5ffcd8779e Fix: socket tooltip not showing when there was no type conversion 2022-12-16 19:39:14 +01:00
Jacques Lucke
3aca0bc66a Geometry Nodes: simplify handling of invalid group interface sockets
Previously, the code tried to keep node groups working even if some of
their input/output sockets had undefined type. This caused some
complexity with no benefit because not all places outside of this file
would handle the case correctly. Now node groups with undefined
interface sockets are disabled and have to be fixed manually before
they work again.

Undefined interface sockets are mostly caused by invalid Python
API usage and incomplete forward compatibility (e.g. when newer
versions introduce new socket types that the older version does
not know).
2022-12-16 18:31:01 +01:00
Hans Goudey
6ced6c9545 Fix std::optional value() build error on older macOS SDK
Patch from @dupoxy

Differential Revision: https://developer.blender.org/D16796
2022-12-16 11:02:43 -06:00
Julian Eisel
ea731f42db Fix T103187: Opening node search menu is slow because of assets.
Avoid utility function call that would query the file system, this was a
bottleneck. The path joining was also problematic. See patch for more
details.

Differential Revision: https://developer.blender.org/D16768

Reviewed by: Jacques Lucke
2022-12-16 17:01:03 +01:00
Hans Goudey
d77a6849e6 Cleanup: Remove duplicate UV islands header
This code was duplicated from `pbvh_uv_islands.hh`,
which was the version that was actually used.
2022-12-16 09:43:57 -06:00
Christophe Hery
9e94135f17 Fix: Crash after mesh color attribute name commit
6514bb05ea5a138d8971 missed a null check when accessing the active
and default color attribute names, since the CustomData API does not
do that check itself.
2022-12-16 09:43:57 -06:00
Charlie Jolly
bea5fe6505 Nodes: Add Exclusion color mix mode
Expands Color Mix nodes with new Exclusion mode.

Similar to Difference but produces less contrast.

Requested by Pierre Schiller @3D_director and
@OmarSquircleArt on twitter.

Differential Revision: https://developer.blender.org/D16543
2022-12-16 15:42:41 +00:00
Patrick Mours
a8530d31c2 Fix T103258: Deleting a shader with OptiX OSL results in an illegal address error
Materials without connections to the output node would crash with OSL
in OptiX, since the Cycles `OSLCompiler` generates an empty shader
group reference for them, which resulted in the OptiX device
implementation setting an empty SBT entry for the corresponding direct
callables, which then crashed when calling those direct callables was
attempted in `osl_eval_nodes`. This fixes that by setting the SBT entries
for empty shader groups to a dummy direct callable that does nothing.
2022-12-16 15:41:21 +01:00
Patrick Mours
c9eb583460 Fix T103257: Enabling or disabling viewport denoising while using OptiX OSL results in an error
Switching viewport denoising causes kernels to be reloaded with a new
feature mask, which would destroy the existing OptiX pipelines. But OSL
kernels were not reloaded as well, leaving the shading pipeline
uninitialized and therefore causing an error when it is later attempted to
execute it. This fixes that by ensuring OSL kernels are always reloaded
when the normal kernels are too.
2022-12-16 14:04:03 +01:00
Campbell Barton
599c0db3ff Cleanup: indentation in CMake files 2022-12-16 23:47:35 +11:00
Campbell Barton
9a25c48f08 Build: resolve failure to copy indirect dependencies for USD on Linux
Even when building without OpenImageIO and OpenVDB, USD depends on these
libraries.

Ensure these libraries are copied when building with USD.
2022-12-16 23:31:50 +11:00
Campbell Barton
3334ff0e32 CMake: warn Linux references old linux_centos7_x86_64 paths
When the centos7 library dir is found, warn when the values of cached
variables reference it, listing the variables and their values.
2022-12-16 23:06:03 +11:00
Jacques Lucke
c37e07bc01 Geometry Nodes: improve dot graph export of lazy function graph
* Dim default input values.
* Print default input values instead of type name.
* Add node/socket names to group input/output nodes.
2022-12-16 12:18:49 +01:00
Campbell Barton
ba89f640fe Fix T102792: Sculpt cursor jumps to random place
Restrict the condition under which paint cursors read use the cursor
location from the the operating-system.

This caused a glitch when dragging UI elements in painting context
popup. Since the paint cursor would display using mouse motion
which was clamped to the window center - an internal detail of hidden
cursor grabbing.

Now only read the cursor coordinates when clamped to a region which
is used for the transform cursor to stay visible even when the cursor
wraps around.
2022-12-16 18:40:17 +11:00
Campbell Barton
79a34758f5 Fix T103253: Infinite drag of number buttons is broken on WIN32
Recent reverting of changes to cursor grabbing intended to match
Blender 3.3 release. This is the case for 3.4x branch, however there is
an additional change to grabbing on WIN32 by Germano [0] which is a
significant improvement on old grabbing logic for Windows.
So instead of matching 3.3x behavior, restore logic that keeps
the cursor centered while grabbing & hidden.

This re-introduces T102792 issue displaying the paint-brush while
dragging buttons, this will have to be solved separately.

Re-apply [1] & [2], revert [3] & [4].

[4]: a3a9459050a96e75138b3441c069898f211f179c
[0]: 9fd6dae7939a65b67045749a0eadeb6864ded183
[1]: 4cac8025f00798938813f52dcb117be83db97f22
[2]: 230744d6fd96dcf5afe66a8f9b9f6f8bbe1f41bb
[3]: 0240b895994aa58258db6897ae0d6478da7fce5f
2022-12-16 18:38:22 +11:00