Commit Graph

3492 Commits

Author SHA1 Message Date
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
Campbell Barton
88a875ec3a Fix #111702: Crash accessing KeyMapItem.properties on script reload 2023-08-31 12:04:30 +10: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
Julian Eisel
d5bac0421f Fix warning print when running asset shelf UI template
Was printing the following warning:
  Warning: 'MyAssetShelf' does not contain '_AST_' with prefix and suffix

I followed some other template for the naming, apparently the "Ui Tool
Simple" one, but that doesn't print the warning.
2023-08-30 16:26:55 +02: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
e1b72e569d Fix #111649: 3rd party Python modules can cause Python error on exit
Disabling all add-ons on exit could raise exceptions when `sys.modules`
contained modules that ran logic in their `__getattr__` function.

Resolve by accessing the modules name-space directly,
bypassing the `__getattr__` function.
2023-08-30 16:16:24 +10: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
Iliya Katueshenock
48b08199d5 Geometry Nodes: Points to Curves node
New node to converts groups of points to curves. Groups
of points defined as `Curve Group ID` attribute. `Weight` in curve
is used for sort points in each group. Points of result curves
propagate attributes from original points. Implicit conversion
of other geometry types is not supported currently.

Pull Request: https://projects.blender.org/blender/blender/pulls/109610
2023-08-29 16:52:20 +02:00
Jeroen Bakker
f0385d7a9e Cleanup: Make format 2023-08-29 15:30:13 +02:00
persun
50afd1f05d UI: Rename and reorder group operators in Node Editor menus
Rename and reorder group operators in Node Editors header "Node" and
context menu for consistency and clarity.

Pull Request: https://projects.blender.org/blender/blender/pulls/111505
2023-08-29 15:05:42 +02:00
Sybren A. Stüvel
998136f7a7 Anim: replace Bone Groups & Armature Layers with Bone Collections
Armature layers (the 32 little dots) and bone groups are replaced with
Bone Collections:

- Bone collections are stored on the armature, and have a name that is
  unique within that armature.
- An armature can have an arbitrary number of bone collections (instead
  of the fixed 32 layers).
- Bones can be assigned to zero or more bone collections.
- Bone collections have a visibility setting, just like objects in scene
  collections.
- When a bone is in at least one collection, and all its collections in
  are hidden, the bone is hidden. In other cases (in any visible
  collection, or in no collection at all), the bone visibility is
  determined by its own 'hidden' flag.
- For now, bone collections cannot be nested; they are a flat list just
  like bone groups were. Nestability of bone collections is intended to
  be implemented in a later 4.x release.
- Since bone collections are defined on the armature, they can be used
  from both pose mode and edit mode.

Versioning converts bone groups and armature layers to new bone
collections. Layers that do not contain any bones are skipped. The old
data structures remain in DNA and are unaltered, for limited forward
compatibility. That way at least a save with Blender 4.0 will not
immediately erase the bone group and armature layers and their bone
assignments.

Shortcuts:

- M/Shift+M in pose/edit mode: move to collection (M) and add to
  collection (shift+M). This works similar to the M/Shift+M menus for
  objects & scene collections.
- Ctrl+G in pose mode shows a port of the old 'bone groups' menu. This
  is likely to be removed in the near future, as the functionality
  overlaps with the M/Shift+M menus.

This is the first commit of a series; the bone collections feature will
be improved before the Blender 4.0 release. See #108941 for more info.

Pull request: https://projects.blender.org/blender/blender/pulls/109976
2023-08-29 14:31:18 +02:00
Sybren A. Stüvel
042c5347f4 Anim: move bone colors from bone groups to individual bones
Move control over the color of bones from bone groups to the bones
themselves. Instead of using bone groups (which are defined on the pose,
and thus owned by the object), the color is stored on:

- the bone (`struct Bone`, or RNA `armature.bones['bone_name'].color`)
- a possible override on the pose bone (`struct bPoseChannel`, or RNA
  `ob.pose.bones['bone_name'].color`).

When the pose bone is set to its default color, the color is determined
by the armature bone. In armature edit mode, the armature bone colors
are always used, as then the pose data is unavailable.

Versioning code converts bone group colors to bone colors. If the
Armature has a single user, the group color is stored on the bones
directly. If it has multiple users, the group colors will be stored on
the pose bones instead.

The bone group color is not removed from DNA for forward compatibility,
that is, to avoid immediate dataloss when saving a 3.6 file with 4.0.

This is part of the replacement of bone groups & armature layers with
bone collections. See the design task at #108941.

Pull request: https://projects.blender.org/blender/blender/pulls/109976
2023-08-29 14:31:18 +02:00
Julien Kaspar
44750edb31 Fix #111533: Sequencer selection broken with IC keymap
Clears Tweak Tool keymap entries and prevents inheritance from the
default keymap.

Ref !111625
2023-08-29 17:29:21 +10:00
Campbell Barton
7abf5fc093 Cleanup: format, single quote enums 2023-08-29 15:09:05 +10:00
Rawalanche
411cd827b7 Nodes: Move Auto-Offset toggle to User Preferences
Move Auto-Offset toggle from Node Editor View menu
into the Editing > Node Editor section of User Preferences,
to reflect its use as a workflow option not configured
per editor or per file.

Pull Request: https://projects.blender.org/blender/blender/pulls/111589
2023-08-29 01:18:33 +02:00
Bastien Montagne
5ba692898e I18N/UI messages fixes. 2023-08-28 18:02:31 +02:00
Gilberto Rodrigues
fb6687a790 Viewport: Add toggle for edit mode overlays fresnel
Adds a userpref toggle for the edit mode overlays fresnel.
The edit mode fresnel is only a bit useful in edge cases, like
very dense photogrametry, and the problem is that it causes
more eye strain when modeling for many hours. And it's
benefit on shape readability is small compared to it's negative
impact on selection visibility. It makes the selection color to a
darker less saturated color instead of the theme color, which
leads to worse contrast between the selection and the mesh
or with the background, and also makes the unselected (black)
brighter, also reducing contrast. So it's off by default.

This was split up from https://projects.blender.org/blender/blender/pulls/110097

Pull Request: https://projects.blender.org/blender/blender/pulls/111494
2023-08-28 15:29:25 +02:00
Gilberto Rodrigues
1f4c7a36df Wireframe color option for all shading modes
Enables three options of wireframe color for all shading modes: theme color, object color
and random color.  Previously this was exclusive to the wireframe shading mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/111502
2023-08-28 11:04:40 +02:00
Campbell Barton
19850496cb Cleanup: remove unused function, format 2023-08-26 17:05:19 +10:00
Harley Acheson
7405993cb7 UI: Object Types Visibility Popover Tweaks
Visual changes to the Object Types Visibility Popover, adding icons,
changes to order and alignment, and tooltips.

Co-authored-by: Pablo Vazquez <pablo@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/111285
2023-08-25 22:17:48 +02:00
Julian Eisel
e57726594d Fix missing context attribute access in asset shelf polls
When creating a new main window, the `context.object` attribute wouldn't
exist, causing an error message to be printed.

Rather than checking if the attribute extists, query the mode from
context directly (this is always available), rather than querying it
through the active object.
2023-08-25 19:38:09 +02:00
Campbell Barton
b150b47720 UI: add a preference for the number of samples used for FPS playback
This was hard coded to 8, which can still result in a number that
jitters making the overall FPS difficult to measure.

The default is still 8, but this is now a preference that can be
increased for values that don't jitter as much.
2023-08-25 19:33:48 +10:00
Campbell Barton
7074c210cc Cleanup: format 2023-08-25 09:40:42 +10:00
Pablo Vazquez
fb2a657bdc Fix: wrong sorting in Add menu in recent commit
`Edges to Face Groups` comes after `Edge Vertices`, didn't
notice it was plural. Thanks Dalai for pointing it out.
2023-08-24 16:15:43 +02:00
Pablo Vazquez
968e35d703 Geometry Nodes: Sort Add menu entries
* In Input → Scene, move:
  * `Scene Time` above `Self Object`

* In Geometry, move:
  * `Geometry to Instance` above `Join Geometry`

* In Curve → Topology, move:
  * `Curve of Point` above `Offset Pint in Curve`

* In Mesh → Read, move:
  * `Face Group Boundaries` above `Face Neighbors`
  * `Edges to Face Groups` above `Edge Vertices`
2023-08-24 16:10:08 +02:00
Hans Goudey
34e4bedcd8 Nodes: Move rotation socket out of experimental
See #92967.

Pull Request: https://projects.blender.org/blender/blender/pulls/111448
2023-08-24 15:28:07 +02:00
Philipp Oeser
44ba616614 Fix #108782: Fcurve Modifer shortcut does not work in channels region
Since the 5e1470d1b3 / 0f51b5b599 the `fmodifier_add` operator has
moved to the Channel menu in the Graph Editor and also the channels
context menu in the channels region. The shortcut was not working in the
channels region though since the operator was only in the keymap for the
main region (not the channels region).

Now move the keymap entry to the generic keymap of the Graph Editor so
it works in both regions.

Pull Request: https://projects.blender.org/blender/blender/pulls/111378
2023-08-24 15:10:57 +02:00
Hans Goudey
45d8a8b0c3 Geometry Nodes: Initial basic rotation socket nodes
This PR adds an initial set of nodes using the new rotation socket.
6 nodes build rotations or convert them to other formats, a 7th rotates
a vector with a rotation, and the last inverts rotations.

The design task #109965 describes the choice to use separate nodes
for the rotation construction and separation operations. In the future,
a "Switch Node" operator (#111438) will help to make working with
these separated nodes faster.

- **Axis Angle to Rotation**
- **Rotation to Axis Angle**
- **Combine Quaternion**
- **Separate Quaternion**
- **Euler to Rotation**
- **Rotation to Euler**
- **Rotate Vector**
- **Invert Rotation**

See #92967

Pull Request: https://projects.blender.org/blender/blender/pulls/109030
2023-08-24 14:58:55 +02:00
Pablo Vazquez
577c0b4b46 Compositor: Refactor Add menu
Refactor the Add menu in the Compositor, with manually created menus,
inspired by Geometry Nodes.

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

This is the first part of the re-organization of the Add menu project,
proposal coming in another patch after this.

Pull Request: https://projects.blender.org/blender/blender/pulls/111282
2023-08-24 13:46:11 +02:00
Hans Goudey
550c15bccd Geometry Nodes: Move tool-specific nodes to proper menus
Instead of putting all the tool specific nodes (inputs, operations, etc)
in a single menu, use the existing categories. This is similar to how
the shader editor shows nodes depending on which render engine
is enabled. It's also more scalable for when more tool-specific nodes
are added.

---

I discussed this with Pablo on Tuesday-- it came up when we talked
about the organization of the compositor add menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/111449
2023-08-24 13:34:15 +02:00
casey bianco-davis
5bed3ef827 GPv3: Dissolve Operator
Adds the Dissolve operator.

note that this pull request contains some of the same menu code also included in #110938

Pull Request: https://projects.blender.org/blender/blender/pulls/111079
2023-08-24 11:06:18 +02:00
Hans Goudey
7c2dc5183d Nodes: Remove "Make Group" and "Ungroup" from add menu
Since these are operations rather than new nodes, they don't make
sense in the add menu. They are also available in the "Node" menu
in the editor's header and in the context menu.
2023-08-23 15:52:22 -04:00
Miguel Pozo
85b02b893a Workbench-Next: Enabled by default
Replace Workbench with Workbench Next.
The old Workbench code is still there for now,
but it should be unreachable.

Pull Request: https://projects.blender.org/blender/blender/pulls/111403
2023-08-23 15:09:37 +02:00
Julian Eisel
7bb693581f UI: Move asset shelf out of experimental
This makes the asset shelf available as a standard, non-experimental
feature. Currently no script makes use of it, so it will still not be
available. However the pose library will be updated to use this for its
UI instead.

Initially the asset shelf was committed as experimental feature, even
though it seemed ready for non-experimental. After double checking with
some people (Dalai and Brecht) we decided to go ahead with this.

There are still some futher changes planned, see #107881.
2023-08-23 12:15:33 +02:00
Philipp Oeser
b4c380acb4 Fix #109427: Shortcut missing in animation editors channel context menu
Specifying the correct operator context (`INVOKE_REGION_CHANNELS` in
this case) is mandatory, otherwise looking up the shortcut in
`wm_keymap_item_find_props` will fetch the wrong region
(`RGN_TYPE_WINDOW` not `RGN_TYPE_CHANNELS`) and thus wont find the keymap
item in that region keymap.

This was already done for the other menus, not for the context menu
though.

Pull Request: https://projects.blender.org/blender/blender/pulls/111376
2023-08-23 09:40:27 +02:00
Clément Foucault
acd6dd96b7 Camera: Move panoramic projection settings to DNA
This is in prevision of EEVEE panoramic projection support.

EEVEE-Next is planned to add support for these parameters.
Not having these parameters in Blender DNA will make Cycles
and EEVEE not share the same parameters and will be confusing
for the user.

We handle forward compatibility by still writing the parameters
as ID properties as previous cycles versions expect.

Since this change will break the API compatibility it is crucial
to make it for the 4.0 release.

Related Task #109639

Pull Request: https://projects.blender.org/blender/blender/pulls/111310
2023-08-22 15:49:34 +02:00
Zijun Zhou
a9053f7efb Color management: Add AgX view transform and make it default
On a user level this view transform provides much better handling of colors in
the over-exposed areas.

With this configuration the following display devices are available, including
AgX view transform for them:
* sRGB
* Display P3
* Rec.1886
* Rec.2020

NOTE: There is no Filmic view transform available for the newly added display
devices.

AgX also brings an implementation of False Colors view transform, which replaces
Filmic-based, and is available for all display devices.

The backward compatibility is preserved. The new files will default to AgX view
transform, which makes it non-forward compatible.

More technical details is available in the original PR #106355.
Please note that the PR has been split into more incremental changes when
was landing.

Pull Request: https://projects.blender.org/blender/blender/pulls/111099
2023-08-22 12:53:15 +02:00
Julien Kaspar
920271da42 Keymap: Left and Right Click consistency improvements
Fix some remaining consistency issues for selection shortcuts for both
left and right click select.

Based on design of #105298

Grease Pencil:

Instead of using `Alt Select` shortcuts for selecting whole strokes,
these are now following existing standards with `L` and `Shift L` from
select linked pick operations.

`Alt Select` keys are instead used for selecting individual components
in modes that use brushes just like [0].

Regular selection like `Select` and `Shift Select` are now always mapped
to ensure that all keymap configurations are able to select individual
components in every mode.
This does not cause conflicting behavior with brushes.

Lasso Select shortcuts on `Ctrl Alt` and `Shift Ctrl Alt` have been
removed. These were duplicates and are not needed.

Mesh Sculpt Mode:

Mesh sculpt mode uses correct lasso masking shortcuts in both right and
left click select. These are now the same as lasso selection shortcuts
in other modes.

Ref !110960.

[0]: fb54d3f865
2023-08-22 15:47:07 +10:00
Campbell Barton
6a169cfe73 Cleanup: use rna_idprop_quote_path utility function in rna_prop_ui 2023-08-22 13:34:25 +10:00
Jeroen Bakker
8b311daf0a Cleanup: Make format 2023-08-21 15:03:43 +02:00
Bastien Montagne
b3c7f3c8a9 UI: Add initial UI support for ID pointers custom properties.
Customprops to IDs are supported since years through code, but were
never exposed directly in the UI of customporperties.

This commit mainly:
* Adds a new `DATA_BLOCK` type to UI customprops types.
* Exposes the existing `id_type` settings to python API.

Pull Request: https://projects.blender.org/blender/blender/pulls/110458
2023-08-21 14:14:26 +02:00