Commit Graph

783 Commits

Author SHA1 Message Date
Hans Goudey
564c25291f Merge branch 'blender-v4.0-release' 2023-10-19 10:03:59 +02:00
Hans Goudey
eb41a7ec9d Fix: Misleading node tools popover label
Use "Hair Curves" instead of just curves, to clarify that it's just the
new curves system that's supported, not the legacy one. When the
old one is removed, the label will be changed to just say "Curves"
again.
2023-10-19 09:50:17 +02:00
Pratik Borhade
2a5c499585 GPv3: Assign material
Assign active material to selected strokes. This is similar to legacy GP
operator `GPENCIL_OT_stroke_change_color`.
Implements #113481

Pull Request: https://projects.blender.org/blender/blender/pulls/113573
2023-10-18 12:57:57 +02:00
Jacques Lucke
5bee6bcedc Geometry Nodes: new Split to Instances node
This node allows splitting up a geometry into groups. A group is defined as all
elements with the same group id. The output contains an instance per group.
The `Group ID` output can be used for further deterministic processing.

The node supports meshes, curves, point clouds and instances. It only works
on the top-level geometry, so it does not go into nested instances because it
also generates new instances.

Co-authored-by: Hans Goudey <hans@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/113083
2023-10-18 10:26:23 +02:00
Miguel Pozo
4f9d85fc96 Fix: UI: Revert unintended change
Unintended change from #113362
2023-10-17 20:02:07 +02:00
Hans Goudey
31ec00895f Curves: Add edit mode operator to set attribute values
Similar to #104426, this adds a simple operator to set attribute values
for curves edit mode. The operator is very basic and is only meant to
be a first step for more attribute editing features. Some of the
functionality could be achieved with node tools, but without dynamic
socket types or access to the active attribute, it would be incomplete.

Some of the RNA property registration, retrieval, and setting is reused
from the mesh edit mode operator. The rest of the logic is similar but
harder to de-duplicate.

Pull Request: https://projects.blender.org/blender/blender/pulls/105076
2023-10-17 12:35:40 +02:00
Hans Goudey
4ae4e25dc2 Merge branch 'blender-v4.0-release' 2023-10-17 09:25:51 +02:00
Hans Goudey
3d236bc858 Mesh: Add operator to select elements based on boolean attribute
Adds a "Select by Attribute" operator as mentioned in the discussion in
#105317. This is done in 4.0 to limit the breaking aspect of the removal
of face maps. The selection storage functionality is replaced by boolean
attributes. We already have a way to control the data in the boolean
attribute with the "Set Attribute" operator, but we didn't have a way to
convert the attribute into a selection.

This operator works on the active attribute if is a boolean attribute
and isn't on the face corner domain. It adds to the existing selection
similar to other existing operators.

While this behavior can be recreated as a node tool, we add it as a
builtin operator here to avoid limitations of the new node-based
tool system and to make the late-in-the-release-cycle change safer.

Pull Request: https://projects.blender.org/blender/blender/pulls/113772
2023-10-17 09:24:51 +02:00
Bastien Montagne
764ce8ce86 Merge branch 'blender-v4.0-release' 2023-10-16 11:36:47 +02:00
Bastien Montagne
ba3e9b3526 I18N: Add (enable) Khmer and Swahili languages. 2023-10-16 11:07:47 +02:00
Jeroen Bakker
6a34dc2853 Cleanup: Make format 2023-10-16 08:12:10 +02:00
Jacques Lucke
d76263de96 Merge branch 'blender-v4.0-release' 2023-10-15 20:50:12 +02:00
Damien Picard
fa5bb53f5c Fix: Python node_utils.connect_sockets broken after API change
After the recent introduction of node panels, the utility that
allowed scripters to connect sockets to or from a virtual socket was
broken. This happens when creating an interface before connecting
sockets. Sockets can have a subtype, while interfaces cannot.

For instance, the `NodeSocketFloatFactor` type cannot be used
directly, it has to be converted to `NodeSocketFloat`.

This commit chooses an appropriate type for the new interface before
creating it, based on the socket's `type` property.

Pull Request: https://projects.blender.org/blender/blender/pulls/113630
2023-10-15 20:38:43 +02:00
Hans Goudey
030932e8df Merge branch 'blender-v4.0-release' 2023-10-15 20:31:50 +02:00
Hans Goudey
601fba20a6 Fix #113619: Incorrect nested group assets in compositor add menu
The menu structure currently needs to be duplicated in the code to avoid
adding assets to more than one menu. This was done for geometry nodes
in b49c84276cba74299caa but was missed for the compositor and shader
nodes. Also remove an unnecessary separator.
2023-10-15 19:52:38 +02:00
Hans Goudey
d3151df74a Fix #113736: Add modifier menu broken for surface objects
This object type doesn't support geometry nodes currently.
2023-10-15 19:22:21 +02:00
Campbell Barton
2e0b844b36 Cleanup: spelling in comments 2023-10-14 13:53:00 +11:00
Pratik Borhade
d836aa7931 GPv3: Expose insert keyframe in menu
Create menu similar to legacy GP to expose insert keyframe operation in
user interface. Pressing `I` key will invoke this menu.
(We can further add "key duplicate" and other relevant operation in this menu)

Pull Request: https://projects.blender.org/blender/blender/pulls/113663
2023-10-13 14:07:21 +02:00
Campbell Barton
8768248924 Merge branch 'blender-v4.0-release' 2023-10-13 17:32:48 +11:00
Jeroen Bakker
6a147ef7c9 Cleanup: Make format 2023-10-13 07:38:24 +02:00
Campbell Barton
08e5f94a70 Fix #113309: Broken key-map after "Reload Scripts"
Regression caused by [0]. Resolve by adding a 'keep_properties' argument
to KeyConfig.update so the key-map items can be restored after the
operators have been reloaded.

[0]: 88a875ec3ae89b7a6d31b398aad02a415b519694
2023-10-13 14:37:48 +11:00
Campbell Barton
63586d0f6b Fix #113309: Broken key-map after "Reload Scripts"
Regression caused by [0]. Resolve by adding a 'keep_properties' argument
to KeyConfig.update so the key-map items can be restored after the
operators have been reloaded.

[0]: 88a875ec3ae89b7a6d31b398aad02a415b519694
2023-10-13 14:37:07 +11:00
Harley Acheson
3c4f84e0fc UI: Input Placeholders
Optional inline hint describing the expected value of an input field.

Pull Request: #112104
2023-10-12 11:44:08 -07:00
Harley Acheson
2c7d15b19c Merge branch 'blender-v4.0-release' 2023-10-12 10:33:29 -07:00
Bastien Montagne
86fb43d57a Merge commit '2d703e9200985122b4b953be67b452f7679bf113'
Conflicts:
	source/blender/nodes/NOD_node_declaration.hh
2023-10-12 18:56:12 +02:00
Harley Acheson
b688414223 UI: Type To Search And Space Bar Search
Continue allowing spacebar search for all dropdown and context menus,
but also add the ability to allow some menus to have type to search,
like Add Modifiers, Objects, Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/113520
2023-10-12 17:54:59 +02:00
Damien Picard
2d703e9200 I18n: add label declaration to node sockets so they can be shortened
In !112591, nodes got the ability to group sockets into panels. The
labels for these sockets are automatically shortened if they begin
with the same text as their parent labels. For instance, "Transmission
Weight" will be shortened to just "Weight" because it is under the
"Transmission" panel.

While this is a good heuristic for English, it breaks down in
languages which do not have the same word order.

This commit adds a `.short_label()` callback to socket declarations so
that a shortened label can be explicitly declared.

It also adds two regexps to the translation script so that these new
fields can be extracted to the .po translation files. One extracts the
label with a translation context, the other without. Only the one
without context is currently in use.

The current automatic shortening logic is kept and will be used only
if a shortened label is not manually provided.

Fixes #112970: Node socket labels under panels are not shortened when
translated.

Pull Request: https://projects.blender.org/blender/blender/pulls/113070
2023-10-12 17:51:37 +02:00
Clément Foucault
4bddbe85f6 EEVEE-Next: Move out of experimental options
See #93220
2023-10-11 20:38:28 +02:00
Clément Foucault
80a8368b88 EEVEE-Next: UI cleanup of render settings panel
- Rename Indirect Lighting panel to Light Probe
  and split options per probe type.
- Rename Probe to Light Probe in the world panel.
- Move the Ambient Occlusion distance to view
  layer.
- Rename the Ambient Occlusion tab to Horizon
  Scan (waiting for a better name).
- Split Sampling panel into viewport and render
  sub-panels.
- Rename Volumetrics to Volumes to match Cycles.
- Split light threshold to new Lights panel.
- Simplify shadow panel option names.
- Rename Viewport Denoising in Temporal Reprojection.
- Move Motion Blur panel above the film panel.
- Use / instead of & in raytracing panel.
- Fix graying out of raytracing denoise options.

Pull Request: https://projects.blender.org/blender/blender/pulls/113522
2023-10-11 20:27:30 +02:00
Clément Foucault
df523f3bf1 EEVEE-Next: Add back lightprobe influence
I had to do a huge refactor in order to do this.

The way ReflectionProbe were referencing the UBO
data was conflicting with the way EEVEE-Next
object should behave.

So like light, shadow and irradiance grids, every
probe is synced with it's GPU data as base struct
and the data is just copied into the UBO
when using `set_view`.

To simplify many parts of the reflection probe
code, I isolated the atlas coordinate of a probe
to its own struct that can be easily copied.

Pull Request: https://projects.blender.org/blender/blender/pulls/113518
2023-10-11 20:19:37 +02:00
Miguel Pozo
1ba16edaf0 EEVEE-Next: Rename light probes
Update to the new naming convention for `Light Probes`:

`Reflection Cubemap` -> `Sphere`
`Reflection Plane` -> `Plane`
`Irradiance Grid` -> `Volume`

Note that this breaks the Python API (`bpy.types.LightProbe.type`).

Pull Request: https://projects.blender.org/blender/blender/pulls/113452
2023-10-11 19:38:42 +02:00
Harley Acheson
e00bd55576 Merge branch 'blender-v4.0-release' 2023-10-11 08:26:58 -07:00
Harley Acheson
aa88d9a8e3 Revert "UI: Input Placeholders"
This reverts commit b0515e34f9319e3498cbec7e3b644b9342c06e69.
Unintentionally added to 4.0
2023-10-11 08:01:24 -07:00
Lukas Tönne
bf31f69e23 Merge branch 'blender-v4.0-release' 2023-10-11 15:42:19 +02:00
Lukas Tönne
73c35dbc22 Fix #113433: Avoid calling registered custom node function
Follow-up fix for #113330.

The `valid_socket_type` classmethod in node trees is only available on
custom node trees (but documentation does not say that). It cannot be
used to determine if the default float socket type is valid for built-in
node tree types. We have to assume this socket type is always valid for
built-in node trees, or the operator will try to call a non-existent
method.

Pull Request: https://projects.blender.org/blender/blender/pulls/113540
2023-10-11 15:41:41 +02:00
Philipp Oeser
ec5287bb39 Merge branch 'blender-v4.0-release' 2023-10-11 09:20:28 +02:00
Philipp Oeser
9783611518 Fix #113287: Industry Compatible Keymap: Node Editor Search missing
Caused by 974edc588547 / 7f9d51853c978ff

You can now type to search directly in the `Add` menu.
Bit unfortunate though that this is not mapped to any shortcut in the
`Industry Compatible` keymap anymore

I think we could just add TAB back (but this time, mapped to
`NODE_MT_add`).

Pull Request: https://projects.blender.org/blender/blender/pulls/113446
2023-10-11 09:19:19 +02:00
Harley Acheson
61dc86b0eb Merge branch 'blender-v4.0-release' 2023-10-10 15:48:29 -07:00
Harley Acheson
b0515e34f9 UI: Input Placeholders
Optional inline hint describing the expected value of an input field.

Pull Request: https://projects.blender.org/blender/blender/pulls/112104
2023-10-11 00:47:13 +02:00
Falk David
559c271a53 Clang-format 2023-10-10 16:59:56 +02:00
Falk David
3931a54e08 GPv3: Initial Geometry Nodes support
This implements the core changes for this design: https://devtalk.blender.org/t/grease-pencil-integration-into-geometry-nodes/31220

The changes include:
* Add `CustomData` for layer attributes
* Add attribute support for the `GreasePencilComponent` to read/write layer attributes. Also introduces a `Layer` domain.
* Implement a `GreasePencilLayerFieldContext` and make `GeometryFieldContext` work with grease pencil layers.
* Implement `Set Position` node for `Grease Pencil`.

Note: These changes are only accessible/visible with the `Grease Pencil 3.0` experimental flag enabled.
Co-authored-by: Jacques Lucke <jacques@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/112535
2023-10-10 16:49:30 +02:00
Jeroen Bakker
25a1cea8e2 EEVEE-Next: Scene Reflection Probe Resolution
This PR reuses the scene specific reflection probe resolution for all
reflection light probes in the scene. The target is to have a automatic
detection for the resolution. But as long as we don't have a mechanism
for detection it is better to not introduce a new UI element that will
be removed within the foreseen future.

This setting is currently used by EEVEE and EEVEE-Next. EEVEE supports
resolutions upto 4096px. This will be clamped to 2048 when using
EEVEE-Next.

The motivation for this is that EEVEE-Next will soon replace
EEVEE and 4096 can then be removed from the choices that the user can
made. Adding as separate option could need synchronization, and that
option would also be temporary as it will be removed by the resolution
detection mechanism.

Pull Request: https://projects.blender.org/blender/blender/pulls/113491
2023-10-10 14:50:17 +02:00
Clément Foucault
80a6a8efe9 EEVEE-Next: Ray-Tracing: Add Planar Tracing
This traces planar lightprobe captures just like
the screen-space tracing does.

This is implemented as a separate shader that
loads the ray before the screen trace and
check if it can be traced against any available
planar probe. If it does it marks the ray as
traced (negative pdf) so that the screen tracing
pass does not override the result or try to
trace it.

Pull Request: https://projects.blender.org/blender/blender/pulls/113453
2023-10-10 12:55:18 +02:00
Iyad Ahmed
87baecf33d Batch rename: add brush and scene data types
Ref !111772.
2023-10-10 20:36:00 +11:00
Brecht Van Lommel
5bb729b155 Merge branch 'blender-v4.0-release' into main 2023-10-09 19:19:11 +02:00
Richard Antalik
2098e29857 Fix #113258: Sound crossfade not working in meta strips
Traverse `sequences_all` instead of `sequences`.
2023-10-09 18:57:38 +02:00
Miguel Pozo
f54205cfdd EEVEE Next: Optional surfel backface culling
Allow disabling surfels backfaces from contributing to volume probes.

Pull Request: https://projects.blender.org/blender/blender/pulls/113362
2023-10-09 17:02:14 +02:00
Harley Acheson
311a3d5695 Merge branch 'blender-v4.0-release' 2023-10-09 07:58:47 -07:00
Harley Acheson
35d3d52508 UI: Search All Menus with Space Bar
Allow initiating the search of any named menu by pressing space bar.

Pull Request: https://projects.blender.org/blender/blender/pulls/113299
2023-10-09 16:56:16 +02:00
Jeroen Bakker
61b463d5e4 EEVEE-Next: Planar Probe Pipeline
This PR is contains the initial capture pipeline for planar probes.

It requires work to generate the correct view to capture and to include
the result during ray tracing. These will be developed in a separate PR.

This PR detects if a planar probe is active in the scene. If this is
the case the planar probe pipeline will be activated. During rendering
this is done by querying the depsgraph, during viewport drawing this
is done during sync. If an planar probe is detected and the pipeline
wasn't activated. The pipeline will be activated and the sampling
will be reset to ensure the pipeline is filled with all objects.

Per object the user can set the visibility of the object in planar
reflections.
![image](/attachments/fcfb40f9-f174-491c-bfba-e7f00f49aa1c)

For a reflection plane the resolution and clipping offset can be set.
EDIT: Resolution option was removed because too complex to
implement with the little time we have at the moment.
![image](/attachments/e42ad9ce-8af8-45d1-aa3a-630db1901ad3)

Related to #112966

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113203
2023-10-08 19:49:58 +02:00