Commit Graph

1183 Commits

Author SHA1 Message Date
Casey Bianco-Davis 33b4964c0c GPv3: Sample color
This adds the ability to use the `sample color` operator in GPv3

Pull Request: https://projects.blender.org/blender/blender/pulls/116235
2024-01-12 11:11:55 +01:00
Hans Goudey 6438d0ad1f Cleanup: Grammar in comments 2024-01-11 11:01:50 -05:00
Pratik Borhade 3d018fd0c7 GPv3: Expose subdivide operator in UI
Missed in 991902cb28

Pull Request: https://projects.blender.org/blender/blender/pulls/117013
2024-01-11 12:06:28 +01:00
SebastianWitt 406a2fde91 UV: improve performance for lightmap unwrap
Replaces this search by representing the 3 edge lengths of each triangle
as 3d points and searching with a KD-tree.

On a mesh with ~20k Tris the old method runs in 40s while the new method
takes 0.23s with a difference of <0.001%.

Ref !113720
2024-01-11 10:32:07 +11:00
SebastianWitt 7fa2a1071e Fix divide by zero error Lightmap Unwrap & small N-gons
Ref: !113716
2024-01-11 10:14:21 +11:00
laurynas 0d964f91a2 Curves: Add extrude operator
Adds extrude operator to new curves. Press key E in edit mode to invoke.
It works correctly on Bezier curves also, but result is weird as there is no
way to control Bezier handles interactively. Currently operator works the
same way as in old curves.

Algorithm idea is same as in https://archive.blender.org/developer/D15524

Pull Request: https://projects.blender.org/blender/blender/pulls/116354
2024-01-10 17:26:54 +01:00
laurynas 70fe812ef1 Curves: Add "As NURBS" option to draw tool
Add an option to output curves as NURBS instead of Bezier. The same
fitting algorithms are used. The only difference is that the drawing
result is a NURBS curve with Bezier knot mode, instead of a native
Blender Bezier curve.

Pull Request: https://projects.blender.org/blender/blender/pulls/116696
2024-01-10 13:59:59 +01:00
Bastien Montagne fc0ad04d30 Cleanup: Python Style: Fix lint buildbot error. 2024-01-10 10:45:07 +01:00
Richard Antalik 2942147079 Fix: Incorrect operator name in VSE retiming menu
Oversight when retiming operators were merged with strip operators.
2024-01-09 19:00:38 +01:00
Sybren A. Stüvel 5b8207fa97 Anim: bone collection context menu, prevent operations on linked
Prevent operating on linked bone collections via the tree view context
menu.
2024-01-09 12:50:48 +01:00
Philipp Oeser fb90654964 Fix #116011: Sorting Attributes by Name in UILists does not work
Whenever custom `filter_items` is used, everything regarding filtering
and sorting has to be implemented "by hand" here, this was just not done
for the sorting (which is now added).

Pull Request: https://projects.blender.org/blender/blender/pulls/116629
2024-01-09 09:26:06 +01:00
Campbell Barton 71af74622f Fix #115432: UV Follow Active Quads operator moves unselected vertices
Regression in [0] & [1]. Resolve by reverting most of [0],
restoring the original logic from 3.6.

The only significant changes kept are the use of selected UV faces
when called from the UV editor.

[0]: e0e3650495
[1]: 7b3e1cbb96
2024-01-09 16:49:52 +11:00
Alexander Gavrilov d0ef66ddff Drivers: implement fallback values for RNA path based variables.
As discussed in #105407, it can be useful to support returning
a fallback value specified by the user instead of failing the driver
if a driver variable cannot resolve its RNA path. This especially
applies to context variables referencing custom properties, since
when the object with the driver is linked into another scene, the
custom property can easily not exist there.

This patch adds an optional fallback value setting to properties
based on RNA path (including ordinary Single Property variables
due to shared code and similarity). When enabled, RNA path lookup
failures (including invalid array index) cause the fallback value
to be used instead of marking the driver invalid.

A flag is added to track when this happens for UI use. It is
also exposed to python for lint type scripts.

When the fallback value is used, the input field containing
the property RNA path that failed to resolve is highlighted in red
(identically to the case without a fallback), and the driver
can be included in the With Errors filter of the Drivers editor.
However, the channel name is not underlined in red, because
the driver as a whole evaluates successfully.

Pull Request: https://projects.blender.org/blender/blender/pulls/110135
2024-01-08 15:24:59 +01:00
Sybren A. Stüvel 2274f2be4b Anim: fix Solo Bone Collection operator
Fix the 'Show All' bone collection operator, by making it operate on all
collections instead of just the roots. It also now ensures that all
ancestors of the solo'ed collection are shown (otherwise it's the only
visible one, but given that its parent is hidden, it's still not
visible).

This also fixes a related issue, where calling the operator without
passing the `name` parameter would do nothing. Now it soloes the active
bone collection.
2024-01-08 14:34:10 +01:00
Sybren A. Stüvel ef5dd0e451 Anim: fix Show All Bone Collections operator
Fix the 'Show All' bone collections operator, by making it operate on all
collections instead of just the roots.
2024-01-08 14:34:10 +01:00
Bastien Montagne d13edee3e0 UI/Code: Fix typos and other UI messages issues. 2024-01-08 12:03:35 +01:00
Campbell Barton 5dd91346e1 Cleanup: remove unused imports 2024-01-08 11:40:53 +11:00
Campbell Barton 0ba83fde1f Cleanup: spelling in comments 2024-01-08 11:24:37 +11:00
Hans Goudey 890f553318 Cleanup: Format 2024-01-04 15:41:58 -05:00
Matias Mendiola b165b20cef GPv3: Move set uniform and set opacity operators to Stroke Menu
Due these two operators act on the stroke as a whole and to keep the menu ordering like GPv2

Pull Request: https://projects.blender.org/blender/blender/pulls/116764
2024-01-04 15:25:49 +01:00
Harley Acheson 29b1658124 UI: View As Render for Background Images
Add checkmark for "View as Render" to background
images in Properties / Camera data.

Pull Request: https://projects.blender.org/blender/blender/pulls/115120
2024-01-03 01:09:23 +01:00
Sybren A. Stüvel 65d25ed813 Anim: add `bone_collection.bones_recursive` property
Add a `bone_collection.bones_recursive` property that returns the set of
bones assigned to that bone collection or any of its child collections.

This property is implemented in Python, as that made it considerably
simpler to create the set semantics.
2024-01-02 16:55:55 +01:00
Harley Acheson 0251701cd6 Fix #116252: Corrections to Text Object Special Characters Menu
Small Corrections to the items on the Text / Special Characters menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/116677
2023-12-31 19:18:47 +01:00
Habib Gahbiche d0c53b58bc Cleanup: Make format
Pull Request: https://projects.blender.org/blender/blender/pulls/116643
2023-12-30 01:01:15 +01:00
Nate Rupsis 4ddb52a775 Anim: Action bake custom properties
Add custom properties to Action Bake.

objects will bake all animatable custom properties. Armatures will bake all bone custom properties,
as well as object (armature) custom properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/113208
2023-12-29 17:59:24 +01:00
Clément Foucault b7a7c2ac00 EEVEE-Next: Add lightweight deferred indirect lighting
This adds option to bypass the raytracing pipeline
entirely and use a cheaper evaluation option.

This reuse the same evaluation as the Blended materials.

This exhibits some artifacts on Apple hardware due to
synchronization issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/116622
2023-12-29 08:34:19 +01:00
Sybren A. Stüvel 129fb2eab8 Anim: make bone collections hierarchical
Make it possible to nest bone collections. The data structure on the
armature is still a flat array. It is organised as follows:

- Sibling collections (i.e. ones with the same parent) are stored
  sequentially in the array.
- Each bone collection keep track of the number of children, and the
  index of the first child.
- Root collections (i.e. ones without parent) are stored as the first
  elements in the array.
- The number of root collections is stored on the Armature.

This commit also contains the following:

- Replaced the flat UIList of bone collections with a tree view.
- Updated the M/Shift+M operators (move/assign to collection) to work
  with hierarchical bone collections.
- Updated RNA interface to expose only root collections at
  `armature.collections`. All collections are available on
  `armature.collections.all`, and children at `bonecollection.children`.
- Library override support. Only new roots + their subtrees can be added
  via overrides.

See https://projects.blender.org/blender/blender/issues/115934

Co-authored with @nathanvegdahl and @nrupsis.

Pull Request: https://projects.blender.org/blender/blender/pulls/115945
2023-12-28 18:14:55 +01:00
Andres Stephens 369f1fe4e2 Fix #116558: Console error due to missing property use_template_override
`use_template_override` experimental option was removed in 25ab53a4af.
But property was still mentioned in preference panel which results in console
error.

Pull Request: https://projects.blender.org/blender/blender/pulls/116559
2023-12-27 12:52:24 +01:00
Jeroen Bakker 2bb7d767c4 EEVEE-Next: Add Raytracing Presets
This PR adds raytracing presets. It contains a preset with default settings and
users are able to add their own.

Pull Request: https://projects.blender.org/blender/blender/pulls/116223
2023-12-24 22:17:31 +01:00
Aras Pranckevicius 0fb89c2301 IO: remove experimental label from C++ based STL import/export
The Python STL addon got "legacy" labels added
2023-12-23 23:11:09 +02:00
Christoph Lendenfeld b27718a9e7 Anim: Graph Editor Scale From Neighbor
Combination of two operators by Ares Deveaux
#106524 and #106523

Introduces a new operator "Scale from Neighbor"
that scales selected keyframe segments from either
the left or right keyframe neighbor.

Pressing "D" during modal operation will switch
from which end of the segment the scaling happens.

This is useful to make a section of animation closer to a pose on either side.

Co-authored-by: Ares Deveaux <aresdevo@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112387
2023-12-21 10:46:43 +01:00
Lukas Tönne e470edf3e1 Geometry Nodes: initial Volume Grid socket support
This is the initial implementation for the volume grid sockets that has been
discussed during the November 2023 geometry nodes workshop.

It adds initial support for passing volume grids around in sockets. Furthermore,
it adds two new nodes. Both are initially hidden under the "New Volume Nodes"
experimental option until we have a few mode nodes.
* **Get Named Grid**: Gets or extracts a volume grid from a volume geometry
  based on the grid's name.
* **Store Named Grid**: Puts a volume grid back into a volume with a name.

`SocketValueVariant` is extended to support grids besides single values and fields.

Next steps:
* Implement grid socket shape and inferencing (currently, they just look like
  single values).
* Add implicit conversions between grid types.
* Implement nodes that operate on the grids (#116021).
* Improved spreadsheet and viewer support.

Links:
* https://devtalk.blender.org/t/volumes-in-geometry-nodes-proposal/31917
* https://devtalk.blender.org/t/2023-11-06-geometry-nodes-workshop-notes/32007#volumes-3

Co-authored-by: Jacques Lucke <jacques@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/115270
2023-12-20 22:33:17 +01:00
Campbell Barton 06705c5864 PyAPI: support bpy.utils.register_tool without a keyconfig set 2023-12-20 13:05:20 +11:00
Hans Goudey 8dd8f932e2 Cleanup: Rename Mesh loop_data to corner_data
Related to #110434, efbee2d606, 7c69c8827b
2023-12-19 20:39:05 -05:00
Campbell Barton c59b9ff9c2 Fix #105548: I18n: many keymap sections cannot be translated
Ensure tool keymaps are registered when calling:
bl_keymap_utils.keymap_hierarchy.generate() in background mode.

This is an alternative to !116299 that doesn't require keymap
initialization in background mode.
Thanks to Damien Picard's for reporting & investigating this issue.
2023-12-20 11:54:52 +11:00
Aras Pranckevicius a95dd8438d VSE: add option to display half of audio waveform
Default is "full" waveform display. Adds overlay option to display absolute
value of the signal as upper half only. Part of design task #115274

Pull Request: https://projects.blender.org/blender/blender/pulls/116344
2023-12-19 18:52:38 +01:00
Aras Pranckevicius 4805b4f13f VSE: more intuitive UI control for waveform display mode
Use a more consistent radio selection for waveform display, not an
enum-radio hybrid. Part of design task at #115274

Pull Request: https://projects.blender.org/blender/blender/pulls/116336
2023-12-19 18:49:28 +01:00
Damien Picard faefaa4447 I18n: extract and disambiguate a few messages
Extract:
- Compositor error messages.
- `bUnitDef`s were broken after cleanup commit 2b77cd726d. Since each
  unit's "display name" is now preceded by a consistent "name_display"
  comment, the regex which extracts the unit is greatly simplified.
  It now relies on the presence of the comment instead of the struct
  order.
- "Preset" menu and "Apply Preset" button from the curveprofile
  template.
- Operator labels from the catalog context menu.

Disambiguate:
- "Bake Data": can mean "Which data to bake" (verb), or "The data that
  were baked" (noun).
- "Cache" in the Simulation Nodes panel is a verb, not a noun.
- "Mix" in the snapping menu is a noun, not a verb.
- "Top" and "Bottom" can mean the upper part of an object or the
  highest point or element of something like a menu or list.

Pull Request: https://projects.blender.org/blender/blender/pulls/115963
2023-12-19 18:41:09 +01:00
Jeroen Bakker 76a1a29643 Cleanup: Make format 2023-12-19 14:19:39 +01:00
Julian Plak b85011aee0 Geometry Nodes: initial display of attribute values as text in 3d viewport
Previously, attribute values were only visualized as color overlay in the 3d viewport.
Now it's possible to optionally show the attribute values as text. This can be enabled
in the `Viewer Node` overlay settings in the 3d view.

This is just the first initial version. More work towards making it look better
will be done next.

Pull Request: https://projects.blender.org/blender/blender/pulls/115664
2023-12-19 13:30:16 +01:00
Sun Kim ae684ef81f Cycles: Display message in Render Devices preferences when disabled
When the add-on is disabled or the feature is disabled in the build,
show an informative message instead of empty space.

Pull Request: https://projects.blender.org/blender/blender/pulls/116324
2023-12-19 12:03:22 +01:00
Sybren A. Stüvel b70ebf96e7 Anim: bone collections, split `ARMATURE_OT_collection_assign` in two
Split the `armature.collection_assign` operator in two. Before, the
operator could do two things: assign selected bones to the active/named
bone collection, or create a new bone collection with the given name.

This is now split up, where `armature.collection_assign` only assigns to
existing bone collections, and `armature.collection_create_and_assign`
always creates a new bone collection.

This makes the purpose of each operator clearer & more predictable.
2023-12-19 10:41:57 +01:00
Campbell Barton e87b67398c Extensions: add/remove bl_ext sub-modules when repo.enabled is toggled
This disables any add-ons which are part of the disabled repository.
2023-12-19 18:41:37 +11:00
Campbell Barton 0ec50b56ad Extensions: add option to enable/disable an extensions repo
Note that this option isn't used from Blender, it's up to
scripts that use extensions repositories to respect the setting.
2023-12-19 18:11:17 +11:00
Campbell Barton 9f1de06414 Cleanup: remove f-string usage 2023-12-19 10:17:49 +11:00
Dalai Felinto 0681180413 Fix #116280: bpy.ops.wm.url_open() cannot open file:///
This issue was introduced on a15c637e63.

Ref: #116295
2023-12-18 16:46:46 +01:00
Jacques Lucke 00eaddbd51 Geometry Nodes: new Bake node
This adds a new `Bake` node which allows saving and loading intermediate geometries.
Typical use cases we want address with this currently are:
* Bake some data for use with a render engine.
* Bake parts of the node tree explicitly for better performance.

For now, the format that is written to disk is not considered to be an import/export format.
It's not guaranteed that data written with one Blender version can be read by another
Blender version. For that it's better to use proper interchange formats. Better support for
those will be added eventually as well. We also plan an `Import Bake` node that allows
reading the blender-specific baked data independent of the Bake node and at different frames.

The baking works very similar to the baking in the simulation zone (UI and implementation
wise). Major differences are:
* The Bake node has a `Bake Still` and `Bake Animation` mode.
* The Bake node doesn't do automatic caching.

Implementation details:
* Refactored how we create the Python operators for moving socket items so that it also
  makes sense for non-zones.
* The `ModifierCache` stores an independent map of `SimulationNodeCache` and
  `BakeNodeCache`, but both share a common data structure for the actually baked data.
* For baking, the `Bake` node is added as a side-effect-node in the modifier. This will make
  sure that the node is baked even if it's currently not connected to the output.
* Had to add a new `DEG_id_tag_update_for_side_effect_request` function that is used
  during baking. It's necessary because I want to evaluate the object again even though none
  of its inputs changed. The reevaluation is necessary to create the baked data. Using
  `DEG_id_tag_update` technically works as well, but has the problem that it also uses the
  `DEG_UPDATE_SOURCE_USER_EDIT` flag which (rightly) invalidates simulation caches
  which shouldn't happen here.
* Slightly refactored the timeline drawing so that it can also show the baked ranges of
  Bake nodes. It does not show anything for baked nodes with a in Still mode though.
* The bake operator is refactored to bake a list of `NodeBakeRequest` which makes the
  code easier to follow compared to the previous nested
  `ObjectBakeData > ModifierBakeData > NodeBakeData` data structure.
* The bake operators are disabled when the .blend file is not yet saved. This is technically
  only necessary when the bake path depends on the .blend file path but seems ok to force
  the user anyway (otherwise the bake path may be lost as well if it's set explicitly).
* The same operators are used to bake and delete single bakes in `Bake` nodes and
  `Simulation Zones`. On top of that, there are separate operators of baking and deleting all
  simulation bakes (those ignore bake nodes).
* The `Bake` node remembers which inputs have been fields and thus may be baked as attributes.
  For that it uses an `Is Attribute` flag on the socket item. This is needed because the baked data
  may still contain attribute data, even if the inputs to the bake node are disconnected.
* Similar to simulation zones, the behavior of `Bake` nodes is passed into the geometry nodes
  evaluation from the outside (from the modifier only currently). This is done by providing the
  new `GeoNodesBakeParams` in `GeoNodesCallData` when executing geometry nodes.

Next Steps (mostly because they also involve simulations):
* Visualize nodes that have not been evaluated in the last evaluation.
* Fix issue with seemingly loosing baked data after undo.
* Improve error handling when baked data is not found.
* Show bake node in link drag search.
* Higher level tools for managing bakes.

Pull Request: https://projects.blender.org/blender/blender/pulls/115466
2023-12-18 13:01:06 +01:00
Campbell Barton 7e7f257c10 Cleanup: use static set to test against multiple literals 2023-12-18 10:42:46 +11:00
Brecht Van Lommel 4b543a66e3 Fix: mistake in previous formatting cleanup 2023-12-17 19:53:54 +01:00
Brecht Van Lommel 84591ac1a7 Cleanup: make format 2023-12-17 16:18:21 +01:00
Prikshit singh c6720f997d Fix #116099: Shader to RGB not in menu in EEVEE Next
Now it is visible in both EEVEE Legacy and EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/116182
2023-12-17 16:17:17 +01:00
Hans Goudey 0e8c874166 Curves: Add edit mode tilt control
Adds support for the tilt transform operator and a "Clear Tilt"
operator to mirror the functionality from the legacy curve type.
2023-12-16 12:08:28 -05:00
Hans Goudey 912c4c60d8 Mesh: Add viewport normals simplify option
Before #108014, toggling "Auto Smooth" was an easy way to disable
evaluation of custom normals and face corner normals for faster
viewport playback performance. Now that corner normals are calculated
automatically as necessary, it's helpful to still have a way to disable
expensive normal computation for faster playback.

This commit adds a "Normals" scene simplify setting. To avoid a bunch
of complexity, it just influences which normals are requested from the
object by viewport rendering. In my tests, skipping calculating at
least doubled viewport FPS in a few test files with a large mesh with
custom normals. This works well because normals are cached and lazily
calculated.

Pull Request: https://projects.blender.org/blender/blender/pulls/113975
2023-12-16 00:18:41 +01:00
Jeroen Bakker a52a362527 Studiolights: Remove Unused Options
Studio lights had gone over several iterations during 2.80. Some
unused options where still in the code, but not used.

This PR cleans up the studio lights to options that are still in use.
Removing:

- Spherical Harmonics: It was used by workbench, but was replaced
  by regular OpenGL lights
- Irradiance textures: Was used by an old eevee world light evaluation
- Cached data files.

Pull Request: https://projects.blender.org/blender/blender/pulls/116186
2023-12-14 14:29:28 +01:00
Christoph Lendenfeld 1e931f5bd7 Anim: Bake Channel operator
This is a replacement for the workflow that uses
"Bake Curve" and "Unbake Curve" to quickly generate
dense key data.

Compared to the existing workflow it has the advantage
of allowing the user more control over the key types,
and distance between keys, as well as the frame range affected.

Operator options

* Range: the range that will be baked.
Defaults to the scene range or preview range.

* Step: Distance between keyframes.
Can be used to bake on 2s or even bake to subframes.

* Remove Existing Keys: Boolean option that
if enabled also removes keys outside the specified baking range

* Interpolation Type: Choose a interpolation mode used
for new keys e.g. Constant or Bezier

* Bake Modifiers: If enabled bakes the effect of the
modifier stack to keys and deletes the modifier stack.
If false, the code disables the modifiers before baking,
so the resulting keys will behave as if the modifiers didn't exist

The operator can be found in the Graph Editor under `Channel->Bake Channels`

Part of: #111050

Pull Request: https://projects.blender.org/blender/blender/pulls/111263
2023-12-14 11:35:25 +01:00
Andres Stephens 5c868e92d6 Fix #115581: Channel Context Menu mis-labeled
The context menu for the channels is shared
between all animation editors.
Changed "Dope Sheet Channel" label to "Channel"
for consistent channel label in all animation editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/115845
2023-12-14 09:09:30 +01:00
Germano Cavalcante f83180370a Fix #115590: UV window menus disappearing
Due to lack of forward compatibility, tool_settings.snap_uv_element
could return empty if a 4.0 file is opened in 3.6.

This causes a Python error when trying to identify the element's icon.

Avoid this python error.
2023-12-13 13:54:18 -03:00
Kenzie 3f485c8bf3 Geometry Nodes: add support for blackbody shader node
This adds the existing Blackbody shader node to geometry nodes, with the
same functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/114768
2023-12-13 10:10:06 +01:00
Douglas Paul 75f160ee96 Geometry Nodes: Add Active Camera input node
This adds a new "Active Camera" input geometry node, per #105761.

The node outputs the the scene's current active camera. It is available
from Input > Scene > Active Camera in the geometry nodes Add menu.

Typical usage would be to connect this node to an Object Info node to
obtain its transform. This works as expected when the camera's
transform is animated, and also when there are markers on the timeline
that change the active camera.

In order to support the aforementioned changes in the active camera,
this implementation adds depsgraph relations for all cameras referenced
by timeline markers. This eliminates the complexity of updating the
depsgraph whenever the scene switches to a different active camera,
but of course it comes at the cost of including more objects than
strictly necessary in the depsgraph for scenes that switch cameras.
Dynamically updating the depsgraph upon camera changes could be a
future improvement if there proves to be sufficient need for it.

Pull Request: https://projects.blender.org/blender/blender/pulls/113431
2023-12-12 19:11:06 +01:00
Hans Goudey c02784bd4f Cleanup: Make format 2023-12-11 15:47:11 -05:00
Hans Goudey dcf9d74cba Cleanup: Remove unused curves keymap items 2023-12-11 15:47:11 -05:00
Hans Goudey 9af176bfe6 Curves: Add edit mode duplicate operator
Reuse the grease pencil implementation added in:
- fb275bc040
- 5799a26568819ce27e8c12df96b7ffba84cc00f9
2023-12-11 15:47:11 -05:00
laurynas feae0b4173 Curves: Support for edit mode draw tool
Adds new curves support to "Draw Curve" operator. This is a direct copy
and replace of the old code to the new editors directly, with a change to
create the new data structure instead of the old one. There is no attempt
at code deduplication, since that would complicate removing the old
curve type when it comes time.

To replace the "2D curve" option a new operator property is added
for projecting to the Z=0 plane.

Pull Request: https://projects.blender.org/blender/blender/pulls/115864
2023-12-11 19:44:19 +01:00
Bastien Montagne 5179e1e7d7 I18N: Enable Belarusian language in UI translations. 2023-12-11 12:54:59 +01:00
Damien Picard 6d70e9b05f UI: fix and improve a few messages
- "Frame Step" -> "Number of frames to skip forward while baking each
  frame": expand description which was just copying the prop name.
- "b-bone" -> "B-Bone": title case.
- "Volumes Lighting" -> "Volume Lighting": typo.
- "Volumes Shadows" -> "Volume Shadows": typo.
- "Insert Blank Keyframe (All Layer)" -> "(All Layers)": typo.
- "the an" -> "an", typo.
- "Inverse" -> "Invert": use verb instead of noun for an action.
- "Desination" -> "Destination": typo.
- "Hides all other F-Curves other than the ones being framed": remove
  extra "other".
- "Remove Bone from Bone collections" -> "Collection", singular because
  the operator is only applied to the active collection. Also title
  case on "Collection".
- "Change Stroke material with selected material" -> "Assign the
  active material slot to the selected strokes": rephrase by reusing
  the message from the non-Grease Pencil materials.
- "VisAction", "VisArea" -> "Visibility Action", "Visibility Area":
  expand abbreviation. This is not exposed in the UI right now but
  will show up in the API docs.
- "Stop Mode Right / Global Down" -> "Stop Move" (typo).
- "... for node input  %s": remove extra space.
- "Move along their normal" -> "Move shadows along their normal":
  rephrase unclear sentence.
- "Stat Vis" -> "Mesh Analysis": stands for "Statistical
  visualization"? Unclear and not shown anywhere. Reuse the label
  specified in the UI code instead.
- " Output data...": remove leading space.
- "Attribute domain for the selection and group id inputs": title case
  on "Selection" and "Group ID" as that is how they appear in the UI.
- "Ior" -> "IOR": uppercase acronym, for consistency.

Pull Request: https://projects.blender.org/blender/blender/pulls/115964
2023-12-11 00:23:03 +01:00
Clément Foucault ae70d25959 EEVEE-Next: Refactor Raytracing pipeline
This de-duplicate some passes in the raytracing
pipeline and make it more ready for adoption
of arbitrary closure evaluation. This last part
means the removal of some per closure type
options.

The put in common the tile classification step
that is now done only once for all 3 closure
type. Also add some speedup to the tile
compaction phase that is now only twice
faster.

The horizon-scan setup was also de-duplicated
and run only if needed, which can save up to
0.5ms is complex scenes.

However, this moves the max-roughness and and
resolution scaling to a common parameter.
This is to be able to support arbitrary closure
evaluation where multiple closure with conflicting
parameters could be evaluated in one tracing pass.

Pull Request: https://projects.blender.org/blender/blender/pulls/116009
2023-12-10 21:38:23 +01:00
Guillermo Venegas 7c5fa8bf6c IO: Add initial support for File Handlers registration
Adds initial support for File Handler registration with the python API
for design task #68935. File Handlers will allow developers to associate
additional UI behavior and capability to operators traditionally used
only within the file browser.

The initial commit should have no user visible changes, but will serve
as the foundation for providing file drag & drop capabilities to
operators that can manage files (#111242).

See the PR for an example of python usage.
See design task #68935 for remaining work to be explored in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/112466
2023-12-09 05:06:10 +01:00
Pratik Borhade 2e5d4a8799 GPv3: Clean loose points operator
Similar to the legacy operator. Removes strokes with a number of points less than or equal to the "limit" property.
Resolves #113599.

Pull Request: https://projects.blender.org/blender/blender/pulls/115923
2023-12-08 16:53:09 +01:00
Campbell Barton 91319641eb Fix bpy.context.copy() including evaluated_depsgraph_get 2023-12-08 22:15:52 +11:00
Campbell Barton 9ddd5126fe Fix #115887: Fallback tool only tweaks single elements
Use the same pass-through option when the select tool is used as a
fallback.
2023-12-08 18:09:51 +11:00
Casey Bianco-Davis 4dcda1ec12 GPv3: Overlay: Show edit lines option
Adds option to only show edit mode lines overlay, and also adds overlay options panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/115739
2023-12-07 11:42:06 +01:00
Pratik Borhade 31ee0a2a3e Fix: GPv3: Missing add layer option in menu when list is empty
There was a mistake in 671f428ead. When the layers list is empty, the operator to add a new
layer will be missing in the "Active Layer" menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/115785
2023-12-07 10:51:44 +01:00
Hans Goudey 53418fc3a1 Sculpt: Separate invert visibility operator from face sets
Remove "Invert Visible" from the face sets menu, since those concepts
are no longer tied together, except for some convenience features to
toggle visibility of some face sets.

On the code side, the `SCULPT_OT_face_set_invert_visibility` operator
is replaced by `PAINT_OT_visibility_invert`. It inverts vertex visibility
instead of face visibility, which mostly has the same results, except
for multires sculpting where it no longer "downgrades" visibility to
base mesh faces.
2023-12-06 23:33:46 -05:00
Campbell Barton 3d0731e66c Fix #115827: Follow active quad fails with an assertion
Replace check for Mesh.uv_layers with BMesh layer check
and report other failures which weren't accounted for.
2023-12-06 20:14:05 +11:00
Falk David 35b9e37295 Fix #115716: Empty Grease Pencil Keymap Warning
This fixes the keymap warning by removing (commentting) the empty
keymap. Once we have something to assign, we can uncomment it.

Pull Request: https://projects.blender.org/blender/blender/pulls/115796
2023-12-05 14:45:52 +01:00
Falk David 5fea1eda36 GPv3: Drawing Placements
This PR adds the drawing placement modes from GPv2.

The drawing placement defines the depth (origin, view, surface, etc.) and a plane (view, cursor, xz, etc.).

This introduces a new helper class `DrawingPlacement` that does all of the internals to find the correct projection and just exposes a simple function to project from screen space to the drawing plane/surface.

Note: Drawing on other strokes currently doesn't work, because GPv3 can't be rendered to image yet. We use the depth buffer of the grease pencil render result to find the right depth.

Pull Request: https://projects.blender.org/blender/blender/pulls/115602
2023-12-05 11:01:42 +01:00
Habib Gahbiche 153f14be2b Compositor: Make split viewer a regular split node
Changes:
- Renamed Split Viewer Node to Split Node
- Split Node is now under `Utilities` (similar to Switch node)
- Versioning: split viewer from 4.0 and before is replaced with the new split node connected to a new viewer node.

Pull Request: https://projects.blender.org/blender/blender/pulls/114245
2023-12-03 23:20:44 +01:00
Harley Acheson 8933284518 UI: Icons for Area Join and Swap
Icons provided by Alexey Adamitsky to represent screen area join and
screen area swap.

Pull Request: https://projects.blender.org/blender/blender/pulls/115712
2023-12-02 20:08:01 +01:00
Campbell Barton 32c5ea6262 Cleanup: format 2023-12-02 14:56:12 +11:00
Nate Rupsis 2cc6519692 Anim: Refactoring NLA menu into more sensible format
Updating NLA menu to be more inline with VSE / other Animation editors.

Remove "Edit" drop down, and instead split operators into "Track" & "Strip" Menus. Update Add menu to be more concise.

Pull Request: https://projects.blender.org/blender/blender/pulls/114805
2023-12-01 20:11:02 +01:00
Philipp Oeser 6d3e9f1fe8 Fix #115276: Vertex group canvas picker errors with no active group
While in weight paint mode, `ob.vertex_groups.active` can be None.
This happens when selecting a non-deforming bone, or a deforming bone
that doesn't have a group yet.

Now check for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/115666
2023-12-01 17:55:29 +01:00
Hans Goudey 0978f9486e Sculpt: Remove redundant "reveal all" operator
This operator (`SCULPT_OT_reveal_all`) is redundant with
the "Hide Show" operator (`PAINT_OT_hide_show`). Since
the latter was recently changed to be much faster, remove the
former and update keymaps and menus. The industry compatible
keymap actually already contains the hide/show operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/115629
2023-12-01 17:32:09 +01:00
Philipp Oeser fe59704b52 UI: enable immediate typing for 'Select Pattern" operator
Saves a click so the "pattern" field has immediate focus.

Pull Request: https://projects.blender.org/blender/blender/pulls/115658
2023-12-01 16:09:56 +01:00
Christoph Lendenfeld 24ae0e3666 Fix: script_validate_keymap test failed
The issue was that `("value", True)` was passed in
when this is not supported. It didn't break while running
but it did break the test.
2023-12-01 15:32:32 +01:00
Daiki Hashimoto edcac1f48b Fix #44834: Add bone selection icon next to face and vertex selection in weight paint mode
Currently, in weight paint mode, there is an icon for
face and vertex selection mode, but there isn't one
for the default mode where the user can select a bone
in any tool by alt clicking.
This lack of indication might lead to confusion for the users
when they are not able to select a bone by
alt clicking during weight painting.

By adding a bone selection icon when there is a pose
mode armature, we can communicate to the user that:
1. they can select a bone while the bone selection icon is active.
(when they are not in face or vertex selection mode)
2. they have forgot to select an armature when entering
weight paint mode by not showing the bone selection
icon at all when there is no pose mode armature.

When the bone selection icon is inactive,
the user can't select a bone.
(alt clicking selects face and vertex mode's respective element)

When no armature is selected when entering weight paint mode,
the bone selection icon doesn't show up indicating that the user
has forgot to select an armature.
(The user is also unable to select a bone by alt clicking.)

## Selection tool for bone selection mode
Currently, while selection tools exist for face and vertex
selection mode, one doesn't exist for the default mode
(bone selection mode). As the default mode will be getting
a clear indicator that it will function as a bone selection mode,
I added a selection tool entry for the bone selection mode.

Face and vertex selection modes has the shortcut 1 and 2,
so it seemed natural to give bone selection mode the shortcut of 3.

Pull Request: https://projects.blender.org/blender/blender/pulls/115409
2023-12-01 13:38:58 +01:00
Antonio Vazquez 11f606f88f GPv3: Menu to Select Material using `U` key
This PR includes the popup menu used to select a material pressing `U` key.

The menu is used in Draw, Sculpt and Vertex paint mode in GPv2 but this patch only includes Draw mode because other modes are not avaliable in GPv3 yet.

Related to #114203

Pull Request: https://projects.blender.org/blender/blender/pulls/114694
2023-12-01 13:12:10 +01:00
Matias Mendiola b8a785b65b GPv3: Show and hide layers operators
- New Operator: GREASE_PENCIL_OT_layer_hide
- New Operator: GREASE_PENCIL_OT_layer_reveal
- Added menus to Edit and Draw Modes
- Added Keymap via _template_items_hide_reveal_actions()

Note: Operator names were changed for consistency with other layers operators that use _layer_ on their names

Pull Request: https://projects.blender.org/blender/blender/pulls/114348
2023-12-01 12:55:30 +01:00
casey bianco-davis fb275bc040 GPv3: Duplicate Points operator
Adds the duplicate points operator fallowing the legacy system.

Resolves #113640
Pull Request: https://projects.blender.org/blender/blender/pulls/115389
2023-12-01 10:14:14 +01:00
Nate Rupsis da83b2951d Anim: Add "Add/delete" track operations to NLA context menu
Updating NLA context menu, adding in more relevant track operations (tracks add, tracks add above, tracks delete).

Pull Request: https://projects.blender.org/blender/blender/pulls/114202
2023-11-30 17:15:06 +01:00
Clément Busschaert 671f428ead GPv3: "Set Active Layer" operator and menu
Resolves #113915 .

Ports the `layer_active` operator to set the active layer from an index.
Adds the menu to set the active layer from a list.

Pull Request: https://projects.blender.org/blender/blender/pulls/115606
2023-11-30 16:10:06 +01:00
Germano Cavalcante 14c2f6856a Suppress warnings by removing unused properties from keymaps
Between Blender versions, properties of some operators may be removed.

When this happens, when importing the keymap from the previous version,
a series of warnings may appear in the console. For example:
```
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_translate'
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_rotate'
Warning: property 'alt_navigation' not found in item 'TRANSFORM_OT_resize'
Warning: property 'alt_navigation' not found in item 'VIEW3D_OT_edit_mesh_extrude_move_normal'
...
```

Therefore, it seems to be convenient to edit these properties when
versioning.

This commit implements a `remove_properties` utility that makes this
removal simpler.

Pull Request: https://projects.blender.org/blender/blender/pulls/114936
2023-11-30 12:22:47 +01:00
Damien Picard 3f5fd74953 Fix #95045: UI: keymap header in preferences truncated when filtering
Show untruncated headers in keymap editor while filtering.

Pull Request: https://projects.blender.org/blender/blender/pulls/114012
2023-11-29 22:36:05 +01:00
Lukas Tönne 5bc82b5b7c Geometry Nodes: Remove experimental volume nodes
The new grid socket (#115270) will make these nodes obsolete and
provide more elegant ways of implementing the features. Removing
these nodes now to clean up and make future changes simpler.

Pull Request: https://projects.blender.org/blender/blender/pulls/115567
2023-11-29 16:02:06 +01:00
Antonio Vazquez b9fba005bd GPv3: Lock unselect materials operator
Conversion of GPv2 operator

Pull Request: https://projects.blender.org/blender/blender/pulls/115278
2023-11-28 16:38:59 +01:00
Philipp Oeser a4b8d214c6 Fix #115140: Crash undoing painting on linked image from 3DView
Related commit: 82aa300e1c / 5596f79821

82aa300e1c made it so that if only linked images are used, painting
would be prohibited. But since painting in Material mode actualy paints
across all materials it could happen that one particular image is linked
whereas another image isnt. In this case, painting on the linked image
would not be prohibited.

Two issues:

- [1] logic in above commit(s) seems slightly wrong, we could still pass
the check for linked images (also no image here should also not result
in a positive check I think).

- [2] code in `project_paint_prepare_all_faces` would still work with
linked images in slots, so
-- `ProjPaintState` -> `image_tot` was incremented
-- `ProjPaintImage` was created
-- this then ends up in the undo push - and crashes on undo

So now [1] is rectified and for [2] we skip faces with associated linked
images.

In addition, slots with linked images are now also greyed out in the UI
(`VIEW3D_PT_slots_projectpaint`) to give some sort of hint. For the
future it would probably also be good to dissallow selection of such
paint slots, but that is for another commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/115263
2023-11-28 12:05:07 +01:00
Bastien Montagne a0aaee4caf I18N: UI Translatiion: Add Belarusian language entries.
Skipped for now, until we have actual translations available.
2023-11-28 11:17:39 +01:00
Clément Foucault ab7505c7ce EEVEE-Next: Disable distant light if world contains absorption
This restrict the usage of distant light if the world shader
contains absorption phenomenon.

Why this is needed is described in #114062.

At the same time, this removes the parameter for enabling
volume light as this is now an auto-detected optimization.

This also contains a few small cleanups.

Pull Request: https://projects.blender.org/blender/blender/pulls/115284
2023-11-24 13:51:07 +01:00
Christoph Lendenfeld 30b0c5b225 Fix: Inserting keys no longer sets the FCurve channel color
When pressing `I` in the viewport, the colors of the FCurve channels were no longer set correctly.

Caused by #113504

Fix by removing the flag that determined that in the first place,
and read straight from the user preferences. Then move the code
that sets the mode on the FCurve into the function that actually creates it.

For 99% of cases the code went to the user preference flag `AUTOKEY_FLAG_XYZ2RGB`
and if that was set, the `INSERTKEY_XYZ2RGB` would be set. The only case where this
was not from the user preferences was from custom keying sets.
There was an override flag for FCurve colors on custom keying sets.
I removed that with this patch since the use case is not apparent
and custom keying sets are hardly used.

Pull Request: https://projects.blender.org/blender/blender/pulls/115297
2023-11-24 13:05:10 +01:00
Jacques Lucke ea98c39c50 Cleanup: remove debug print 2023-11-24 09:52:50 +01:00
Antonio Vazquez 9d8283d113 GPv3: Hide Others operator
This operators hide all materials except the active one.

There is a parameter to hide only active as it was in GPv2.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115038
2023-11-23 16:03:30 +01:00
Antonio Vazquez 1d6a617aa2 GPv3: Lock and Unlock all materials operators
This is the conversion of existing operators in GPv2.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115041
2023-11-23 15:36:05 +01:00
Antonio Vazquez eb935bf32d GPv3: Lock Unused Materials operator
Conversion of GPv2 operator.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115272
2023-11-23 15:31:47 +01:00
Clément Foucault 6f1ed59c4d EEVEE-Next: Display render pass panel in viewport 2023-11-22 16:57:21 +01:00
Hans Goudey 8d5aa6eed4 Geometry Nodes: Index switch node
Add an "Index Switch" node which is meant as a simpler version of
the "Menu Switch" from #113445 that doesn't allow naming items
or displaying them in a dropdown, but still allows choosing between
an arbitrary number of items, unlike the regular "Switch" node.
Even when the Menu Switch is included (which should be in the
same release as this), it may still be helpful to have explicit mapping
of indices, and a fair amount of the internals can be shared anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/115250
2023-11-22 16:11:32 +01:00
Hans Goudey ba1c8fe6a5 Mesh: Improve remesh attribute transfer
Currently we have options to transfer the paint mask, face sets, and
color attributes to the new mesh created by voxel remesh. This doesn't
make use of the generic attribute design, where it would be clearer to
transfer all attributes with the same methods. That's reflected in the
code as well-- we do duplicate work for the mask and vertex colors, for
example.

This commit replaces the transfer options with a single checkbox for
all attributes. All attribute types on all domains are transferred with
basically the same method as the "Sample Nearest" node from geometry
nodes-- they take the value from the nearest source element of the same
domain. Face corners are handled differently than before. Instead of
retrieving the mixed value of all the corners from the nearest source
vertex, the value from the nearest corner of the nearest face.

---

Some timing information, showing that when interpolating the same
data, the attribute propagation is significantly faster than before.
Edge and corner attributes would add some cost (edges more than
corners), but might not always be present.

Before
```
voxel_remesh_exec: 3834.63 ms
BKE_shrinkwrap_remesh_target_project: 1141.17 ms
BKE_mesh_remesh_reproject_paint_mask: 689.35 ms
BKE_remesh_reproject_sculpt_face_sets: 257.14 ms
BKE_remesh_reproject_vertex_paint: 54.64 ms
BKE_mesh_smooth_flag_set: 0.15 ms
```

After
```
voxel_remesh_exec: 3339.32 ms
BKE_shrinkwrap_remesh_target_project: 1158.76 ms
mesh_remesh_reproject_attributes: 517.52 ms
```

Pull Request: https://projects.blender.org/blender/blender/pulls/115116
2023-11-22 15:21:58 +01:00
Jeroen Bakker 266f4305a7 EEVEE-Next: Naming & UI tweaks Light Probes
* Rename "Type" to "Shape" in user interface. RDNA already used
  the term Shape (Still need to push this from office)
* Show LightProbe overlay settings
* Rename "Cubemap" to "Sphere"
* Rename "Planar" to "Plane"

Pull Request: https://projects.blender.org/blender/blender/pulls/114406
2023-11-22 14:43:52 +01:00
Clément Foucault a001cf9f2b EEVEE-Next: Displacement Option
This add the displacement option to EEVEE materials.
This unifies the option for Cycles and EEVEE.

The displacement only option is not matching cycles
and not particularly useful. So we decided to not
support it and revert to displacement + bump.

Pull Request: https://projects.blender.org/blender/blender/pulls/113979
2023-11-21 19:55:38 +01:00
Clément Foucault 3097d5d821 EEVEE-Next: Add horizon scan to raytracing module
This uses the principles outlined in
Screen Space Indirect Lighting with Visibility Bitmask
to compute local and distant diffuse lighting.

This implements it inside the ray-tracing module as a fallback when the
surface is too rough. The threshold for blending between technique is
available to the user.

The implementation first setup a radiance buffer and a view normal
buffer. These buffer are tracing resolution as the lighting quality is
less important for rough surfaces. These buffers are necessary to avoid
re-projection on a per sample basis, and finding and rotating the
surface normal.

The processing phase scans the whole screen in 2 directions and outputs
local incomming lighting from neighbor pixels and the remaining
occlusion for everything that is outside the view.

The final steps filters the result of the previous phase while applying
the occlusion on the probe radiance to have an energy conserving mix.

Related #112979

Pull Request: https://projects.blender.org/blender/blender/pulls/114259
2023-11-21 16:24:14 +01:00
Christoph Lendenfeld a99e419b6e Anim: Insert keyframes without keying sets
When animators want to key something in the viewport,
the code needs to know *which properties* should be keyed of that selected thing.
So far that was done with keying sets, and a pop-up that let's
you choose the keying set to use. You can get rid of the popup by
choosing a keying set ahead of time. But that is also not always desirable.

That pop-up is quite confusing and gives way too many options.
To simplify this process this PR adds a User Preference option to choose one or more of:
* Location
* Rotation
* Scale
* Rotation Mode
* Custom Properties

Now whenever the `I` key is pressed in the viewport,
and no keying set is enabled, it reads the preferences for which channels to insert.

# User Facing changes
* The popup will not be shown when pressing the hotkey,
 but you can still explicitly use keying sets by going to the menu
* Which channels are keyed is defined by a User Preference setting under animation
* when a keying set is used explicitly, the User Preference settings are ignored

Part of #113278

Pull Request: https://projects.blender.org/blender/blender/pulls/113504
2023-11-21 15:38:01 +01:00
20kdc f01c82e268 VSE: Use Strip Volume property for scenes
Scene strips had scene volume property in side panel, but this meant,
that it is shared across all strips using particular scene.

Add `volume` RNA property for scene strips and use this in side panel.

Co-authored-by: 20kdc <asdd2808@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112597
2023-11-21 08:09:18 +01:00
Germano Cavalcante 0f2988fd2c Revert preset changes in c6db3f98bb
This partialy reverts commit c6db3f98bb.

The presets are case-sensitive, as explained in issue #110642.
2023-11-20 19:41:25 -03:00
Hans Goudey f2bcd73bd2 Mesh: Move sculpt mask to a generic attribute
Store paint masks as generic float attributes, with the name
`".sculpt_mask"`. This is similar to 060a534141, which made
the same change for face sets. The benefits are general
consistency, nicer code, and more support in newer areas
that deal with attributes like geometry nodes.

The RNA API is replaced with one created in Python. The new
API only presents a single layer as an attribute class, so it
should be simpler to use in general:
- Before: `object.data.vertex_paint_masks[0].data[0].value`
- After: `object.data.vertex_paint_mask.data[0].value`

Pull Request: https://projects.blender.org/blender/blender/pulls/115119
2023-11-20 17:42:01 +01:00
Hans Goudey b3d4fc80fd Fix: Duplicate node tools menus in sculpt mode 2023-11-20 09:50:26 -05:00
Bastien Montagne 7ce745a76b UI messages fixes/cleanups. 2023-11-20 12:20:58 +01:00
Aras Pranckevicius 17c793e43c IO: C++ STL exporter
There was a C++ STL importer since Blender 3.3, but no corresponding C++ STL exporter. This PR is adding said exporter: taking https://projects.blender.org/blender/blender/pulls/105598 and finishing it (agreed with original author).

Exporting Suzanne with 6 level subdivision (4 million triangles), on Apple M1 Max:
- Binary: python exporter 7.8 sec -> C++ exporter 0.9 sec.
- Ascii: python exporter 13.1 sec -> C++ exporter 4.5 sec.

Co-authored-by: Iyad Ahmed <iyadahmed430@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/114862
2023-11-19 16:41:20 +01:00
Hoshinova 0b11c591ec Nodes: Merge Musgrave node into Noise node
This path merges the Musgrave and Noise Texture nodes into a single
combined Noise Texture node. The reasoning is that both nodes
intrinsically do the same thing, which is the layering of Perlin noise
derivatives to produce fractal noise. So the patch de-duplicates code
and unifies the use of fractal noise for the end use.

Since the Noise node had a Distortion input and a Color output, while
the Musgrave node did not, those are now available to the Musgrave types
as new functionalities.

The Dimension input of the Musgrave node is analogous to the Roughness
input of the Noise node, so both inputs were unified to follow the same
behavior of the Roughness input, which is arguable more intuitive to
control. Similarly, the Detail input was slightly different across both
nodes, since the Noise node evaluated one extra layer of noise. This was
also unified to follow the behavior of the Noise node.

The patch, coincidentally fixes an unreported bug causing repeated
output for certain noise types and another floating precision bug
#112180.

The versioning code implemented with this patch ensures backward
compatibility for both the Musgrave and Noise Texture nodes. When
opening older Blender files in Blender 4.1 the output of both nodes are
guaranteed to always be exactly identical to that of Blender files
created before the nodes were merged in all cases.

Forward compatibility with Blender 4.0 is implemented by #114236.
Forward compatibility with Blender 3.6 LTS is implemented by #115015.

Pull Request: #111187
2023-11-18 09:40:44 +01:00
Pratik Borhade bf7d4ef054 Fix #115025: Transform operations not working in particle edit mode
Earlier 3d-view keymap was used by particle edit mode for transform
operation. After d7558a243c, this global transform keymap is removed.
So add `_template_items_transform_actions` in particle-edit mode to
allow transforming from shortcuts.

Pull Request: https://projects.blender.org/blender/blender/pulls/115031
2023-11-18 07:37:03 +01:00
Jeroen Bakker f6569b7726 Cleanup: Make format 2023-11-17 11:54:19 +01:00
casey bianco-davis 4dfed520a3 GPv3: Delete operator
Adds the delete operator to edit mode grease pencil, and also adds it to the delete menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/111571
2023-11-17 10:35:56 +01:00
Antonio Vazquez 39f30e848c GPv3: Show All Materials Operator
Adds the Show All Materials operator.

Also includes a refresh of despgraph when the hide prop changes.

Note: The actual render engine does not support hiding by materials.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115001
2023-11-17 10:32:35 +01:00
Philipp Oeser f815484e7d Outliner: add "Expand/Collapse All" to view context menu
This was only in the blender keymap, but seems useful to have this in a
menu as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/114138
2023-11-17 00:49:04 +01:00
Philipp Oeser 4793b4592b Outliner: clarify "Show Hierarchy" context menu entry
Display OUTLINER_OT_show_hierarchy as "Show Object Hierarchy"

Pull Request: https://projects.blender.org/blender/blender/pulls/114139
2023-11-17 00:31:32 +01:00
Nate Rupsis 661e7e451a Anim: Rename NLA "Channels" to "Tracks"
Updating "NLA Channel"  to "NLA Tracks" across board, since the terminology "Tracks" is the most prevalent in operators, code, etc.
2023-11-16 17:59:18 +01:00
Jeroen Bakker 81eec5ff44 Cleanup: Make format 2023-11-16 07:59:20 +01:00
Hans Goudey 3fcd9c9425 Geometry Nodes: Support node tools in object mode
Extend node tools to display tool assets in object mode as well
as edit and sculpt modes. For consistency with existing Blender
design, selection cannot be set and is just "true" in object mode
because it can't be visualized. The visibility of tools can be
customized per object type in object mode as well.

See #101778

Pull Request: https://projects.blender.org/blender/blender/pulls/114819
2023-11-15 17:01:18 +01:00
ariva00 d7b7938706 Fix #92287: focal legth not correctly computed when tracking vertial videos
The motion tracking always operates with horizontal sensor mapping, but
conversion code form tracking camera to Blender camera was not setting
the sensor fitting to Horizontal (Python code was leaving sensor fitting
unchanged, C code was setting it to Auto).

Additionally, the Python code was not handling camera shift, making it
so non-centered optical center was not handled correctly.

The reason why the code is written in two places is because C code is
used when conversion from tracking camera to Blender happens after solving
the motion, and the Python code is used for the "Setup Tracking Scene".
It is possible to unify some code, but it is not that much of an importance
at this time.

Pull Request: https://projects.blender.org/blender/blender/pulls/114253
2023-11-15 10:53:30 +01:00
Harley Acheson 3f5654b491 Fix #114080: Add Khmer Font
Add Noto Sans Khmer (variable) font, needed for new translation.
2023-11-13 17:38:03 +01:00
Thomas Dinges 3cac5c83ec Merge branch 'blender-v4.0-release' 2023-11-13 16:32:30 +01:00
Thomas Dinges 905c0b84f2 Release: Update manual references for 4.0. 2023-11-13 16:31:41 +01:00
Germano Cavalcante c6db3f98bb Fix modal key assignment for "Rotate Normals" in keymap versioning
Error in 78943edc5d

The key was not included in the appropriate condition block, leading to
an error.
2023-11-13 09:47:10 -03:00
Antonio Vazquez 7c899d2271 GPv3: Set caps operator
This operator is similar to V2 GPENCIL_OT_caps_set to set the type of cap used by the stroke curve.

Related to #113977

Pull Request: https://projects.blender.org/blender/blender/pulls/113978
2023-11-12 14:13:13 +01:00
Germano Cavalcante 78943edc5d Transform: Custom modifier to navigate while transforming
Discussed in #114646.

This commit transforms the "alt_navigation" option of the transform
operators into a new modal key item. "PASSTHROUGH_NAVIGATE"

In addition to cleaning up a lot of the code, it allows you to
customize the key chosen to navigate while transforming.
2023-11-09 21:33:34 -03:00
Campbell Barton 8eb5223663 Cleanup: remove unused variables & imports in scripts/ 2023-11-10 10:06:41 +11:00
Campbell Barton 45cf94904b Fix EEVEE Next panel masking the non-next EEVEE panel
Mistake in [0] re-used the same names for both panels.

[0]: 80a8368b88
2023-11-09 23:17:23 +11:00
Hans Goudey d0ce1ca173 Merge branch 'blender-v4.0-release' 2023-11-09 11:58:29 +01:00
Falk David ff5df8a78f Fix #114564: Can't search grease pencil modifiers
The grease pencil modifier list hasn't been converted to a menu yet.
This fixes the issue by filtering out grease pencil objects in
the search poll function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114665
2023-11-09 11:57:07 +01:00
Antonio Vazquez 405ad22429 GPv3: Set Uniform operator for Thickness and Opacity
This operator has the same functionality that GPv2 version of Stroke Normalize.

Note: The radius is set with the entry value * 0.5 and the param is named Thickness.

Related to #113991

Pull Request: https://projects.blender.org/blender/blender/pulls/114006
2023-11-08 16:19:00 +01:00
Matias Mendiola e5704d37de GPv3: Switch Direction operator
This Operator is similar to GPv2 GPENCIL_OT_stroke_flip to switch the stroke direction.

Related to: [113590](113590)

Pull Request: https://projects.blender.org/blender/blender/pulls/114007
2023-11-08 16:05:54 +01:00
Antonio Vazquez a8cb0b0ca0 GPv3: Set selected curve material as active material
This operator assigns the material of the first selected curve as active material.

Related to #113569

Pull Request: https://projects.blender.org/blender/blender/pulls/114188
2023-11-08 15:00:48 +01:00
Pratik Borhade 34874910b6 Merge branch 'blender-v4.0-release' 2023-11-08 17:33:26 +05:30
Pratik Borhade 2a45027203 UI: Type to search for sequencer add menu
Sequencer add menu supports searching with spacebar but "type to search"
was missing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114625
2023-11-08 12:56:58 +01:00
Omar Emara 474b6fa070 Realtime Compositor: Support full precision compositing
This patch adds support for full precision compositing for the Realtime
Compositor. A new precision option was added to the compositor to change
between half and full precision compositing, where the Auto option uses
half for the viewport compositor and the interactive render compositor,
while full is used for final renders.

The compositor context now need to implement the get_precision() method
to indicate its preferred precision. Intermediate results will be stored
using the context's precision, with a number of exceptions that can use
a different precision regardless of the context's precision. For
instance, summed area tables are always stored in full float results
even if the context specified half float. Conversely, jump flooding
tables are always stored in half integer results even if the context
specified full. The former requires full float while the latter has no
use for it.

Since shaders are created for a specific precision, we need two variants
of each compositor shader to account for the context's possible
precision. However, to avoid doubling the shader info count and reduce
boilerplate code and development time, an automated mechanism was
employed. A single shader info of whatever precision needs to be added,
then, at runtime, the shader info can be adjusted to change the
precision of the outputs. That shader variant is then cached in the
static cache manager for future processing-free shader retrieval.
Therefore, the shader manager was removed in favor of a cached shader
container in the static cache manager.

A number of utilities were added to make the creation of results as well as
the retrieval of shader with the target precision easier. Further, a
number of precision-specific shaders were removed in favor of more
generic ones that utilizes the aforementioned shader retrieval
mechanism.

Pull Request: https://projects.blender.org/blender/blender/pulls/113476
2023-11-08 08:32:00 +01:00
Damien Picard 7231ac0a52 I18n: extract and disambiguate a few messages
Extract:
- "Attribute", when creating a new attribute with
  `GEOMETRY_OT_attribute_add()`: make the default name in the operator
  a null string, and set it to "Attribute" translated inside an invoke
  method instead.
- Also for new attributes, from `BKE_id_attribute_calc_unique_name()`,
  for instance to create a default vertex color layer when going into
  Vertex Paint mode: use `DATA_()` instead of `IFACE_()`, since it
  represents user data.

Disambiguate:
- "Weight" can be the thickness of font glyphs.
- "Mark as Asset" and "Clear Asset" are operator names already
  extracted using the Operator context. They were recently added to a
  manual translation in the UI, but the existing one can be reused.
- "Second" as a time unit in the context of frame snapping.

Some messages reported by Satoshi Yamasaki in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/114159
2023-11-07 18:08:58 +01:00
Damien Picard 772e99b4f7 I18n: extract node group asset sockets
Each node group asset exposes various properties through sockets.
Although they can generally be considered user-created data, for
built-in assets they are also part of the UI and should be
translated--especially since more modifiers should be migrated to
Geometry Nodes in the future.

This commit allows extraction of such socket names and descriptions.
Since the message extraction script already extracted names and
descriptions for each asset, this commit only adds the socket in the
same loop, so that they are extracted while the asset file is already
being read.

Properties from sockets are not yet translated in the modifier
properties editor, this will be enabled in a follow-up commit.
2023-11-07 18:08:28 +01:00
Miguel Pozo b4316445a8 EEVEE-Next: Add Max Displacement option
Add a Max Displacement option to Material settings, so frustum culling
can work correctly with vertex displacement.

Pull Request: https://projects.blender.org/blender/blender/pulls/114200
2023-11-07 15:28:07 +01:00
Philipp Oeser 1699163feb Merge branch 'blender-v4.0-release' 2023-11-07 10:12:07 +01:00
Alaska 967e36cf68 UI: Don't show HDR setting when using False Color view transform
False Color view transforms doesn't show HDR values.

Pull Request: https://projects.blender.org/blender/blender/pulls/114503
2023-11-07 07:48:54 +01:00
Campbell Barton 1e66938d7a Cleanup: spelling in comments, format 2023-11-07 11:35:16 +11:00
Miguel Pozo 6d0b5e2ace EEVEE-Next: New shadow settings
Remove `Material > Shadow Mode` and use `Object > Shadow Ray Visibility`
and `Material > Transparent Shadows` instead.

The versioning system auto-updates objects/materials in EEVEE
scenes so their behavior is as close as possible to the previous one.

Update Cycles to use the native `use_transparent_shadow` property.

Note:
Material changes don't set any `recalc` flag on the objects that use
them, so the EEVEE Next shadow maps don't update when changing
settings/nodes.
Fixing this issue is required for 4.1, but it's out of the scope of this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/113980
2023-11-06 15:45:00 +01:00
Richard Antalik fe4f895214 Merge branch 'blender-v4.0-release' 2023-11-06 06:09:38 +01:00
Aaron Franke c62009a6ac 3D View: add local up/down movement to walk navigation
Minor usability enhancement for the walk navigation mode. Previously
walk navigation had local movement for forward/back/left/right,
but only global movement for up/down.
This PR adds local up/down movement, bound to the R and F keys.

Ref: !111682
2023-11-05 17:23:59 +11:00
Douglas Paul 23e3f8f563 Fix: Correct order of nodes in the Mesh > Write menu
The ordering of geometry nodes in the menus is intended to be
alphabetic, but the new "Set Face Set" node was listed _after_ the
"Set Shade Smooth" node in the Mesh > Write menu. This fixes the order.

Pull Request: https://projects.blender.org/blender/blender/pulls/114475
2023-11-04 11:02:59 +01:00
Campbell Barton b177f27e6f Cleanup: compile the match for reuse in UI_UL_list.filter_items_by_name 2023-11-04 16:53:49 +11:00
Jeroen Bakker 747ec05f69 Cleanup: Make format 2023-11-03 12:00:38 +01:00
Clément Foucault 0684b68eb4 EEVEE-Next: Make Ambient Occlusion Pass use Horizon Scan
This adds a new way of computing occlusion using visibility bitmask. To
make it more algorithm agnostic, we name it horizon scan.
This cleans-up / simplify the code compared to the Horizon based solution.
There is no more trickery for fading influence of distant samples which
makes the result match cycles closer.

This introduces a new thickness option. Maintaining it relatively low
makes it possible to avoid over occlusion because of in front geometry.
Making it too low will cause under occlusion.

Related #112979

Pull Request: https://projects.blender.org/blender/blender/pulls/114150
2023-11-02 19:22:01 +01:00
Falk David 91db8fc5a0 GPv3: Multi-frame editing
Adds a new scene tool setting `use_grease_pencil_multi_frame_editing`.

The `foreach_*_drawing` functions are moved to the `ed::greasepencil` namespace in the editor, since they are now context sensitive and depend on the toolsetting. They are now named `retrieve_editable_drawings` and `retrieve_visible_drawings` and return
an array of drawings instead of calling a callback function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114283
2023-11-02 17:10:59 +01:00
Miguel Pozo b679ea939a EEVEE-Next: Per probe viewport display
* Add viewport display support for Sphere and Plane probes.
* Make all probe display options per object instead of per scene.
  (Uses the already existing `LIGHTPROBE_FLAG_SHOW_DATA`
   and adds a new `data_display_size ` property to the `LightProbe` DNA)
* Python `show_data` property has been deprecated and renamed to
   `use_data_display` (`data_display_size ` has been exposed as well).

Pull Request: https://projects.blender.org/blender/blender/pulls/114176
2023-11-02 17:08:13 +01:00
Gilberto Rodrigues dfd1b63cc7 UI: improve mesh edge highlighting
Changes to edit mode mesh overlays, use hue shift instead of color
fading/darkening for selection mode visual differentiation, and some
theme changes to improve the display of mesh edges and faces with good
selection visibility.

- Removed "edge" toggle from edit mode overlays panel.
- No longer halves the edge and face alpha depending on selection mode.
  Half the face alpha in wire-frame mode. For better visibility on most
  themes.

Ref !111431
2023-11-02 22:09:17 +11:00
Antonio Vazquez c412aa1a17 GPv3: Rename `stroke_color_set` to `stroke_material_set`
The old name was logic when the color of the stroke was using a palette and not materials, but now always a material is used so the name "color" is not logic.

As we are changing all the API, now is the moment to set the right name.

Also, the commit includes some cleanup of the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/114186
2023-11-01 10:39:17 +01:00
Julian Eisel 6dcc394104 Merge branch 'blender-v4.0-release' 2023-10-31 15:38:21 +01:00
Bastien Montagne a49dd41290 Revert "I18N/UI: Work around #114080: Lack of Khmer script in built-in fonts."
Only temp solution for 4.0 release, proper fix is to add the Khmer
script to our embedded font.

This reverts commit e070ff45c4.
2023-10-31 15:16:10 +01:00
Bastien Montagne 7300609966 I18N/UI: Work around #114080: Lack of Khmer script in built-in fonts.
Khmer was added for this release and is barely translated yet (about
1%), so it's not too bad. We will ensure that the Khmer script is added
to our default font for 4.1, but this is too late for 4.0.
2023-10-31 15:16:10 +01:00
Bastien Montagne e070ff45c4 I18N/UI: Work around #114080: Lack of Khmer script in built-in fonts.
Khmer was added for this release and is barely translated yet (about
1%), so it's not too bad. We will ensure that the Khmer script is added
to our default font for 4.1, but this is too late for 4.0.
2023-10-31 15:13:43 +01:00
casey bianco-davis c57fe9a6e0 Curves: Add radius transform mode to edit mode
This adds the radius control operator and active tool
to curves edit mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/114017
2023-10-31 11:33:32 +01:00
Campbell Barton 6cc0d10d5f Merge branch 'blender-v4.0-release' 2023-10-31 16:26:53 +11:00
Julien Kaspar ef0b7337a6 Fix #113920: Missing IC shortcuts
Add various shortcuts that were missing from the industry compatible
key-map. Various grease pencil shortcuts that were intended to be there
are now present.

These issues are now fixed:
- `Alt A` = Missing from GP sculpt mode.
- `Shift S` = Missing.
- `Shift Alt S` = Insert Blank Keyframe - Not added to Edit mode.
- `Y` = Active Layer Menu - Not added to Edit mode.
- `Shift Y` = Merge Down - Does not exist.
- `Shift Backspace/Delete` = Delete All Active Frames is missing from
  every mode except Draw.
- `Backspace/Delete` = Delete Menu is missing from all modes except
  Edit.
2023-10-31 16:01:04 +11:00
Lukas Stockner d15013b583 Merge branch 'blender-v4.0-release' 2023-10-31 05:48:58 +01:00
Campbell Barton 4bec9d0d71 Fix #114282: Extrude to Cursor tool no longer tweaks on drag
Regression in [0] which only ran drag events if the press event passed
through.

Resolve using the same logic as select picking
(see: WM_operator_flag_only_pass_through_on_press).

[0]: 4d0f846b93
2023-10-31 14:55:12 +11:00
Brecht Van Lommel 39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Julian Eisel 69e5f5175b Grease pencil (legacy): Remove redundant "Use" for checkboxes
There is already a checkbox, so the word "Use" is redundant. See
https://wiki.blender.org/wiki/Human_Interface_Guidelines/Writing_Style#UI_Labels.
2023-10-29 12:33:20 +01:00
Campbell Barton d31c61edee Cleanup: spelling in comments 2023-10-27 12:13:48 +11:00
Campbell Barton e8279ff4ee Cleanup: format 2023-10-27 12:13:46 +11:00
Matias Mendiola fbb3726f68 GPv3: Menus updates
Adds context menus and updates existing menus with newly added operators

- Updates menu texts and separators
- Add Point Menu
- Add Stroke and Point Context Menu

Pull Request: https://projects.blender.org/blender/blender/pulls/114172
2023-10-26 16:52:31 +02:00
Campbell Barton 1486f4bc05 UI: add dynamic topology toggle to sculpt menu
This wasn't available in any menus making it inaccessible from menu
search.
2023-10-25 16:18:04 +11:00
Campbell Barton fc1c41b121 Merge branch 'blender-v4.0-release' 2023-10-25 15:43:05 +11:00
Dalai Felinto 753e9e0f2b Fix Node Tools popovers dark text
Labels in popover menus are always darker. That made the popovers for
Type and Modes to have a way too dark color. Specially when the values
were off.

This commit mimics what we do in the viewport Selectability &
Visibility menu. Basically we don't gray out the labels even if the
values are off.

Co-authored by: Hans Goudey <hans@blender.org>
2023-10-24 16:32:13 +02:00
Jacques Lucke bef2155baa Merge branch 'blender-v4.0-release' 2023-10-24 14:05:33 +02:00
bonj 7c5b78d2c7 Fix "Fix #102885": Wrong check is always False
The check was incorrect, so it always reset the subtype to NONE.

Pull Request: https://projects.blender.org/blender/blender/pulls/114038
2023-10-24 13:57:23 +02:00
Brecht Van Lommel 68e06704a6 Merge branch 'blender-v4.0-release' into main 2023-10-23 19:09:12 +02:00
Douglas Paul f35ecfdac7 Fix documentation link for Points to Curves node
The Online Manual action in the context menu for the new Points to Curves
geometry node was going to the documentation for the Points node instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/113727
2023-10-23 17:20:53 +02:00
Dalai Felinto e42281084b GPv3: Named Layer Selection node
This node supports either a Layer or a Layer Group name as input,
and outputs a selection field for it.

Known limitations to be addressed separately:

* We are not warning/keeping track of the named layers.
* There is no lookup for layers (groups) yet.

Ref !113908.

Pull Request: https://projects.blender.org/blender/blender/pulls/113908
2023-10-23 15:49:39 +02:00
Thomas Dinges 1f9a6898a4 Fix Object menu in 3D view
Was broken after 89e3ba4e25, context wasn't used before in the menu.
2023-10-23 09:37:16 +02:00
Campbell Barton a60de8a940 Merge branch 'blender-v4.0-release' 2023-10-23 12:22:52 +11: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 9762af060d Cleanup: format 2023-10-23 10:13:33 +11:00
Pratik Borhade 499f898400 Merge branch 'blender-v4.0-release' 2023-10-22 11:12:03 +05:30
Antonio Vazquez e0881aad0d GPv3: Only use Toggle Cyclic option in menu
The menu must include only 1 option and don't
ask for other options in a popup menu.

Reviewed by Matias Mendiola
2023-10-21 17:34:52 +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
bonj 2e084addb5 Fix #102885: IDproperty subtype can cause Blender UI to throw exception
When the subtype of a custom property is set programmatically to
something that isn't in the subtype enum of this operator, attempting
to edit it will throw an error. This check should avoid that, by simply
not setting the subtype if it's not in the enum, resulting in a default
subtype of NONE. This is the second attempt at #112582, which I broke
when messing with branches.

Pull Request: https://projects.blender.org/blender/blender/pulls/114003
2023-10-21 15:03:28 +02:00
Antonio Vazquez 5ad9521c7a GPv3: Change Toggle Cyclic menu text
The old text was not clear about the use of the operator and
now is more aligned with GPv2 menu.
2023-10-21 10:47:37 +02: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
Dalai Felinto 45fd780dff Cleanup: make format 2023-10-20 19:12:58 +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
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
Miguel Pozo e24cd6b524 EEVEE-Next: Shadows backface culling
Add optional backface culling for shadows.

Pull Request: https://projects.blender.org/blender/blender/pulls/113969
2023-10-20 15:47:33 +02:00
casey bianco-davis 5a79023409 GPv3: Cyclical set operator
Simply sets the cyclical property selected strokes. Note this does not add extra geometry like the legacy operator.

Note: also adds a key bind 'alt c' to toggle, same as for curves.

Resolves #113671

Pull Request: https://projects.blender.org/blender/blender/pulls/111904
2023-10-20 10:12:24 +02:00
Pablo Vazquez 385ef2c298 Extensions: Move Extensions Repositories panel to Extensions tab
Move "Extensions Repositories" panel from FilePaths to Extensions.

Temporary change until a design is agreed on, to make it easier to test
repos while developing without going back and forth between sections.
2023-10-20 14:14:21 +11:00
Bastien Montagne 3aa5644751 Merge branch 'blender-v4.0-release' 2023-10-19 21:42:26 +02:00
Damien Picard e3fc935349 I18n: disambiguate and extract a few messages
Extract:
- Sculpt filter types from the Sculpt menu. Some of these types use a
  custom label, different  from those defined in the operator RNA,
  which was never extracted.
- "Today" and "Yesterday" from the file browser modification date.
- All name_plural from IDs, as these are used in the UI to list which
  data block is to be removed, when calling outliner.orphans_purge.

Disambiguate:
- "Area", meaning the measurement of a surface as opposed to a place.

Some messages reported by Satoshi Yamasaki in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/113912
2023-10-19 21:39:58 +02:00
Clément Foucault f79b86553a EEVEE-Next: Add mesh volume bounds estimation
This adds correct object bounds estimation.

This works by creating an occupancy texture where one
bit represents one froxel. A geometry pre-pass fill this
occupancy texture and doesn't do any shading. Each bit
set to 0 will not be considered occupied by the object
volume and will discard the material compute shader for
this froxel.

There is 2 method of computing the occupancy map:
- Atomic XOR: For each fragment we compute the amount of
  froxels **center** in-front of it. We then convert that
  into occupancy bitmask that we apply to the occupancy
  texture using `imageAtomicXor`. This is straight forward
  and works well for any manifold geometry.
- Hit List: For each fragment we write the fragment depth
  in a list (contained in one array texture). This list
  is then processed by a fullscreen pass (see
  `eevee_occupancy_convert_frag.glsl`) that sorts and
  converts all the hits to the occupancy bits. This
  emulate Cycles behavior by considering only back-face
  hits as exit events and front-face hits as entry events.
  The result stores it to the occupancy texture using
  bit-wise `OR` operation to compose it with other non-hit
  list objects. This also decouple the hit-list evaluation
  complexity from the material evaluation shader.

## Limitations
### Fast
- Non-manifolds geometry objects are rendered incorrectly.
- Non-manifolds geometry objects will affect other objects
  in front of them.
### Accurate
- Limited to 16 hits per layer for now.
- Non-manifolds geometry objects will affect other objects
  in front of them.

Pull Request: https://projects.blender.org/blender/blender/pulls/113731
2023-10-19 19:22:14 +02:00
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 b49c84276c 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]: 88a875ec3a
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]: 88a875ec3a
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 b0515e34f9.
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 974edc5885 / 7f9d51853c

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