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.
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
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
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.
- 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
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.
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
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
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
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
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.
`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.
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.
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.
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.
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
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