Commit Graph

2296 Commits

Author SHA1 Message Date
Falk David
a5c4218b02 Fix: Outliner: Grease Pencil object filter
The filter for grease pencil objects wasn't showing up.
The code was still checking for the legacy type.
Now, we're checking for the right object type and
are also looking at the `bpy.data.grease_pencils_v3`
list to make the checkbox show up in the UI.
2024-07-19 18:01:47 +02:00
Sean Kim
972fadf5a4 Fix: Sculpt: Various tools not using crosshair cursor
Follow up to !123570

With !122709, many Sculpt tools were changed to remove the visual brush
radius displayed by the brush cursor to avoid confusing users. This had
the unintended side effect of forcing these tools to use the default
arrow cursor.

This commit adds the PAINT_CROSS cursor back to various Sculpt Mode
tools to remain consistent within the overall mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/124946
2024-07-18 18:14:21 +02:00
Harley Acheson
e802fe1433 UI: Screen Area Docking Experimental Feature
Improvements to Area maintenance, adding the ability to move and dock
areas to any location, including between multiple windows. Allows
transitioning between splitting, joining, moving, and docking without
early commit. Improved visual feedback. Design Doc #124915. Added
as experiment feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/123414
2024-07-18 02:47:32 +02:00
Campbell Barton
c7a26cf5c2 Fix #124850: Add-on legacy replacement fails without remote repo data
When the user attempted to install a previously enabled add-on as an
extension after enabling online access and *without* viewing extensions,
installation would fail.

Resolve by adding a check that the remote repository data is available,
adding a button to refresh remote repositories if it's not.
2024-07-17 22:42:16 +10:00
il4n
94d2d64ec7 Fix: Broken menus in VSE
The Select > All menu option was missing, and the logic for showing
the retiming menus was broken.

This was accidentally introduced in 2aa346a123

Pull Request: https://projects.blender.org/blender/blender/pulls/124785
2024-07-17 13:12:43 +02:00
Pratik Borhade
3875ceb280 Fix #124647: UV editing console error due to missing enum
IMAGE_AST_brush_paint poll should check context.space_data.mode
rather than context.space_data.ui_mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/124762
2024-07-16 19:23:22 +02:00
Aaron Carlisle
63435d19e9 Merge branch 'blender-v4.2-release' 2024-07-16 02:23:40 -04:00
Aaron Carlisle
a51f293548 Docs: Fix RNA to manual mapping
a39fa10b5b used the 4.3 manual instead of 4.2
2024-07-16 02:20:19 -04:00
Campbell Barton
fd5780e97b PyAPI: add bpy.utils.register_preset_path utility function
Support add-ons including their own preset paths,
needed to resolve #124020.
2024-07-16 15:50:28 +10:00
Thomas Dinges
a39fa10b5b Manual: Update RNA references for 4.2 2024-07-15 17:35:59 +02:00
Thomas Dinges
8aedcd5143 Merge branch 'blender-v4.2-release' 2024-07-15 16:41:40 +02:00
Jeroen Bakker
b761d3435f Image Plane: Add support for EEVEE
- Fixes incorrect handling of incompatible engines. There is a global list of compatible
  engines, but `create_cycles_material` didn't use it, displaying an incorrect warning
  when using the operator.
- Add `BLENDER_EEVEE_NEXT` to compatible engines.
- Remove `BLENDER_EEVEE` from compatible engines.
- Add render method option. This replaces the material `blend_method`
- Remove material blend method option (replaced by `render_method`)
- Remove material shadow option. Not needed anymore as shadows use
  the node tree for evaluation.

**TODO**
- Manual should still be updated. Will be done after this patch lands.
- I did some basic tests. I am not familiar with this operator, but think it
  should handle all the different cases. Would be nice to have some
  render tests for this to detect regressions.

Implements: #122315
Pull Request: https://projects.blender.org/blender/blender/pulls/124094
2024-07-15 15:35:57 +02:00
Clément Foucault
c7bcd1137f Fix: UI: Hide studiolight world orientation button for Cycles
This option is not available in EEVEE anymore. Limit the
visibility to Workbench.

Fix #124521

Pull Request: https://projects.blender.org/blender/blender/pulls/124717
2024-07-15 11:59:26 +02:00
Campbell Barton
6120b2f605 Merge branch 'blender-v4.2-release' 2024-07-14 21:19:45 +10:00
Campbell Barton
b5145d6889 Fix #121469: "Enable Add-on" ignored when already installed
The logic to handle disabling, upgrading & re-enabling extensions
incorrectly assumed all installed add-ons were enabled.

Resolve by only using this logic on installed & enabled add-ons.
2024-07-14 21:14:14 +10:00
Campbell Barton
8fdb190278 Cleanup: typos in comments (duplicate words) 2024-07-14 18:55:43 +10:00
Falk David
ec2839e0ee GPv3: Draw Tool: Enable eraser while holding CTRL
This allows the draw tool to temporarily enable the eraser.

Adds a new `BrushStrokeMode` called `BRUSH_STROKE_ERASE`.
This is used by the keymap to enable erasing while using
the draw tool with CTRL.

Pull Request: https://projects.blender.org/blender/blender/pulls/124591
2024-07-12 16:07:28 +02:00
Lukas Tönne
0a70096a5b GPv3: Interpolate Tool
Interpolation tool for strokes ported from GPv2.

Adds a new operator that inserts a new frame with interpolated curves.
The source curves are taken from the previous/next keyframe.

Co-authored-by: Hans Goudey <hans@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/122155
2024-07-12 15:59:56 +02:00
Sebastian Parborg
20641b81bc Fix: Move the mono toggle above the pan slider in the VSE 2024-07-12 15:43:27 +02:00
Sebastian Parborg
fb6aaf3200 VSE: Expose subframe sound offset to the end user
It is now possible to adjust the built in sound offset of the sound
strips.
2024-07-12 15:43:27 +02:00
Sybren A. Stüvel
d828e9471e Anim: add concept of 'active slot'
Add the concept of 'active slot' within an Action. This allows
clicking on a slot in the Action editor, to select it and mark it as
'active'.

Note that this does _not_ add support for action slots in
`ANIM_set_active_channel()`, as that function doesn't get enough info
to do that, and refactoring it is not on my wishlist.

RNA property `action.slots.active` can be used to access and set the
active slot in Python. `slot.active` can be used to query the slot's
active state, and is read-only (so that there is one way to set the
active slot).

A panel in the Action editor shows info about the active slot. This
panel is just a minimal UI that shows the name and an icon
representing the idtype of the active slot.

Pull Request: https://projects.blender.org/blender/blender/pulls/124422
2024-07-12 11:59:04 +02:00
Lukas Tönne
3d4b8f91e7 GPv3: Fill tool overlay for extension lines and circles
The (GPv2) fill tool has an "extension" mode to assist with filling
small gaps where strokes don't fully meet.

- Overlay: Draws various helpers during modal fill tool operation, using
  the same functions as the render-to-image used for applying the fill
  tool.
- Extension lines: Scrolling or page up/down extends the tips of strokes
  and draws extra boundary lines to limit filling.
- Extension circles: Press S to toggle the mode. This draws circles
  around stroke tips.
- Stroke overlay: This can be enabled in the brush settings
  (_Advanced > Visual Aids_) to draw strokes in a simple color on top of
  the viewport.
- Extension line collision: Tests for intersections of extension lines
  with other lines and with strokes, and cuts them short. Enable in
  brush settings (_Advanced > Strokes Collision_).
- Better defaults for extension increments: The values are in Blender
  units, and quite arbitrary. Using lower values makes it feel more like
  GPv2 in the 2D animation template.
- Draw functions in the `ed::greasepencil::image_render` namespace now
  consistently expect coordinates in view space (avoids confusion and
  works better for 2D elements).
- Some internal renaming and cleanup (many variable names come from GPv2
  and were not very clear).

Pull Request: https://projects.blender.org/blender/blender/pulls/122771
2024-07-12 11:11:17 +02:00
Campbell Barton
607ad28604 Merge branch 'blender-v4.2-release' 2024-07-12 16:25:49 +10:00
Campbell Barton
3358f427dd Fix #124457: Error enabling installed extension after failure to load
When Blender started with an extension enabled from a repository that
referenced a directory that didn't exist - creating the directory
and extensions would fail to import the extension.

This happened because the missing state of the module was cached.

Resolve by clearing Python's path cache for the repository after
running install actions which may have created the directory.

Also run importlib.invalidate_caches() when manually refreshing local
extensions to ensure modules cached as missing can be imported if
they have become available.
2024-07-12 16:22:09 +10:00
Julian Eisel
70dc26cbef Fix: Empty tool settings with primitive tools in grease pencil draw mode
`UnifiedPaintPanel.get_brush_mode()` may return `None` when the current
tool doesn't use brushes. In the specific case of primitive tools
("Line", "Polyline", "Arc", etc) in grease pencil draw mode, the tools
actually should use brushes, but this isn't implemented properly yet
with brush assets. Still handle this case cleanly.
2024-07-11 19:28:22 +02:00
Jacques Lucke
6107175edb Cleanup: make format 2024-07-11 18:46:14 +02:00
YimingWu
2aa346a123 VSE: Check for scene.sequence_editor != None in UI
Sometimes context.scene.sequence_editor can be None, this fix check for
that and prevents python error.
2024-07-11 23:30:04 +08:00
Falk David
5133a498b1 GPv3: Expose overlay options in UI
This exposes existing overlay options from GPv2
in the overlay settings in the 3D viewport.
2024-07-11 15:38:10 +02:00
Julian Eisel
c6885e00d3 Fix: Missing brush tool in grease pencil weight paint mode
Tools for grease pencil v3 weight paint mode weren't updated in
7b0ea0f1b4. Possibly because there was some back and forth in grease
pencil modes while this was being worked on.
2024-07-11 12:16:21 +02:00
Campbell Barton
c4ed24ce9f Merge branch 'blender-v4.2-release' 2024-07-11 17:57:00 +10:00
Campbell Barton
569ccbec59 Merge branch 'blender-v4.2-release' 2024-07-11 17:56:58 +10:00
Campbell Barton
319684d8f6 Extensions: warn when extensions violate module policies
As each extension has it's own package, any modules it includes must be
imported as sub-modules. Warn if extensions are including themselves
in the sys.path as this breaks name-spacing of extensions.

Show these warnings in the add-on & extensions UI.
2024-07-11 17:50:30 +10:00
Campbell Barton
0bfea7caea Extensions: fix error it tests where the local repo wasn't cleared
Tests interfered with each other because the local repo path wasn't
cleared between different tests.
2024-07-11 17:37:31 +10:00
Campbell Barton
fa46ed2c98 Merge branch 'blender-v4.2-release' 2024-07-11 14:23:41 +10:00
Campbell Barton
9ffc973918 Fix missing check for debug print 2024-07-11 14:22:49 +10:00
Campbell Barton
c9df309f1f Merge branch 'blender-v4.2-release' 2024-07-11 14:18:34 +10:00
Campbell Barton
d13da71db4 Fix the extension add-on reloading when caching the extensions state
When the extensions add-on module was loaded before the add-on was
enabled, the module was detected as having changed since it had no
`__time__` member. Loading the add-on would then reload the module.

Resolve by setting the __time__ when first importing.
2024-07-11 14:12:36 +10:00
Campbell Barton
dffbd44631 Merge branch 'blender-v4.2-release' 2024-07-11 11:23:39 +10:00
Campbell Barton
69fd60b41a Extensions: update tests from changes to repo-list 2024-07-11 11:22:30 +10:00
Campbell Barton
3d87112bbd Merge branch 'blender-v4.2-release' 2024-07-11 11:13:06 +10:00
Campbell Barton
3c567ce171 Merge branch 'blender-v4.2-release' 2024-07-11 11:13:03 +10:00
Campbell Barton
1ff66501b4 Merge branch 'blender-v4.2-release' 2024-07-11 11:12:59 +10:00
Campbell Barton
0c01a01133 Extensions: add command line "repo-add --access-token" support 2024-07-11 11:06:57 +10:00
Campbell Barton
f59e872b3b Extensions: show "source" & access-token in the repo-list sub-command 2024-07-11 11:06:21 +10:00
Campbell Barton
375b173d67 Extensions: correct help text for the "build" command 2024-07-11 10:18:45 +10:00
Jacques Lucke
24dc9a21b1 Geometry Nodes: support attaching gizmos to input values
This adds support for attaching gizmos for input values. The goal is to make it
easier for users to set input values intuitively in the 3D viewport.

We went through multiple different possible designs until we settled on the one
implemented here. We picked it for it's flexibility and ease of use when using
geometry node assets. The core principle in the design is that **gizmos are
attached to existing input values instead of being the input value themselves**.
This actually fits the existing concept of gizmos in Blender well, but may be a
bit unintutitive in a node setup at first. The attachment is done using links in
the node editor.

The most basic usage of the node is to link a Value node to the new Linear Gizmo
node. This attaches the gizmo to the input value and allows you to change it
from the 3D view. The attachment is indicated by the gizmo icon in the sockets
which are controlled by a gizmo as well as the back-link (notice the double
link) when the gizmo is active.

The core principle makes it straight forward to control the same node setup from
the 3D view with gizmos, or by manually changing input values, or by driving the
input values procedurally.

If the input value is controlled indirectly by other inputs, it's often possible
to **automatically propagate** the gizmo to the actual input.

Backpropagation does not work for all nodes, although more nodes can be
supported over time.

This patch adds the first three gizmo nodes which cover common use cases:
* **Linear Gizmo**: Creates a gizmo that controls a float or integer value using
  a linear movement of e.g. an arrow in the 3D viewport.
* **Dial Gizmo**: Creates a circular gizmo in the 3D viewport that can be
  rotated to change the attached angle input.
* **Transform Gizmo**: Creates a simple gizmo for location, rotation and scale.

In the future, more built-in gizmos and potentially the ability for custom
gizmos could be added.

All gizmo nodes have a **Transform** geometry output. Using it is optional but
it is recommended when the gizmo is used to control inputs that affect a
geometry. When it is used, Blender will automatically transform the gizmos
together with the geometry that they control. To achieve this, the output should
be merged with the generated geometry using the *Join Geometry* node. The data
contained in *Transform* output is not visible geometry, but just internal
information that helps Blender to give a better user experience when using
gizmos.

The gizmo nodes have a multi-input socket. This allows **controlling multiple
values** with the same gizmo.

Only a small set of **gizmo shapes** is supported initially. It might be
extended in the future but one goal is to give the gizmos used by different node
group assets a familiar look and feel. A similar constraint exists for
**colors**. Currently, one can choose from a fixed set of colors which can be
modified in the theme settings.

The set of **visible gizmos** is determined by a multiple factors because it's
not really feasible to show all possible gizmos at all times. To see any of the
geometry nodes gizmos, the "Active Modifier" option has to be enabled in the
"Viewport Gizmos" popover. Then all gizmos are drawn for which at least one of
the following is true:
* The gizmo controls an input of the active modifier of the active object.
* The gizmo controls a value in a selected node in an open node editor.
* The gizmo controls a pinned value in an open node editor. Pinning works by
  clicking the gizmo icon next to the value.

Pull Request: https://projects.blender.org/blender/blender/pulls/112677
2024-07-10 16:18:47 +02:00
Campbell Barton
41fe7b0d27 Merge branch 'blender-v4.2-release' 2024-07-10 17:42:42 +10:00
Campbell Barton
7ee6451a51 Extensions: support adding system repositories via the command line 2024-07-10 17:39:06 +10:00
Falk David
509cb361bb GPv3: Remove tint tool from tool bar
This is now accessible from the draw tool as a brush asset.

Pull Request: https://projects.blender.org/blender/blender/pulls/124421
2024-07-09 17:17:25 +02:00
Jacques Lucke
dc8e9678e1 Geometry Nodes: allow naming geometry sets
This adds a new `name` member to the `GeometrySet` class. This name can be set
with the new `Set Geometry Name` node. Currently, the name is only used in the
spreadsheet when displaying instances.

The main purpose of this name is to help debugging in instance trees. However, in the
future it may also be used when exporting instance trees or when creating separate
objects from them.

Note, the name is not expected to be unique, it is fully in user control.

Naming geometries is necessary to make the spreadsheet more useful for instances,
because currently the user has no information for which geometry is used by each instance.

We also want to use this name to improve the integration with grease pencil where
sometimes layers become instances with the same name.

Pull Request: https://projects.blender.org/blender/blender/pulls/114910
2024-07-09 17:03:54 +02:00