Commit Graph

813 Commits

Author SHA1 Message Date
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 eda58d64194, 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 b49c84276cba74299caa but was missed for the compositor and shader
nodes. Also remove an unnecessary separator.
2023-10-15 19:52:38 +02:00
Hans Goudey
d3151df74a Fix #113736: Add modifier menu broken for surface objects
This object type doesn't support geometry nodes currently.
2023-10-15 19:22:21 +02:00
Campbell Barton
2e0b844b36 Cleanup: spelling in comments 2023-10-14 13:53:00 +11:00
Pratik Borhade
d836aa7931 GPv3: Expose insert keyframe in menu
Create menu similar to legacy GP to expose insert keyframe operation in
user interface. Pressing `I` key will invoke this menu.
(We can further add "key duplicate" and other relevant operation in this menu)

Pull Request: https://projects.blender.org/blender/blender/pulls/113663
2023-10-13 14:07:21 +02:00
Campbell Barton
8768248924 Merge branch 'blender-v4.0-release' 2023-10-13 17:32:48 +11:00
Jeroen Bakker
6a147ef7c9 Cleanup: Make format 2023-10-13 07:38:24 +02:00