Commit Graph

133177 Commits

Author SHA1 Message Date
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
Harley Acheson
4acbda91f8 Merge branch 'blender-v4.1-release' 2024-02-17 11:30:55 -08:00
Harley Acheson
a677518cb5 Fix #118351: Pixel Shift with Win32 Clipboard DibV5 Image Transfer
My misreading of the Microsoft BITMAPV5HEADER specification causes a
shift of three pixels when transferring between applications using this
format. This does not occur when moving within or between Blender
instances. This PR just removes the incorrect 12-byte offset. Note
that many applications prefer PNG transfers over DibV5 so testing this
might be non-obvious.

Pull Request: https://projects.blender.org/blender/blender/pulls/118417
2024-02-17 20:29:41 +01:00
Dalai Felinto
18d62c36ad UI: Tweak extensions repository panel
Reduce the width size and align the URL with the UIList.

Adjustments that would still be welcome:
* Make URL label color the same as Advanced.
* Waste less space between URL and the [________________].
2024-02-17 16:56:59 +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
7ca4dcac5a113db514faf7362b95bfe584e252be

Pull Request: https://projects.blender.org/blender/blender/pulls/118361
2024-02-17 07:04:38 +01:00
Campbell Barton
c47c1275a9 Merge branch 'blender-v4.1-release' 2024-02-17 14:57:07 +11:00
Campbell Barton
a8ca12f2a8 Fix #118233: No preference to disable multi-touch gestures on Wayland
Support this preference for Wayland, following macOS & WIN32 support.
2024-02-17 14:55:12 +11: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 d9a1e906f56353766a7dfc5dd9861376c1a6101b
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
Brecht Van Lommel
fd643535bc Merge branch 'blender-v4.1-release' into main 2024-02-16 17:55:26 +01:00
Brecht Van Lommel
17ca22ae9f macOS: Raise minimum required version to macOS 11.2
This was already the minimum requirement for Intel and Apple Silicon
GPUs. It is required for the Metal backend to work correctly.

Previously the minimum for AMD GPUs was 10.15.

Pull Request: https://projects.blender.org/blender/blender/pulls/118287
2024-02-16 17:53:51 +01: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
2a03154041 Revert "Experiment: Add release notes PR link field to pull request template"
This reverts commit 439c8b62c3cc39a2ffd047c4aaea20411878ea88.

Didn't intend to push this to the main branch, and didn't notice it was
still on there when pushing.
2024-02-16 16:41:07 +01:00
Julian Eisel
f15ad836e6 Revert "Improve wording"
This reverts commit 0e7c2bac1454bc07e18d737c77d46016422a68db.

Didn't intend to push this to the main branch, and didn't notice it was
still on there when pushing.
2024-02-16 16:39:54 +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
Julian Eisel
0e7c2bac14 Improve wording 2024-02-16 16:38:14 +01:00
Julian Eisel
439c8b62c3 Experiment: Add release notes PR link field to pull request template 2024-02-16 16:38:14 +01:00
Brecht Van Lommel
66c6cbb598 Tests: Silence warning about missing alpha channel in render tests
Having this repeated many times makes it hard to spot actual issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/118355
2024-02-16 16:36:21 +01:00
Bastien Montagne
9275d40934 GPv3: Minor Refactor of conversion code.
Essentially move the Object-handling logic also into
`bke::greasepencil::convert::`. This code will also be needed for
automatic conversion on fileread etc.

It also helps to keep all the conversion logic in one place (especially
since there is going to be way more done at object level - modifiers,
animation, etc.).

Pull Request: https://projects.blender.org/blender/blender/pulls/118384
2024-02-16 16:29:31 +01:00
Omar Emara
9ab72eae38 Compositor: Unify Texture node between CPU and GPU
The CPU and GPU implementations of the compositor Texture node sample
the texture at different locations, producing differences. This is
primarly an issue with half pixel offsets to evaluate the texture at the
center of the pixels.

The CPU compositor only adds the offsets if interpolation is disabled,
regardless if the texture is of type image or not. Further the offset
was wrong, since it was not a half pixel offset, but a full pixel one.

The offsets should always be added, since it won't make a difference in
the non interpolated case, and it should always be added especially if
interpolation is enabled. A comment in the old code mentions something
about artifacts, but it is possible that this is a consequence of the
wrong offset that was used.

This patch always adds a half pixel offset, following the GPU code.

Pull Request: https://projects.blender.org/blender/blender/pulls/118377
2024-02-16 16:21:48 +01:00
Philipp Oeser
54110c56c4 Merge branch 'blender-v4.1-release' 2024-02-16 15:37:07 +01:00
Philipp Oeser
745d2e18dc Fix #107228: AttributeGroup.new crash when layer cannot be created
A layer cannot be created e.g. when creating a reserved-name attributes
with the wrong domain/type.

Caused by 101d04f41ffbb72bf20e7c2b15f1bb868328cd03 [which just did not
check if the layer creation was successful].

This should go into 3.6 LTS as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/118378
2024-02-16 15:36:31 +01:00