Commit Graph

104126 Commits

Author SHA1 Message Date
Campbell Barton
cdac2b813e Merge branch 'blender-v4.0-release' 2023-10-23 12:31:14 +11:00
Campbell Barton
6b4d16363d Merge branch 'blender-v4.0-release' 2023-10-23 12:22:58 +11:00
Campbell Barton
a60de8a940 Merge branch 'blender-v4.0-release' 2023-10-23 12:22:52 +11:00
Campbell Barton
d2b86610f0 Fix animation player continuing to playback audio when paused
Using arrow keys for frame stepping would keep playing back audio.
Also move play/pause to utility functions.
2023-10-23 12:20:44 +11:00
Campbell Barton
25ec651018 Cleanup: clarify naming for the animation player
The animation player used abbreviations in confusing ways:
`wait2` with no `wait1`, `indicator` without noting what was indicated,
`fstep` & `sstep` terms also weren't all that obvious.
Use clearer & more verbose names.
2023-10-23 11:49:17 +11:00
Richard Antalik
86778d4554 Fix VSE retiming speed transition can not be moved
In earlier design, retiming selection was managed outside of retiming
keys struct. This was changed to a flag of the retiming key struct.

Since moving of the transition deletes and re-creates keys, the
selection was lost. Selection is now re-established in
`seq_retiming_transition_offset()`.
2023-10-23 02:38:11 +02:00
Richard Antalik
14827de2a9 Fix #112267: Multiply doesn't multiply alpha channel
After eda58d6419, multiply operation does not affect alpha channel, but
Some users do expect this feature present.

This adds option `multiply_alpha`, so that multiplication (in strip
color panel) will affect alpha channel as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/113791
2023-10-23 02:37:41 +02:00
Campbell Barton
fd212e3f6c Merge branch 'blender-v4.0-release' 2023-10-23 11:28:04 +11:00
Campbell Barton
4b1d185887 Fix crash when the animation player fails to create a texture (take 2)
Alternate fix for [0], a crash when a texture fails to load since this
seems to cause animation playback to fail on WIN32, see #113849.

While I can't redo the error, the main change was setting up
`immVertexFormat` before calling `ocio_transform_ibuf`.

[0]: 34899ec13d.
2023-10-23 11:26:55 +11:00
Campbell Barton
a65f806658 Revert "Fix crash when the animation player fails to create a texture"
This reverts commit 34899ec13d.

This causes issues on WIN32 which I'm unable to reproduce.
Resolving the error with textures failing to load can be done with
fewer changes.
2023-10-23 11:25:13 +11:00
Campbell Barton
dcc6a9d73b Revert "Fix crash when the animation player fails to create a texture"
This reverts commit 34899ec13d.
2023-10-23 10:58:56 +11:00
Campbell Barton
14247f9194 Cleanup: add missing source files to CMake 2023-10-23 10:19:57 +11:00
Campbell Barton
b8d1860d29 Cleanup: use curves_* prefix for curves editor files 2023-10-23 10:17:22 +11:00
Campbell Barton
351e993454 Cleanup: add SPDX-FileCopyrightText to header 2023-10-23 10:10:44 +11:00
Campbell Barton
87a969e7fc Cleanup: sort files in CMake 2023-10-23 10:09:52 +11:00
Campbell Barton
c8c2343b4b Cleanup: spelling in comments 2023-10-23 10:09:05 +11:00
Pratik Borhade
499f898400 Merge branch 'blender-v4.0-release' 2023-10-22 11:12:03 +05:30
Milan Davidović
19b112b11c Fix #112683: Removing the last Annotations layer produces a warning.
After removing the last Annotations layer, the current GPencil block
needs to be freed.

Pull Request: https://projects.blender.org/blender/blender/pulls/113274
2023-10-22 07:39:32 +02:00
Harley Acheson
b53111e935 BLF: Improved Cached Fallback Font Setup
Changes to FontBLF initialization so that the cached fallback fonts,
which remain faceless until needed, get all required setup.
Otherwise they are not kerned and we also don't get metrics from them.

Pull Request: https://projects.blender.org/blender/blender/pulls/114018
2023-10-22 03:54:57 +02:00
Harley Acheson
fd63c01c4f Cleanup: Make format
Formatting changes resulting from Make Format
2023-10-21 18:06:50 -07:00
Dalai Felinto
9453031730 GPv3: Instance on Points
Note: Attributes are not propagated from Curves or points yet. It will be handled separately on main.

Part of #113602.

Ref !113705.
2023-10-21 22:37:51 +02:00
Falk David
eab204b0a4 Fix: GPv3: Radial brush size control broken
Since 07749b38 the hack in the radial control code is no longer needed,
because the brush is in screen space (pixels) anyway.
2023-10-21 17:49:27 +02:00
Falk David
44e2681459 Fix: GPv3: Drawing tool didn't initialize all attributes
Attributes that were not immediatly written to after the `curves.resize(...)` did not get initialized to default values in the new stroke.

Pull Request: https://projects.blender.org/blender/blender/pulls/114005
2023-10-21 17:33:53 +02:00
Douglas Paul
f5c9acc154 GPv3: Reimplement how customdata is updated when layers are re-ordered
Instead of calculating the expected insertion index for a customdata entry being moved, this implementation just records the initial layer indices so that it can compare them with the final indices to determine how the customdata entries need to be re-arranged.

Also simplifies the `add_layer` function and adds an implementation that just takes a `name` and adds a new layer with that name to the root group.

Pull Request: https://projects.blender.org/blender/blender/pulls/113962
2023-10-21 16:47:17 +02:00
Hans Goudey
44fa749bbe Cleanup: Improve comment about CurvesGeometry::resize()
Make it clearer that attributes must be initialized by the caller.

Pull Request: https://projects.blender.org/blender/blender/pulls/114004
2023-10-21 16:27:00 +02:00
casey bianco-davis
e266b142f6 GPv3: Transform operators
This adds the keybindings, menu, and functionally for the edit mode transform operators to grease pencil v3.

The transform operation include:
 * translate, rotate, scale, change opacity, change radius

Pull Request: https://projects.blender.org/blender/blender/pulls/111836
2023-10-21 15:12:47 +02:00
Hans Goudey
b4e6ef4279 Fix: MeshPolygon.use_smooth set inversed
Mistake in 89e3ba4e25.
2023-10-21 14:56:06 +02:00
Hans Goudey
f64ed2e963 Cleanup: Simplifying freeing node editor space data 2023-10-21 14:56:06 +02:00
Campbell Barton
2864c20302 Cleanup: various C++ changes (use nullptr, function style casts) 2023-10-21 21:17:57 +11:00
Campbell Barton
a398de672a Merge branch 'blender-v4.0-release' 2023-10-21 20:40:20 +11:00
Campbell Barton
b592e5c69a Fix error in animation player arguments (font_id & frame_step swapped)
Regression in [0], even though this doesn't seem to cause problems,
the arguments were obviously wrong.

[0]: 4f3e2ee857
2023-10-21 20:34:15 +11:00
Harley Acheson
0bde01eab5 UI: Configurable UI Font Weight
Allows selecting different font weights in Text Styles

Pull Request: https://projects.blender.org/blender/blender/pulls/112454
2023-10-21 00:28:28 +02:00
Jacques Lucke
b18810d2aa Merge branch 'blender-v4.0-release' 2023-10-20 21:22:11 +02:00
Jacques Lucke
0e9f472726 Fix #113773: repeat zone does not propagate anonymous attributes sometimes
The repeat zone needs some special treatment during anonymous attribute
inferencing, because it propagates those attributes directly  from the repeat
input to the repeat output node and vice versa.

Now the algorithm uses multiple passes if necessary to reach a stable
inferencing result.

Pull Request: https://projects.blender.org/blender/blender/pulls/113970
2023-10-20 21:21:40 +02:00
Hans Goudey
e52b269283 Cleanup: Use simpler copying with begin iterator and count 2023-10-20 20:07:02 +02:00
Hans Goudey
8ec6260ed5 Cleanup: Consistent use of curves::has_anything_selected
- Continue to reduce indentation
- Use more semantically correct processing for checking attribute
- Do cheap checks earlier
- Avoid redundant check when index mask is created anyway
2023-10-20 20:01:30 +02:00
Hans Goudey
8c0fc33739 Cleanup: Fix const correctness of node tree interface cache API
It shouldn't be possible to retrieve a mutable interface item from
a const node tree. Unfortunately that means we have to duplicate
the accessor methods. Fortunately they are very small.
2023-10-20 19:37:39 +02:00
Hans Goudey
7b09983423 Cleanup: Consistent const usage in headers, use std::move
Avoid const for variables stored by value in structs/classes,
since that is redundant with the constness of the owner itself.
std::move a few strings that were missed before.
2023-10-20 19:32:26 +02:00
Dalai Felinto
bd0ba8c75c Merge remote-tracking branch 'origin/blender-v4.0-release' 2023-10-20 19:11:57 +02:00
Dalai Felinto
b6108c5cef Cleanup: make format 2023-10-20 19:11:42 +02:00
Falk David
e433a8eaaf GPv3: Replace find API with find_node_by_name
Instead of having two APIs (`find_layer_by_name` +
`find_layer_group_by_name`) replace them with a single API
`find_node_by_name`.
This returns a `TreeNode` but the caller can easily check if it's a
layer or a group.
2023-10-20 19:05:31 +02:00
Falk David
f6c8ddda26 GPv3: Add is_child_of function
Adds a new API to check if a node is a child of a group.
2023-10-20 18:51:22 +02:00
Ray Molenkamp
fece71fa0a Fix: Build error on windows
winstuff.c got converted to .cc recently, and a merge was done of
#113674 from 4.0 which still was using C style code.

Small update in code style was required here.
2023-10-20 10:44:34 -06:00
Clément Foucault
b0e7a6db56 Merge branch 'blender-v4.0-release'
# Conflicts:
#	source/blender/gpu/opengl/gl_backend.cc
2023-10-20 17:23:53 +02:00
Anthony Roberts
4e69e49e7e Add check for Qualcomm devices on Windows
Some of these devices are not capable of running >=4.0, due to issues
with Mesa's Compute Shaders and their D3D drivers.

This PR marks those GPUs as unsupported, and prints info to stdout.

A driver update will be available for 8cx Gen3 on the 17th October
from here:
https://www.qualcomm.com/products/mobile/snapdragon/pcs-and-tablets/snapdragon-8-series-mobile-compute-platforms/snapdragon-8cx-gen-3-compute-platform#Software

It will take longer via the standard MS Windows Update channels,
as there is certification, testing, etc required, but it is possible
to get the drivers, at least.

This issue applies even when using emulated x64.

If this does not get merged, all WoA devices will break with 4.0,
where older ones will just launch a grey screen and crash, and newer
ones will open, but scenes will not render correctly in Workbench.

These devices work by using Mesa's D3D12 Gallium driver ("GLOn12"),
which is why we have to read the DirectX driver version - the version
reported by OpenGL is the mesa version, which is independent of the
driver (which is the part with the bug).

Pull Request: https://projects.blender.org/blender/blender/pulls/113674
2023-10-20 17:18:35 +02:00
Jason Fielder
1b0ddfa6cb GPU: Add explicit API to sync storage buffer back to host
PR Introduces GPU_storagebuf_sync_to_host as an explicit routine to
flush GPU-resident storage buffer memory back to the host within the
GPU command stream.

The previous implmentation relied on implicit synchronization of
resources using OpenGL barriers which does not match the
paradigm of explicit APIs, where indiviaul resources may need
to be tracked.

This patch ensures GPU_storagebuf_read can be called without
stalling the GPU pipeline while work finishes executing. There are
two possible use cases:

1) If GPU_storagebuf_read is called AFTER an explicit call to
GPU_storagebuf_sync_to_host, the read will be synchronized.
If the dependent work is still executing on the GPU, the host
will stall until GPU work has completed and results are available.

2) If GPU_storagebuf_read is called WITHOUT an explicit call to
GPU_storagebuf_sync_to_host, the read will be asynchronous
and whatever memory is visible to the host at that time will be used.
(This is the same as assuming a sync event has already been signalled.)

This patch also addresses a gap in the Metal implementation where
there was missing read support for GPU-only storage buffers.
This routine now uses a staging buffer to copy results if no
host-visible buffer was available.

Reading from a GPU-only storage buffer will always stall
the host, as it is not possible to pre-flush results, as no
host-resident buffer is available.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/113456
2023-10-20 17:04:36 +02:00
Clément Foucault
7b97bc48d8 EEVEE-Next: Rework the material panel
- Adds the missing new RNA definitions
- Split settings panel into surface and volume
- Expose displacement and volume nodetree panels
- Rename `Cull Backfaces` to `Backface Culling`
  for consistency
- Rename `use_backface_culling_probe` to
  `lightprobe_volume_single_sided` for accuracy
  and avoiding confusion as it is not a real
  backface culling.
- Rename `Screen Space Refraction` to
  `Raytrace Refraction` for accuracy.

Motivation is to make it closer to cycles now
that EEVEE is compatible with more features.

Pull Request: https://projects.blender.org/blender/blender/pulls/113971
2023-10-20 16:59:20 +02:00
Michael B Johnson
b262655d39 USD: export to a single root prim by default
This PR adds the following changes:

A single root is always set as default. After talking to Wave and
Spiff, we settled on root being the best default. Users who don't
want a single root prim inserted, can choose to clear the field
The root prim no longer requires the user to prefix the field with /.
It will implicitly insert that for them.

On export, the root_prim hierarchy is now defined all as Xform
instead of just the final prim in the path. Each prim also has
custom metadata added to show that it was generated by Blender.
This follows convention in other DCCs as well.

On import, the code now finds the hierarchy of generated prims
using that metadata. It then skips importing them. This means that
you can roundtrip hierarchies even with an inserted root.

Co-authored-by: Dhruv Govil <dgovil2@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113187
2023-10-20 10:58:40 -04:00
Hans Goudey
89e3ba4e25 Mesh: Replace auto smooth with node group
Design task: #93551

This PR replaces the auto smooth option with a geometry nodes modifier
that sets the sharp edge attribute. This solves a fair number of long-
standing problems related to auto smooth, simplifies the process of
normal computation, and allows Blender to automatically choose between
face, vertex, and face corner normals based on the sharp edge and face
attributes.

Versioning adds a geometry node group to objects with meshes that had
auto-smooth enabled. The modifier can be applied, which also improves
performance.

Auto smooth is now unnecessary to get a combination of sharp and smooth
edges. In general workflows are changed a bit. Separate procedural and
destructive workflows are available. Custom normals can be used
immediately without turning on the removed auto smooth option.

**Procedural**

The node group asset "Smooth by Angle" is the main way to set sharp
normals based on the edge angle. It can be accessed directly in the add
modifier menu. Of course the modifier can be reordered, muted, or
applied like any other, or changed internally like any geometry nodes
modifier.

**Destructive**
Often the sharp edges don't need to be dynamic. This can give better
performance since edge angles don't need to be recalculated. In edit
mode the two operators "Select Sharp Edges" and "Mark Sharp" can be
used. In other modes, the "Shade Smooth by Angle" controls the edge
sharpness directly.

### Breaking API Changes
- `use_auto_smooth` is removed. Face corner normals are now used
  automatically   if there are mixed smooth vs. not smooth tags. Meshes
  now always use custom normals if they exist.
- In Cycles, the lack of the separate auto smooth state makes normals look
  triangulated when all faces are shaded smooth.
- `auto_smooth_angle` is removed. Replaced by a modifier (or operator)
  controlling the sharp edge attribute. This means the mesh itself
  (without an object) doesn't know anything about automatically smoothing
  by angle anymore.
- `create_normals_split`, `calc_normals_split`, and `free_normals_split`
  are removed, and are replaced by the simpler `Mesh.corner_normals`
  collection property. Since it gives access to the normals cache, it
  is automatically updated when relevant data changes.

Addons are updated here: https://projects.blender.org/blender/blender-addons/pulls/104609

### Tests
- `geo_node_curves_test_deform_curves_on_surface` has slightly different
   results because face corner normals are used instead of interpolated
   vertex normals.
- `bf_wavefront_obj_tests` has different export results for one file
  which mixed sharp and smooth faces without turning on auto smooth.
- `cycles_mesh_cpu` has one object which is completely flat shaded.
  Previously every edge was split before rendering, now it looks triangulated.

Pull Request: https://projects.blender.org/blender/blender/pulls/108014
2023-10-20 16:54:08 +02:00
Jacques Lucke
65d4ae7445 Merge branch 'blender-v4.0-release' 2023-10-20 16:48:16 +02:00