Commit Graph

120055 Commits

Author SHA1 Message Date
Falk David
a6dbfc8281 Fix: GPv3: Don't convert default thickness factor
The check that would early return to skip the thickness conversion was wrong.
It should check if the factor is 0 and then return.
2024-02-19 13:54:29 +01:00
Jacques Lucke
1f30f41af8 Geometry Nodes: align input and output sockets in simulation and repeat zone nodes
This changes the drawing of the zone nodes to align corresponding input
and output sockets. The resulting nodes are smaller and it's easier to see
how data is passed through them.

Drawing aligned sockets is already technically supported for quite a while
already, but we haven't used it so far. Using them for zone nodes seems to
provide benefits only. How we use aligned sockets in other nodes still has
to be discussed more.

This patch only changes run-time data. It doesn't affect what is written to
.blend files.

In the node declaration, aligned sockets are created by tagging a socket
so that it is aligned with the previous socket. This is a bit different from
what we had before where a single socket declaration would be used for
an input and output socket. I think the approach used here works better,
especially in a potential future scenario where the input and output socket
has a different type.

Pull Request: https://projects.blender.org/blender/blender/pulls/118335
2024-02-19 13:32:01 +01:00
Brecht Van Lommel
05f6a32b18 Merge branch 'blender-v4.1-release' into main 2024-02-19 13:18:27 +01:00
Brecht Van Lommel
7dd0dfe188 Fix: Build error using WITH_GPU_DRAW_TESTS and WITH_VULKAN_BACKEND 2024-02-19 12:24:54 +01:00
YimingWu
ae20873250 GPv3: Weight proximity modifier
This migrates the Weight proximity modifier to GPv3.

Pull Request: https://projects.blender.org/blender/blender/pulls/118363
2024-02-19 11:16:38 +01:00
Jeroen Bakker
06dd75ebd0 EEVEE-Next: Fix Metal Shading Warning
Implicit conversion between int and uint should be made explicit
accourding to our style guide.

Pull Request: https://projects.blender.org/blender/blender/pulls/118450
2024-02-19 09:53:53 +01:00
Aaron Carlisle
234e15f7b6 UI: Allow Context Online Manual Access for User Preferences
The check for owner ID here was preventing the online manual access to work for user preference properties.

This is also true for Python API Documentation access.
2024-02-19 02:11:04 -05:00
Jacques Lucke
5594490aea Fix: race condition in atomic disjoint set
To fix this, I compared our implementation with the reference implementation
in more detail again and found some differences.
Aligning our and the reference implementation a bit more fixed the issue.

Reference implementation: https://github.com/wjakob/dset/blob/master/dset.h

Pull Request: https://projects.blender.org/blender/blender/pulls/118434
2024-02-19 02:09:55 -05:00
Jeroen Bakker
2cb2d3944b RenderTest: Fix EEVEE Render Test
Panorama dicing test fails for EEVEE on legacy platforms. EEVEE creates a shader interface
that isn't compatible with the vulkan backend. This PR hides the check.

Check should be enabled again after EEVEE has been replaced by EEVEE-Next.
This PR also changes the behavior when checks are executed. It used to be
executed when blender was build with asserts. Now it is behind the --debug-gpu flag.

Pull Request: https://projects.blender.org/blender/blender/pulls/117992
2024-02-19 08:07:53 +01:00
Aaron Carlisle
09ff1b1f7e UI: Allow Context Online Manual Access for User Preferences
The check for owner ID here was preventing the online manual access to work for user preference properties.

This is also true for Python API Documentation access.
2024-02-19 02:07:47 -05:00
Hans Goudey
fb8f9deaab Cleanup: Store BLF Glyph cache with C++ Vector, use std::mutex
- Store glyph cache entries as unique pointers in a vector
- Use std::mutex instead of `ThreadMutex`

Pull Request: https://projects.blender.org/blender/blender/pulls/118222
2024-02-19 03:34:36 +01:00
Campbell Barton
64213e6c24 Cleanup: use std::string for manual_id access 2024-02-19 12:18:30 +11:00
Campbell Barton
14b5912eee Cleanup: quiet C4551 warning for MSVC 2024-02-19 09:34:41 +11:00
Campbell Barton
e51f954f39 Cleanup: spelling in comments, RNA description warning 2024-02-19 09:23:48 +11:00
Jacques Lucke
02127c1d3e Fix: race condition in atomic disjoint set
To fix this, I compared our implementation with the reference implementation
in more detail again and found some differences.
Aligning our and the reference implementation a bit more fixed the issue.

Reference implementation: https://github.com/wjakob/dset/blob/master/dset.h

Pull Request: https://projects.blender.org/blender/blender/pulls/118434
2024-02-18 19:20:45 +01:00
Pratik Borhade
203f5f9f09 GPv3: Autolock inactive layers
Port legacy `autolock_layers` property to gpv3

Pull Request: https://projects.blender.org/blender/blender/pulls/118323
2024-02-18 07:32:56 +01:00
Iliya Katushenock
c2b56ca468 Cleanup: prevent unnecessary copy of VArray
Pull Request: https://projects.blender.org/blender/blender/pulls/118349
2024-02-17 21:44:21 +01:00
Jacques Lucke
1e20f06c21 BLI: add utility to simplify creating proper random access iterator
The difficulty of implementing this iterator is that it requires lots of operator
overloads which are usually very simple to implement, but result in a lot of code.
The goal of this patch is to abstract the common parts so that it becomes easier
to implement random accessor iterators. Many algorithms can work more
efficiently with random access iterators than with other iterator types.

Also see https://en.cppreference.com/w/cpp/iterator/random_access_iterator

Pull Request: https://projects.blender.org/blender/blender/pulls/118113
2024-02-17 20:59:45 +01:00
Dalai Felinto
c9d506ba18 Extensions: Rename experimental feature name, description and task
New name: Extensions

Now that we are gettting closer to a launch I need to refer to this
feature in the documentation. As such it was time to bring it up to
date.

I'm also pointing the experimental feature to the task where the Alpha
launch is being coordinated (#117286). Once that task is all ticked we
will likely be ready to go out of experimental.
2024-02-17 15:50:16 +01:00
Germano Cavalcante
a0d453ccad Merge branch 'blender-v4.1-release' 2024-02-17 10:38:46 -03:00
Germano Cavalcante
dd1c12e4d0 Fix: 'V3D_SNAPCURSOR_OCCLUSION_ALWAYS_TRUE' flag not working
The name `use_occlusion_test` was misleading and led to errors.

If this variable is false, objects will be considered to always be
occluders.

Not a serious problem, since the flag is not being used.
2024-02-17 10:17:38 -03:00
Germano Cavalcante
286b5a1c34 Fix: Snap Cursor API not returning index
Not a serious problem as nowhere currently requires this index.
2024-02-17 10:17:27 -03:00
Pratik Borhade
daedb427c5 Merge branch 'blender-v4.1-release' 2024-02-17 11:38:33 +05:30
Pratik Borhade
1e81a353ad Cleanup: Wrong return value
`drop_target_tooltip` return type was changed to std::string in
7ca4dcac5a

Pull Request: https://projects.blender.org/blender/blender/pulls/118361
2024-02-17 07:04:38 +01:00
Clément Foucault
8b6d145a6b Fix: Metal: Shader compilation logging with compute shader
It was missing the line directive treatment the
fragment and vertex shader had.
2024-02-16 22:52:59 +01:00
Hans Goudey
c4bdfba15d Cleanup: Sort geomery node static definitions 2024-02-16 14:43:36 -05:00
Iliya Katueshenock
1dfd94a8d3 Cleanup: EEVEE: Fix compile warning
Pull Request: https://projects.blender.org/blender/blender/pulls/118322
2024-02-16 20:01:06 +01:00
Aras Pranckevicius
69b9735ce2 Merge branch 'blender-v4.1-release' 2024-02-16 20:56:56 +02:00
Aras Pranckevicius
6508ed8a3f Fix #118213: Applying effects to VSE Color/Text strips makes both the effect and source strip visible
This is different from applying effects to regular "source media" strips
like images or movies; an effect "hides" the input strip when it is
below itself in the channel.

Apply the same treatment to Color & Text strips. Fixes #118213.

If someone wants previous behavior for some reason, they can drag
the effect applied on Color/Text to be below the input strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/118269
2024-02-16 20:56:06 +02:00
Brecht Van Lommel
7453c5ed67 Merge branch 'blender-v4.1-release' into main 2024-02-16 19:31:31 +01:00
Raul Fernandez
324ff4ddef macOS: Remove unnecessary checks now that minimum version is macOS 11.2
MacOS minimum version is now 11.2 we no longer need to check for lower API versions.

Pull Request: https://projects.blender.org/blender/blender/pulls/118388
2024-02-16 19:03:23 +01:00
Hans Goudey
333daa3185 Merge branch 'blender-v4.1-release' 2024-02-16 12:54:53 -05:00
Hans Goudey
f909e279e7 Fix #118360: Fill mask operator doesn't initialize hidden vertices
If there is no mask attribute yet and hidden vertices, the values for those
vertices wouldn't be initialized. Fix by simply initializing the entire array
when it's allocated.
2024-02-16 12:54:27 -05:00
Philipp Oeser
d555bbaa46 Merge branch 'blender-v4.1-release' 2024-02-16 18:26:44 +01:00
Philipp Oeser
2f1b9432be Fix #106999: Converting curves to particle system can lead to crash
So this happens on curves with only a single point in them.
If these are converted to the old particle system, we would end up with
a particle with only one key (invalid hair), then going to particle
editmode would crash.

The old particle system took care of this (e.g. when deleting keys in
`PARTICLE_OT_delete`)
See the following comment:
`/* We can't have elements with less than two keys. */`

So to resolve, only convert curves with multiple (>1) points in the
process.

Pull Request: https://projects.blender.org/blender/blender/pulls/118392
2024-02-16 18:25:43 +01:00
Hans Goudey
c686e6603e Cleanup: Fix missing declaration warning after recent commit
Missing from d9a1e906f5
2024-02-16 12:22:16 -05:00
Harley Acheson
4910de5160 Merge branch 'blender-v4.1-release' 2024-02-16 09:21:53 -08:00
Harley Acheson
f573a3bad3 Fix: Crash When Dragging Other Object Types into Bone Collection List
Dragging any other object type to the Bone Collections List results in
a null dereference.  This PR adds check that the drag type is
WM_DRAG_BONE_COLLECTION.

Pull Request: https://projects.blender.org/blender/blender/pulls/118393
2024-02-16 18:20:37 +01:00
Richard Antalik
a2c839e71c Fix #118190: Tool shortcut does not show in tooltip
fa6384eb39 introduced explicit setting of operator context as argument for
function `ED_region_panels_ex()`. However, this did not work correctly, because
`UiLayout` did not exist when `uiLayoutSetOperatorContext()` was called. This
has to be done in `ed_panel_draw()`.

Another issue is, that panel may be drawn, when mouse is over tool region,
which means, that `sequencer_tools_region_draw()` must look for whether
this is happening in preview or timeline region.

Pull Request: https://projects.blender.org/blender/blender/pulls/118292
2024-02-16 18:05:23 +01:00
Hans Goudey
8ab23f0a6e Assets: Return weak reference by value from asset representation
This is generally more flexible and less error prone. The struct
implements a proper descructorfor this anyway. That also makes the
separate free function unnecessary-- it's redundant with the destructor.
2024-02-16 12:02:08 -05:00
Hans Goudey
d9a1e906f5 Cleanup: GPv3: Add specific header for legacy conversion functions
Similar to `BKE_curve_legacy_convert.hh` and `BKE_mesh_legacy_convert.hh`

Pull Request: https://projects.blender.org/blender/blender/pulls/118390
2024-02-16 17:49:42 +01:00
Harley Acheson
7d1747819f Merge branch 'blender-v4.1-release' 2024-02-16 08:40:51 -08:00
Pratik Borhade
5ba104ac46 Fix #114962: Tree view: Crash during tooltip creation
Crash when dragging tree-item from one window to other instance of tree
view, with drop_target then nullptr. Returning null in this case lets
the process proceed normally and tooltip display correctly.

Pull Request: https://projects.blender.org/blender/blender/pulls/116892
2024-02-16 17:39:21 +01:00
Hans Goudey
44e695192a Cleanup: Make format 2024-02-16 11:35:54 -05:00
Falk David
8bca19ed12 GPv3: Layer Adjustment Conversion
This converts the "Layer Adjustments" from GPv2 into modifier setups in GPv3.

They include:
* Layer tint
* Layer thickness offset
* Thickness factor (for the entire object)

Both the "layer tint" and the "thickness factor" are converted using the existing modifiers.

Because the thickness modifier uses a factor instead of an offset, the "layer thickness offset" is converted to a geometry nodes modifier setup for each layer that adds an offset value to the radii instead of multiplying by a factor.

Pull Request: https://projects.blender.org/blender/blender/pulls/118149
2024-02-16 17:17:19 +01:00
Hans Goudey
921ce2fae8 Cleanup: Consistent use of "this" keyword in asset code
Follow the style guide for using `this->` to access non-private variables.
2024-02-16 11:01:17 -05:00
Julian Eisel
6d387b3ba8 Cleanup: Use reference where null asset library is not possible
It should not be possible to end up with an asset representation that
does not have a valid pointer/reference to the asset library owning it,
it's injected via all constructors. So reflect that by using a reference
instead of a (possibly null) pointer.
2024-02-16 16:53:36 +01:00
Julian Eisel
38c2305457 Cleanup: Remove unused header in asset file 2024-02-16 16:51:53 +01:00
Falk David
8b31e8663b GPv3: Convert editcurve to bézier curves
In GPv2, strokes could be edited using bézier curve handles. This was implemented by creating an `editcurve` for a stroke that would store the handles and other attributes.
In GPv3, we can directly make use of the `CURVE_TYPE_BEZIER` and store the curve as a bézier curve.

Note: This PR only handles conversion. Not rendering or anything else.

Pull Request: https://projects.blender.org/blender/blender/pulls/118386
2024-02-16 16:51:06 +01:00
Julian Eisel
a5a3125fe1 Refactor: Remove unused move constructor for asset representation
This shouldn't be needed, and was incorrect anyway: It wasn't copying
the owner asset library pointer.
2024-02-16 16:38:14 +01:00