Commit Graph

400 Commits

Author SHA1 Message Date
Hans Goudey
82438b37ad Cleanup: Add comment about purpose of add modifier operator 2023-09-07 07:55:07 -04:00
Campbell Barton
76dd61d942 Fix incorrect operator in sequencer context menu
Error in [0] referenced two operators when a dynamic enum is used.

[0]: 1015bed2fd89c5a8f741c5f1dd22099a9441bea0
2023-09-07 21:34:15 +10:00
Hans Goudey
e86211cded Cleanup: Remove unnecessary search item in texture node add menu
Unnecessary since 7f9d51853c978fffa66b3fdf01dde72251b60f1c
2023-09-06 16:01:39 -04:00
Jacques Lucke
7f9d51853c UI: support searching in menus
The basic idea is very simple. Whenever a supported menu is open, one can just
start typing and this opens a search that contains all the (nested) menu entries.

The main downside is that this collides with accelerator keys. Those are the
underlined characters in each menu. For now, we just enable this new searching
behavior in a few selected menus: Node Add Menu, View3D Add Menu and
Modifier Add Menu.

This new functionality can be enabled for a menu by setting
`bl_options = {'SEARCH_ON_KEY_PRESS'}` to true in the menu type.

The status bar shows `Type to search...` when a menu is opened that supports search.

Pull Request: https://projects.blender.org/blender/blender/pulls/110855
2023-09-06 18:16:45 +02:00
Hans Goudey
4e97def8a3 Geometry Nodes: Expose sharp edge status with builtin nodes
Change the existing "Is Shade Smooth" node to be named "Is Face Smooth"
and add a new "Is Edge Smooth" node. Also give the "Set Shade Smooth"
node the ability to set face or edge smoothness.

The fact that the nodes process "smooth" data reversed from the builtin
"sharp" attributes can be reversed with versioning in a separate commit.

While it's tempting to abstract the sharpness status into a single node,
face and edge smoothness are accessed separately in edit mode, and the
subtlety of interacting with data on different domains would make that
confusing. Instead, a separate "Is Shade Smooth" node group asset will
give all the sharp elements taking into account both builtin attributes.

The fact that sharpness is stored separately on two domains makes the
best design for simple operations non-obvious. For example, you should be
able to remove all sharpness or make everything flat with a single node.
The behavior depends on whether the two attributes exist and the
combination of values between the domains.

---

![image](/attachments/c3f053c4-2b0f-44ac-9227-62071065fe56)

![image](/attachments/fd489fb3-314b-42ff-a5a9-e79578cbdfe7)

Pull Request: https://projects.blender.org/blender/blender/pulls/112029
2023-09-06 17:12:27 +02:00
Pablo Vazquez
3b5df8a7ea UI: Add canvas picker to paint modes in 3D Viewport
In paint modes, show a selector for the active canvas, similar
to how other editors (UV/Image, Nodes, Action) do it.

Available canvas in each mode:
* Weight Paint: Vertex Groups
* Vertex Paint: Color Attributes
* Texture Paint: Canvas (material, image)
* Sculpt Paint: Color Attributes, canvas in experimental sculpt paint)

Pull Request: https://projects.blender.org/blender/blender/pulls/111756
2023-09-06 16:21:11 +02:00
Miguel Pozo
2aa7961e6f Workbench: Remove old implementation 2023-09-06 15:54:48 +02:00
Hans Goudey
b51a2dde3f UI: Add separator after "Empty Modifier" in add modifier menu
This helps distinguish it as a separate thing from the submenus below.
2023-09-06 08:59:50 -04:00
Miguel Pozo
fc08f220bf EEVEE Next: Volumes: Lighting integration improvements
Add the features missing from #107176

* Irradiance integration.
* Self-shadows.
* Receive shadows from shadow maps.

Shadow tagging works by iterating all the froxels in a
compute shader and tagging the exact same position
that will be sampled by the volume scatter shader.
Froxels that are fully transmissive, have no scattering,
or are behind opaque geometry, are skipped.

It also adds a LoD bias parameter for shadow tagging,
driven by the volumetric tile size.
This works for punctual shadows, but directional lights
would need a way to support re-direction between levels
at sampling time, which is out of the scope of this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/110809
2023-09-06 14:35:57 +02:00
Campbell Barton
48950ff934 Cleanup: format 2023-09-06 19:15:47 +10:00
Jacques Lucke
461a458e85 Fix: exception when using menu search outside of properties editor 2023-09-06 10:04:01 +02:00
Campbell Barton
1f01a64403 Cleanup: spelling in comments 2023-09-06 14:23:01 +10:00
Campbell Barton
8caec75f2c Correct own error in 0424d57d76d9fce928bce54668729919461fb776 2023-09-06 10:49:02 +10:00
Jesse Yurkovich
0424d57d76 Fix #89006: Use correct path to DJV viewer on Windows
The DJV installer does not add its executable to the PATH, but Blender
attempts to execute it using just "djv". This will not work.

Until DJV is able to address this we can fish out the full path from the
registry in the meantime.

Ref !111458
2023-09-06 10:41:38 +10:00
Pablo Vazquez
5fac8f822b Texture Nodes: Refactor Add menu
Refactor the Add menu in Texture Nodes, with manually created menus,
inspired by Geometry Nodes and more recently Shader and Compositor.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically.

Unlike other node editors, this menu will not feature assets for the time
being. Doing so would add (more) burden of maintenance to a system
that is deemed end-of-life, and likely to be rewritten before long.

Part of #111746

Pull Request: https://projects.blender.org/blender/blender/pulls/111838
2023-09-05 21:52:31 +02:00
Hans Goudey
ef03121e52 UI: Add shortcut for "Add Modifier" menu in property editor
In the property editor "Modifier" tab, open the new modifier
from 6da4b87661f0fbbe7fc5 menu with the Shift-A shortcut.

A new operator is added that opens the menu because there
doesn't seem to be a way to make the shortcut dependent
on the property editor tab otherwise.

Pull Request: https://projects.blender.org/blender/blender/pulls/111982
2023-09-05 16:44:08 +02:00
Hans Goudey
6da4b87661 Geometry Nodes: Extend add modifier menu with node group assets
Implements part of #111538.

Change the modifier add button to create a menu with submenus.
Extend the submenus dynamically with geometry node group assets.
This makes it much simpler to share and use custom modifiers.

Node groups get a new "Is Modifier" property, which is controllable
in a popover in the node editor header when the group is an asset.

The built in modifier can be rearranged in different categories in
a next step. For now the existing organization is used, except for
the geometry nodes modifier, which is called "Empty Modifier" and
put in the root menu.

The changes in !110855 and !110828 will be important to improve
interaction speed with the new UI. Those are planned for 4.0 as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/111717
2023-09-05 14:47:18 +02:00
Christoph Lendenfeld
9d4edd3565 Cleanup: Make format 2023-09-05 14:23:54 +02:00
Christoph Lendenfeld
11fe57cab8 Animation: Move Snapping to Scene
Part of #91973

Moving the snapping code for the
* Graph Editor
* Action Editor
* and NLA editor

into the common system that lives on the scene.
This includes the Magnet icon for turning
snapping on and off.

The old settings translate to the new in the following way:
* `Frame Step` -> `Frame`
* `Second Step` -> `Second`
* `Nearest Frame` -> `Frame` + `Absolute Time Snap`
* `Nearest Second` -> `Second` + `Absolute Time Snap`
* `Nearest Marker` -> `Nearest Marker`

Since this moves the location of the snapping settings
from the editor to the scene, it changes the behavior.
Previously each editor could have different snapping
settings, where now they are all synced.

Pull Request: https://projects.blender.org/blender/blender/pulls/109015
2023-09-05 10:06:55 +02:00
Campbell Barton
02736d28cd Fix error batch renaming light probes 2023-09-05 13:19:05 +10:00
Campbell Barton
0c26c84704 Cleanup: spelling in comments 2023-09-05 11:04:27 +10:00
Richard Antalik
9f8d062de4 Fix #111891: Speed factor property is still available in panel
Property should have been removed when retiming for sound strips  has
been implemented.
2023-09-05 01:39:53 +02:00
Clément Foucault
4f3b224141 EEVEE-Next: Irradiance Volume: Add clamp options
This allows to clamp the lighting components
during the baking phase.

Also add back intensity option.

Pull Request: https://projects.blender.org/blender/blender/pulls/110858
2023-09-04 23:27:30 +02:00
Damien Picard
564bbdf6e7 I18n: disambiguate and extract a few messages
This commit disambiguates the following messages:

- Sequencer effect strip types: use "Sequence" context in relevant
  places, as that is already extracted as part of the
  `sequencer_prop_effect_types` enum, and more specific.
- "Language" (a natural or programming language)
- "Flat" (gender)
- "Smooth" (action or amount -- very partial disambiguation for now
  because this is all over the place)

It also extracts these messages:

- Newly created Freestyle data
  - LineStyle
  - LineSet
  - Modifiers
- "Registering panel class:" error message from RNA registration
- "Node must be run as tool" error message from tool geometry nodes

Ref #43295

Pull Request: https://projects.blender.org/blender/blender/pulls/111146
2023-09-04 16:16:26 +02:00
Campbell Barton
e8c812a307 Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
Campbell Barton
8ea2db5337 Cleanup: format, remove redundant trailing commas 2023-09-03 15:48:30 +10:00
Lukas Tönne
5a7df8f587 Fix #111817: Use new interface API in move-to-nodes operator
This also now supports sockets that have been marked both input and
output.

Pull Request: https://projects.blender.org/blender/blender/pulls/111824
2023-09-02 14:08:45 +02:00
Jacques Lucke
8cadeac18b Cleanup: fix node registration
This was broken in 15f5dfd45d14655f715617802f371f7f6b7a26ae.
2023-09-02 09:18:09 +02:00
Hans Goudey
15f5dfd45d Nodes: Remove unused shader and compositor NodeItem definitions
Unused after:
- 577c0b4b4662a960430821edee6b931fea7d66b1
- 9db4c0ca4be17e71cb062e3c489a80780847ea31

See the geometry nodes commit for more background:
- 837144b4577f161baf1625f8a5478c83a088ea0f
2023-09-01 23:07:51 -04:00
Harley Acheson
347e4692de UI: Minor Changes to Topbar Edit and File Menus
Minor reordering of items on the Edit and File Menus, and the addition
of "Release Notes" to the latter.

Pull Request: https://projects.blender.org/blender/blender/pulls/111814
2023-09-02 05:05:34 +02:00
Pablo Vazquez
de09bdb510 Cleanup: rename compositing to compositor in menu file
Also use lowercase for menu bl_idname, since there won't be any
conflict it's not needed.
2023-09-01 23:43:13 +02:00
Pablo Vazquez
f8dd297531 Cleanup: rename shading to shader in add menu file
Also use lowercase for menu bl_idname, since there won't be any
conflict it's not needed.
2023-09-01 23:36:34 +02:00
Pablo Vazquez
403b6a67f1 Fix: Duplicate Mix node in Add menu
"Mix" node was twice since the recent refactor, one as Mix Color and
regular Mix (which belongs in the Converter category).
2023-09-01 22:16:04 +02:00
Pablo Vazquez
9db4c0ca4b Shading Nodes: Refactor Add menu
Refactor the Add menu in Shading nodes, with manually created menus,
inspired by Geometry Nodes and more recently the Compositor.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically. Shading
node group assets are also populated in the menus.

This is the first part of the re-organization of the Add menu,
part of #111746

Pull Request: https://projects.blender.org/blender/blender/pulls/111798
2023-09-01 20:46:12 +02:00
Rawalanche
0e090369d6 Fix #109439: Use List Item widget colors for View Item widgets
As concluded in discussion under #109439, the View Item widgets are
supposed to use List Item widget theme colors. This patch does that.

Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111584
2023-09-01 20:02:20 +02:00
Campbell Barton
5c9e5d9dc8 Cleanup: line-length, use percentage formatting 2023-09-01 14:31:09 +10:00
Campbell Barton
23e8ffd72d Cleanup: various non-functional C++ changes, format 2023-09-01 11:19:44 +10:00
Harley Acheson
7833703603 UI: Reverse Order of Timeline Menu Items
Reverse the order of items in the Timeline "View" and "Marker" menus.
These menus assume reversed order since this editor is usually at the
bottom. This change will keep them as expected after #109798.

Pull Request: https://projects.blender.org/blender/blender/pulls/111758
2023-08-31 20:25:35 +02:00
Christoph Lendenfeld
9d0aed6589 Animation: Shear operator for Graph Editor
This is a combination of two PRs from Ares Deveaux: #106521 and #106522

This adds a new operator that allows shearing keys
based on the position of the segment ends.
By pressing `D` while the operator is in modal you can
switch if the operator takes the left or the right segment end as a reference.

Co-authored-by: Ares Deveaux <aresdevo@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111735
2023-08-31 17:09:01 +02:00
Pablo Vazquez
75919610b4 Compositor: Re-organize Add menu
Improve discoverability of items and consistency with other editors.

Split menu into groups, divided by separators, sorting alphabetically
within each group of items. Following how it is done in Geometry Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/111481
2023-08-31 16:32:49 +02:00
Philipp Oeser
726ef2c873 Fix: remove UI code relating to bone layers
Since #109976 was merged, one would run into the following when opening
Bone Relations panel in Properties:

```
/build_linux/bin/4.0/scripts/startup/bl_ui/properties_data_bone.py:228
rna_uiItemR: property not found: Bone.layers
```

So now remove the UI code there (since Bone.layers are no more...)

Pull Request: https://projects.blender.org/blender/blender/pulls/111730
2023-08-31 15:02:07 +02:00
Pablo Vazquez
7ab67dafb3 UI: Theme Editor: Align relevant columns and simplify labels
* Align similar settings in the same column.
* Remove redundant words from similar setting labels.
* Use two-column flow for Collection and Strip colors.
* In Bone Color Sets:
  * align column for a more compact layout
  * Rename "Select" label to "Selected", likely a typo.
2023-08-31 14:59:53 +02:00
Pablo Vazquez
4649cf15b7 UI: Theme Editor: Sort widget colors alphabetically
This way items like Menu, Menu Item, Menu Back, are together.
And overall easier to find what we are looking for.

Also renames "Menu Back" to "Menu Background".
2023-08-31 13:11:48 +02:00
Julian Eisel
0699c9a2b3 Cleanup: make format changes in space_sequencer.py 2023-08-31 13:00:03 +02:00
Marcos Perez
1015bed2fd VSE: Sound equalizer modifier
The sound equalizer is using the Audaspace FFT Convolver.
The blender part creates an array of descriptions of power per "band"
and orders the creation of Equalizer (ISound) in the Audaspace.

Modifier can be created on sound strips. It lets you define
amplification or attenuation over frequency range from 30Hz to 20 kHz.
The power is limited to -30 db - 30 db. This is done using curve
mapping widget.

Co-authored-by: menda <alguien@aqui.es>
Co-authored-by: Richard Antalik <richardantalik@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/105613
2023-08-30 22:36:36 +02:00
Hans Goudey
af56a4f0d3 UI: Remove gap for decorators in node group interface panel
Usually use_property_split is matched with false use_property_decorate
when the settings in the panel aren't animateable, which is the case
here. This matches the panel from before the node panels commit.
2023-08-30 10:34:55 -04:00
Lukas Tönne
e071288ab2 Nodes: Panels integration with blend files and UI
Part 3/3 of #109135, #110272

Switch to new node group interfaces and deprecate old DNA and API.
This completes support for panels in node drawing and in node group
interface declarations in particular.

The new node group interface DNA and RNA code has been added in parts
1 and 2 (#110885, #110952) but has not be enabled yet. This commit
completes the integration by
* enabling the new RNA API
* using the new API in UI
* read/write new interfaces from blend files
* add versioning for backward compatibility
* add forward-compatible writing code to reconstruct old interfaces

All places accessing node group interface declarations should now be
using the new API. A runtime cache has been added that allows simple
linear access to socket inputs and outputs even when a panel hierarchy
is used.

Old DNA has been deprecated and should only be accessed for versioning
(inputs/outputs renamed to inputs_legacy/outputs_legacy to catch
errors). Versioning code ensures both backward and forward
compatibility of existing files.

The API for old interfaces is removed. The new API is very similar but
is defined on the `ntree.interface` instead of the `ntree` directly.
Breaking change notifications and detailed instructions for migrating
will be added.

A python test has been added for the node group API functions. This
includes new functionality such as creating panels and moving items
between different levels.

This patch does not yet contain panel representations in the modifier
UI. This has been tested in a separate branch and will be added with a
later PR (#108565).

Pull Request: https://projects.blender.org/blender/blender/pulls/111348
2023-08-30 12:37:21 +02:00
Campbell Barton
2eceb48ea7 Cleanup: simplify NewGeometryNodeGroupTool poll function
Move inline comment into the space_data doc-string.
2023-08-30 10:57:15 +10:00
Harley Acheson
ddbe073a6d Cleanup: Typo in prior commit.
Copy and Paste error in 468584f5e7
2023-08-29 11:32:19 -07:00
Christoph Lendenfeld
468584f5e7 UI: Handle lack of active area in NewGeometryNodeGroupTool poll
Calling F3 Menu Search while mouse is outside of the blender window
_can_ result in a console error message. This just checks for that
situation.
2023-08-29 11:29:29 -07:00