Commit Graph

1123 Commits

Author SHA1 Message Date
Brecht Van Lommel
680b9a9c35 Merge branch 'blender-v4.1-release' into main 2024-02-07 19:32:39 +01:00
Brecht Van Lommel
bd8a44e169 Lights: Option to use old point light falloff
Add new "Soft Falloff" option on point and spot light that uses
the old light behavior from Blender versions before 4.0. Blend
files saved with those older versions will use the option.

This option is enabled by default on new lights.

Fix #114241

Co-authored-by: Weizhen Huang <weizhen@blender.org>
Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/117832
2024-02-07 19:07:11 +01:00
Falk David
bd22059752 GPv3: Add initial weight paint mode support
This makes it possible to enter and exit weight paint mode in Grease Pencil 3.
No other functionality is added for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/117945
2024-02-07 17:19:43 +01:00
Falk David
0a45acbe3b GPv3: Layer Parenting/Transforms
This implements layer parenting and layer transforms.

* Adds a new "Transform" panel in the object-data properties with the (local) translation, rotation and scale.
* Adds a new "Relations" panel with the parent property (and also bone name in case the parent is an armature).
* When converting from GPv2 to GPv3, the parent and transforms are converted too.
* Bone names are updated if they are renamed in the armature.

Implementation details:
* The positions in the drawings are always in layer space. During extraction, we transform the positions to object space. Note that this could be optimized further and done in the render engine itself.
* This means that e.g. the selection code (which needs to know where the positions are on screen) now takes this transform into account.
* The layer transform is calculated when accessed (from the location, rotation, scale properties).
* Code that needs to know where the positions are on screen now takes this new transform into account.

Pull Request: https://projects.blender.org/blender/blender/pulls/117247
2024-02-07 16:28:14 +01:00
Hans Goudey
78963b466b Mesh: Add "Set Sharpness by Angle" operator
This simple  operator set the edge sharpness attribute on edges,
either extending the existing values or replacing them completely.
It's meant to make it more convenient to manually control the
sharpness now that there can be more reason to do that after
auto smooth became a modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/117918
2024-02-07 14:17:16 +01:00
Pablo Vazquez
537d175289 Outliner: Add shortcut to Add Object and Duplicate
Add shortcuts to the Outliner for consistency and convenience:
* Add Object (Shift+A)
* Duplicate (Shift+D)
* Duplicate Linked (Alt+D)

More info and images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/117922
2024-02-07 12:00:09 +01:00
Thomas Dinges
2c784664e2 Docs: Update rna manual references 2024-02-07 11:09:49 +01:00
Pratik Borhade
7b405646fc Fix #117915: GP: Assign material button is missing
Accidently changed in c412aa1a17

Pull Request: https://projects.blender.org/blender/blender/pulls/117934
2024-02-07 10:01:03 +01:00
Christoph Lendenfeld
446b92d2ce Anim: Graph Editor - automatically lock key translation to a single axis
When moving keys in the Graph Editor animators
usually only want to move them on one axis.
While this is possible in a few ways (G+X, or G + Middle Mouse Button click),
we could default the behavior to always lock on an axis.
This was suggested by Dreamworks animators during the
Animation & Rigging module meeting.
https://devtalk.blender.org/t/2024-01-26-animation-rigging-module-meeting/33081#patch-review-decision-time-5

This PR adds an option with which the movement is
always locked to a single axis by default.
The option can be found in the Graph Editor under "View->Auto-Lock Axis".

The movement will then be restricted to the axis along
which you've moved the cursor the most.
You can still manually override the lock behavior by pressing `X` or `Y`.

I am piggybacking off the auto locking feature you get when pressing the middle mouse button.
When the new feature is enabled I call that at the start of the transformation.
Except when:
* only handles are selected
* the tweak mode has been started on a handle

This is to not snap handles, which is a behavior that has
been requested by the artists.

Pull Request: https://projects.blender.org/blender/blender/pulls/117669
2024-02-06 23:31:09 +01:00
Christoph Lendenfeld
79f84775f2 Anim: Motion Paths in camera space
Animators (especially for film and TV) often need
to track the movement of things in screenspace.
At the end of the day, the pixel motion is what counts.
But motion paths were always in world space,
which made it hard to use when the camera
is also animated (during action scenes e.g.)

This PR introduces the feature of projecting a motion path into the screen space of the active scene camera.

Limitations
This makes the motion path only useful when looking through the active scene camera.
Switching the scene camera using markers is not yet supported.

Technical Implementation
This is achieved by baking the motion path points into the
camera space on creation. For every point calculated,
the camera is evaluated through the depsgraph and
the resulting world matrix is used.
Then I pass in the current frame's world matrix of the
camera into the shader to make sure the points follow it.
As can be seen in the video, it looks quite odd when
viewed at another angle but this is expected.
I mentioned that in the tooltip, so it shouldn't be an issue

Pull Request: https://projects.blender.org/blender/blender/pulls/117593
2024-02-06 23:14:17 +01:00
Guillermo Venegas
0d7282e69b Fix: Presets overriding drag-n-drop data
Currently, internal I/O operators can be invoked with drag-n-drop path
data, and when this happens a quick popup menu is shown to customize
import settings.

If these operators support operator presets, using a preset can
override path data given by drag-n-drop, and that can be unwanted
behavior.

While this can be fixed by setting path properties to SKIP_SAVE, doing
this would make these properties also to stop using ghost values. These
ghost values are used by the file select window to open operator last
import directory, and using this flag makes the file select windows
always open the home directory.

To fix that, add an explicit flag PROP_SKIP_PRESET that skips properties
writing to presets. Also clarify that PROP_HIDDEN and PROP_SKIP_SAVE
also avoid writing to presets.

Added a operator that can clean operator's specific property presets.
Importing presets from previous versions runs an automatic cleanup.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/117673
2024-02-06 20:02:27 +01:00
Jacques Lucke
e1ee422d12 Nodes: improve handling of deprecated nodes
In 4.1 we deprecate the `Rotate Euler` node in favor of the `Rotate Rotation`
node which uses the new rotation socket type. The node is not removed
(for now) because that would come with compatibility issues. More generally,
we'll likely run into the situation where nodes are deprecated more often in the
future, without actually removing them to keep compatibility. This patch improves
how such nodes are handled in the UI.

The patch does three things:
* Adds a new `Utilities > Deprecated` entry in the add node menu in geometry nodes.
* Moves search items which are deprecated to the bottom in the search results
  (currently, this only works in English, can be fixed in bcon3).
* Adds a new `bNodeType->deprecation_notice` that will result in a deprecation
  warning when the node is used.

Pull Request: https://projects.blender.org/blender/blender/pulls/117905
2024-02-06 19:08:01 +01:00
Damien Picard
5b9c176b68 I18n: extract and disambiguate a few messages
Extract:
- Operators' poll messages, including Python-defined ones.
- Use default translation context for the region toggle pie menu.
- Newly created F-Curve modifiers.
- Newly created video tracker track.
- Grease Pencil UV area status message
- Status messages in the graph slider operators.
- Status message "Text <text.py>" when opening .blend with
  auto-executing Python file.

Disambiguate:
- Track: can mean NLA track, video tracking, a tracking marker, or
  a track constraint.
- Tracking: can mean video tracking, or a track constraint.

Issue reported by Gabriel Gazzán.

Pull Request: https://projects.blender.org/blender/blender/pulls/117855
2024-02-06 17:06:30 +01:00
Andrej730
a8e14af167 bl_i18n_utils - bugs saving translations to py files and finding po strings if context is not present in the file
4 changes in this PR:

1) Fixed bug with saving translations to py files - saving sources and comments it didn't add `repr` for the saved strings which was producing unexpected special characters.

Then these special characters sometimes made `translations.py` invalid (e.g., it was failing to load with some `\u` combinations) or was producing invalid characters in .po files created from the `translations.py`.

2) `find_best_messages_matches` used to fail when current message context wasn't found in the .po file. E.g. there were no messages with context "View3D", "Operator", ... and you would try to edit translation for the element that uses that context. I've added a fallback to empty sets to make sure it won't fail and just return the valid result that there are no matches.

3) added minor typing hint for easier code navigation.

4) added print to make it clear what data is printed.

Pull Request: https://projects.blender.org/blender/blender/pulls/116934
2024-02-06 16:58:47 +01:00
Clément Foucault
30f2db21d7 EEVEE-Next: Implement viewlayer filters
Implementation is straightforward.
Filter the components at the sync module
level to avoid uncovered cases.

Fixes the render_layer tests.
2024-02-06 14:34:13 +01:00
Pablo Vazquez
0e706c9699 UI: Move Bone Collection specials menu up
So it's consistent with other lists where the order of buttons is:

1. Add/Remove
2. Specials menu
3. Move up/down
2024-02-06 14:26:43 +01:00
JonasDichelle
567455124d UI: Image Editor Vectorscope Improvement
Update the look of image editor Vectorscope widget (design #116973):
- Colored and Luma options for the point cloud,
- The circles are no longer very low poly,
- Overall grid/background colors are tuned.
- Primary color locations have text labels.

Images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/116974
2024-02-06 12:22:48 +01:00
Matias Mendiola
d589251905 GPv3: Separate operator
This PR adds the "Separate" operator from GPv2.

Changes:
In GPv2 there were three modes: Selected Point, Selected Strokes and Active Layer. For better consistency with meshes Separate Operator, there are now three modes:

- Selected (point or strokes is determined by mode selection)
- By Layers (not only the active one)
- By Materials (new)

Also Multiframe selection is now supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/116715
2024-02-06 12:06:48 +01:00
Campbell Barton
3251a5b280 Cleanup: correct variable name 2024-02-06 18:53:58 +11:00
Campbell Barton
f282c6a3ad Extensions: add handlers for synchronizing & downloading updates
The actual implementation is currently in the add-on.
2024-02-06 18:51:01 +11:00
Campbell Barton
9df61449b2 Extensions: hide the remote URL checkbox for repositories
Being able to change a remote repository to a local one or vice-versa
seems obscure enough to disable entirely although it can still be done
from the Python API.

Add icons to the UI-list to differentiate local/remote repositories.

Ref #117840.
2024-02-06 15:04:41 +11:00
Miguel Pozo
2c385a03f6 EEVEE-Next: Remove Light Probes visibiility options for Lights
This is not supported yet.
2024-02-05 18:29:49 +01:00
Hans Goudey
e6188d0976 Camera: Make alpha a factor property
Removes the need to manually specify the slider state when defining the UI.
2024-02-05 12:26:00 -05:00
Damien Picard
fa77e9142d UI: fix and improve a few messages
- "can not" -> "cannot" in many places (ambiguous, also see
  Writing Style guide).
- "Bezier" -> "Bézier": proper spelling of the eponym.
- Tool keymaps: make "Uv" all caps.
- "FFMPEG" -> "FFmpeg" (official spelling)
- Use MULTIPLICATION SIGN U+00D7 instead of MULTIPLICATION X U+2715.
- "LClick" -> "LMB", "RClick" -> "RMB": this convention is used
  everywhere else.
- "Save rendered the image..." -> "Save the rendered image...": typo.
- "Preserve Current retiming": title case for property.
- Bend status message: punctuation.
- "... class used to define the panel" -> "header": copy-paste error.
- "... class used to define the menu" -> "asset": copy-paste error.
- "Lights user to display objects..." -> "Lights used...": typo.
- "-setaudio require one argument" -> "requires": typo.

Some issues reported by Joan Pujolar and Tamar Mebonia.

Pull Request: https://projects.blender.org/blender/blender/pulls/117856
2024-02-05 17:08:17 +01:00
Bastien Montagne
fd0d84095d I18N: Fix missing Danish language.
We had inherited Danish translation file in the repository from over a
decade ago, but it was never since then an active translation, and
therefore was never added back to the current list of known languages.

Since the file exists now and is exposed in Weblate
(translate.blender.org), language entry should be created in our
settings, such that e.g. PO files do get updated with all the others!
2024-02-05 16:47:08 +01:00
Nika Kutsniashvili
2274f58ef2 UI: Remove empty space in Custom Properties panel
Remove empty space in Custom Properties panel, and align buttons in a row.

Pull Request: https://projects.blender.org/blender/blender/pulls/115913
2024-02-05 14:34:14 +01:00
Nika Kutsniashvili
c4e077341e UI: VSE: Move Onion Skin properties inside Annotations panel
Make Onion Skin a sub-panel of Annotations, to match the rest of Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/116060
2024-02-05 12:41:16 +01:00
Pratik Borhade
0228994d6d GPv3: Isolate Layers
This ports the legacy operator to grease pencil v3.

Pull Request: https://projects.blender.org/blender/blender/pulls/117784
2024-02-05 12:30:24 +01:00
Nika Kutsniashvili
f2c8f31a3c UI: Add 'Channels' region toggle in animation editors
This way users can also assign shortcut to it or add it to quick favourites.

Pull Request: https://projects.blender.org/blender/blender/pulls/117837
2024-02-05 12:13:31 +01:00
Matias Mendiola
dcc5725741 GPv3: Move to Layer
This PR adds the Move to Layer operator from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117244
2024-02-05 12:02:51 +01:00
Campbell Barton
63ce2fbc0c Extensions: default to paths in {BLENDER_RESOURCE_PATH_USER}/extensions
Replace: {BLENDER_RESOURCE_PATH_USER}/scripts/extensions
With:    {BLENDER_RESOURCE_PATH_USER}/extensions

This makes more sense as not all extensions are scripts.
2024-02-03 14:17:54 +11:00
Sean Kim
c15d1b8ccb UI: Add visual indicator for automasking state
This adds a visual toggle for sculpt automasking in both regular and Grease Pencil modes.

If no automasking settings are used, use the icon `CLIPUV_DEHLT`, otherwise it is CLIPUV_HLT.
As it was agreed on in #117467

Addresses #102585

Pull Request: https://projects.blender.org/blender/blender/pulls/117649
2024-02-02 14:34:43 +01:00
Pratik Borhade
561363dbed GPv3: Dopesheet UI template
Includes add/remove layer, move up/down layer operators in dopesheet UI.

Part of #110056

Pull Request: https://projects.blender.org/blender/blender/pulls/117628
2024-02-02 13:11:55 +01:00
Campbell Barton
adb304f0ed Extensions: improve UI for adding/removing repositories
- Adding new repositories now differentiates between "Online" & "Local"
  where adding a local repository doesn't prompt for a URL.
- Support removing repositories and their files (uses confirmation
  defaulting to "Cancel" to avoid accidents).
- Show an error icon next to repositories that have invalid settings,
  these repositories are now ignored until the settings are corrected,
  required fields are highlighted red when they're unset & required.
- Rename "directory" to "custom_directory" since an automatic path is
  used when not set - created in the users scripts directory.
- Use toggles for custom-directory & remote URL instead of relying on
  the value to be left an empty string for alternative behavior.
2024-02-02 20:46:45 +11:00
Brecht Van Lommel
c04a79622c Cleanup: make format 2024-02-01 21:33:05 +01:00
Sean Kim
f3c401ef6f UI: Update default mask icon
Based on the design of #102585, This PR replaces the MOD_MASK icon with
the CLIP_UVDEHLT icon to better communicate the intent of masking across
many areas of Blender. It also changes the Grease Pencil `invert` icons
to avoid conflicts with the CLIPUV_DEHLT & CLIPUV_HLT.

Pull Request: https://projects.blender.org/blender/blender/pulls/117467
2024-02-01 20:56:18 +01:00
Jun Mizutani
8ecc654788 UI: Preferences: Sort widget label style settings
Sort Text Style settings hierarchically:

1. Panel Title
2. Widget Label
3. Widget

Pull Request: https://projects.blender.org/blender/blender/pulls/113990
2024-02-01 17:25:28 +01:00
Falk David
898ff6ceee Revert "GPv3: Array modifier"
This reverts commit e1ce3c3cc7.
2024-02-01 16:18:13 +01:00
YimingWu
e1ce3c3cc7 GPv3: Array modifier
Grease Pencil Array modifier migrated to GPv3.

All features now working as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/117722
2024-02-01 15:58:53 +01:00
Hans Goudey
f4867c0d70 Geometry Nodes: Add Rotate Rotation node
This is meant as a replacement for the Rotate Euler node. Overall it
should be more performant, and the clarity given by the separate socket
type should help distinguish its purpose.

The Rotate Euler node is removed from search and the add menu by this
commit. In the future it can be versioned away. That isn't done now to
avoid a breaking API change and to make this commit less risky.

Pull Request: https://projects.blender.org/blender/blender/pulls/116106
2024-02-01 14:29:30 +01:00
casey bianco-davis
1b6e3d46a9 GPv3: Add stroke_reorder operator
This implements the `stroke_arrange` operator for grease pencil v3.
This behaves the same as `GPENCIL_OT_stroke_arrange` but renamed to `stroke_reorder`.
It should be more clear what the operator does.

Note: This also adds new key binds.

Co-authored-by: Falk David <filedescriptor@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/116682
2024-02-01 13:15:23 +01:00
Campbell Barton
c9ad858d9d Extensions: update manifest to bl_info conversion
Update extension to bl_info conversion to account for recent changes.
2024-02-01 22:42:24 +11:00
Campbell Barton
fb29925158 Extensions: support addon_utils.module_bl_info() for enabled extensions
Add-ons "bl_info" was supported for add-ons which weren't registered,
however the real modules weren't handled causing module_bl_info()
to return dummy values when an extensions add-ons module was passed in.

This caused the minimum Blender version check after enabling an add-on
to do nothing.

Now the "bl_info" from extension modules is ignored and the bl_info
is created on demand from the manifest.
2024-02-01 17:11:15 +11:00
Campbell Barton
355fd2313d Extensions: detect time-stamp changes to extensions manifest on refresh
- Add a warning when an extensions meta-data is missing.
- Remove the time-stamps from message that time-stamps have changes
  since knowing the exact times isn't helpful.
2024-02-01 17:03:47 +11:00
Campbell Barton
3906bf0174 Extensions: only hide the add-ons UI when the panel has been extended
Now disabling the extensions add-on restores the original UI.
2024-02-01 17:03:44 +11:00
Campbell Barton
dd641d15d0 Fix is_extended method for UI classes (menu, panel, headers... etc)
Appending then removing a draw function caused the is_extended()
method to return true afterwards, resolve by checking if there are
multiple draw functions.
2024-02-01 17:03:42 +11:00
Campbell Barton
a8e73616b9 Cleanup: rename add-on related variables for clarity
- Rename info to bl_info, to avoid confusion with extensions manifest,
  which should eventually be accessible in a similar way.
- Rename module_name to addon_module_name to avoid confusion with
  extension repositories name-spaced modules.
- Clarify naming for TOML manifest.
2024-02-01 17:03:40 +11:00
Harley Acheson
93562a1cc5 UI: Image Rotate
Operator to rotate images in 90 degree increments.

Pull Request: https://projects.blender.org/blender/blender/pulls/117352
2024-01-31 23:36:28 +01:00
Lukas Tönne
7e7165b085 GPv3: Basic vertex group operators
Adds vertex groups and basic operator support to the `GreasePencil` data
block.

Vertex groups in the `GreasePencil` ID are used as the source of truth
for vertex groups names and ordering in the UI. Individual drawings also
have vertex group lists, but they should not be modified directly by
users or the API. The main purpose of storing vertex group names in in a
drawing's `CurveGeometry` is to make it self-contained, so that vertex
weights can be associated with names without requiring the
`GreasePencil` parent data.

Vertex group operators are implemented generically for some ID types.
Grease Pencil needs its own handling in these operators. After
manipulating `vertex_group_names` the `validate_drawing_vertex_groups`
utility function should be called to ensure that drawings only contain a
true subset of the `GreasePencil` data block.

Operators for assigning/removing/selecting/deselecting vertices are also
implemented here. To avoid putting grease pencil logic into the generic
`object_deform.cc` file a number of utility functions have been added in
`BKE_grease_pencil_vgroup.hh`.

Fixes #117337

Pull Request: https://projects.blender.org/blender/blender/pulls/117476
2024-01-31 17:45:59 +01:00
Lukas Tönne
53da2b2d48 Support for enum items parameter in rna_idprop_ui_create
This is an optional parameter for int properties, which then show up as
enum properties.

Included fix: reset ID properties' enum items when the `items` parameter is `None`.

Example usage:
```python
import rna_prop_ui
# Add a regular int property.
rna_prop_ui.rna_idprop_ui_create(D.objects['Cube'], "test", default=123, min=-3, max=500)
# Change to an enum property with items (min/max are ignored).
rna_prop_ui.rna_idprop_ui_create(D.objects['Cube'], "test", default=0, min=-10, max=10, items=[("APPLES", "Apples", ""), ("ORANGES", "Oranges", "")])
# Switch back to regular int property.
rna_prop_ui.rna_idprop_ui_create(D.objects['Cube'], "test", default=1, min=0, max=10)
```

Pull Request: https://projects.blender.org/blender/blender/pulls/117289
2024-01-31 13:27:15 +01:00