82 Commits

Author SHA1 Message Date
Campbell Barton
7a249222be Cleanup: tweak multi-line parenthesis for Python scripts
Reduce right shift, moving closing parenthesis onto own line
for clarity & reducing diff noise in some cases.

Ref !147857
2025-10-12 03:31:31 +00:00
John Kiril Swenson
76c03744a8 VSE: Add render options for sequencer scene and active scene
Addresses #146305.

Ever since moving to the "sequencer scene" paradigm, attempting to
render an image or animation when a sequencer with strips is present
often seems to outright ignore the sequencer in most cases. This is
because the sequencer scene usually differs from the active scene (which
is the true render target), so one must first switch their active scene
to the sequencer scene before rendering.  This is confusing and
seems like a regression in behavior. To improve clarity, this patch does
the following:

When a sequencer scene with at least one strip (and the sequencer step
enabled in the pipeline) exists in the current workspace, new options
"Render Sequencer Image" and "Render Sequencer Animation" appear.  These
options may be invoked by alt-F12 and ctrl-alt-F12, respectively.

Additionally, if such a valid sequencer scene is the same as the active
scene, then only the regular render options are listed, since in this
case they are identical to the sequencer render operators, meaning F12
still works predictably.

To switch back and forth between sequencer and main scene render
outputs, a new toggle has been added to the image editor to "Show
Sequencer Scene" output. This button only appears for the render result
if there is a valid sequencer scene that differs from the active scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/146934
2025-10-07 18:12:08 +02:00
Campbell Barton
62d72bd0b5 UV: initial implementation of UV sync select
Support sync selection in the UV editor, with face-corner selection,
so it's possible to select individual UV vertices/edges in the UV editor
without UV's attached to the same underlying edge also becoming selected.

There is limited support for maintaining the UV selection when selecting
from the 3D viewport, common operations such as picking &
box/circle/lasso select support this, however other selection operations
such as "Select Random" or "Select Similar" will clear this data,
causing all UV's connected to selected mesh elements to become selected.
We may add support for additional operators as needed.

Details:

- UV Sync Selection is now enabled by default.
- In edit-mode the UV selection is stored in BMLoop/BMFace which are
  written to custom-data layers when converted to a Mesh.
- To avoid unnecessary overhead - this data is created on demand.
  Operators may clear this data - selecting all or none do so,
  as there is no reason to store this data for a uniform selection.
- The Python API includes functions to synchronize the selection to/from
  UV's as well as flushing based on the mode.
- Python scripts that manipulate the selection will either need to clear
  this synchronized state or maintain it.

See:
- Design task: #78393.
- Implementation task: #131642.

Ref !138197
2025-10-07 01:41:16 +00:00
Pablo Vazquez
65d5b94740 UI: Slightly widen some popovers
Increase width in some popovers where labels would get trimmed.

This was even worst for other languages, but at least now labels don't
get ellipsis by default (English at 1.0 UI scale).
2025-10-05 23:36:04 +02:00
Eitan Traurig
cfad6f4f25 UV: Move on Axis selected UVs operator
The operator moves selected UVs, using the num-pad for directional keys:

Modifiers control the units:
- UDIM / UV unit (NUMPAD KEY)
- Dynamic grid unit (CTRL + NUMPAD KEY)
- Pixel unit (SHIFT + NUMPAD KEY)

Implements design task #78405.

Ref !139608
2025-10-03 16:14:07 +10:00
Sean Kim
0a72429ea8 UV Sculpt: Rename strength_curve and curve_preset
Similar to 327a1925cf

* Renames `strength_curve` to `curve_distance_falloff`
* Renames `curve_preset` to `curve_distance_falloff_preset`

These changes are done for consistency with the other concepts in the
other paint modes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147071
2025-09-30 20:57:19 +02:00
Sean Kim
c94e1bf73d Fix: Python errors in brush falloff panel
Caused by 327a1925cf

Pull Request: https://projects.blender.org/blender/blender/pulls/146830
2025-09-26 14:08:17 +02:00
Aaron Carlisle
18d0532915 UI: Movie Clip Editor: Add Overlays Support
Move several clip and mask display options into a common Overlays popover,
consistent with other editors. Includes a global toggle (Shift-Alt-Z) to
show/hide all overlays at once.

Also adds the missing annotations toggle, cursor visibility toggle, and moves mask display options in
the Image Editor into the Overlays popover due to shared code paths.

See PR for images.

Pull Request: https://projects.blender.org/blender/blender/pulls/145895
2025-09-24 23:51:06 +02:00
Eitan Traurig
a9a54c88b9 UV: add pack to custom region option to "Pack Islands" operator
This commit implements the design task #78398

- Box region
  - Set Custom UV Region (Ctrl-B).
  - Disabled with Custom Region checkbox in the menu or (Ctrl-Alt-B).
- Box Select (Pinned) changed to (Alt-B).
- When the Custom Region enum is chosen the islands are packed
  into the bounding box of the drawn region.

Ref !140020
2025-09-14 05:23:47 +00:00
Eitan Traurig
919acbbf7f Refactor: Convert Copy Mirror UV Coordinates operator from Python to C++
Migrate Copy Mirror UV Coordinates operator to C++. The ID has changed
from `mesh.faces_mirror_uv` to `uv.copy_mirrored_faces`

Ref !145531
2025-09-09 13:03:48 +10:00
Eitan Traurig
f7f4c154b6 UV: arrange and align selected UV islands
Arranges selected Islands along a selected Axis.
Islands can be aligned to center/left/right/top/bottom.

Initial Implementation of #78408

Ref !139658

Co-authored-by: Campbell Barton <campbell@blender.org>
2025-09-09 12:32:20 +10:00
Sean Kim
98869c514a Fix: Annotate tool in Image Editor shows brush properties & errors
Pull Request: https://projects.blender.org/blender/blender/pulls/144658
2025-08-18 01:16:42 +02:00
Campbell Barton
3d0cff02c1 Fix: incorrect icon ID in the UV menu 2025-08-08 16:27:23 +10:00
Campbell Barton
73afa1c94f UV: support island selection with sync-select in vertex/edge mode
This was disabled because island selection used to be exposed as a
UV selection mode (along with vertex/edge/face) where selecting
parts of other islands would seem like a bug.

Now island selection has been moved to a separate toggle it makes
sense to allow connected geometry to be included in the selection when
other selection options enforce this.
2025-08-08 05:58:04 +00:00
Pablo Vazquez
840310f607 UI: Add Icons for Edge/Vertex Crease and others
Edge and Vertex marks such as Crease, Bevel Weight, Seam, Sharp, have
specific use cases and colors assigned to them that users get familiar
with over time.

It can be hard to remember which color belong to what, this PR tries to
address this by introducing colored icons that follow the theme setting
for that edge mark/flag.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/144075
2025-08-07 11:09:56 +02:00
Philipp Oeser
c634e065b1 Fix #143182: Inconsistency in Menu order in Texture Painting Workspace
The Image Editor had a different menu order compared to the 3DView (this
came with fb74dcc5d6).
Now made the order in the Image Editor match the one of the 3DView.
Also matches the order in the sidebar now.

Pull Request: https://projects.blender.org/blender/blender/pulls/143222
2025-07-29 09:53:52 +02:00
Maxime-Cots
6e3039173d UV: Ensure Pie Menu consistency with 3D Viewport
"Selected to Grid" and "Cursor to Grid" are now swapped to fix the
consistency between UV Snap Pie Menu and 3DView Snap Menu.

Resolves #140714

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141300
2025-07-04 04:33:02 +02:00
Bastien Montagne
3bb53a27bb Merge branch 'blender-v4.5-release' 2025-06-30 11:21:59 +02:00
Damien Picard
afa51a5d54 I18n: Disambiguate "Mirror"
"Mirror" can mean:
- To symmetrize something (i.e. generate a new mirrored copy of it or
  edit it in a symmetric fashion).
- To flip something (i.e. invert its values along X, Y or Z axes).
- To repeat a texture in a mirrored fashion outside its bounds.

Reported by Gabriel Gazzán in #43295.
2025-06-30 11:07:39 +02:00
Campbell Barton
dc83260f1a UV: split island select into a separate option, support for sync-select
Change island selection from being it's own selection mode,
along side vertex/edge & face modes, to a separate toggle.

This makes it possible to use sync-select without loosing functionality
as previously island selection didn't work when sync-select was enabled.
Now island selection supports sync-select although at the moment this
only works in face-select mode, when !138197 is merged this limitation
will be removed.

In practice this change is subtle, making it possible to toggle island
selection no matter which selection mode is currently active.

Details:

- The UI is mostly unchanged, this option is available
  in the same location in the header & menu as a toggle.
- The shortcut 4-key is kept, toggling instead of switching modes.
- Enabling island selection no longer isolates islands,
  it just acts on selection actions made after being enabled.
2025-06-12 07:09:46 +00:00
Sean Kim
ab3c129dd9 Refactor: Paint: Rename brush _tool properties to _brush_type
This commit renames the python Brush properties that end with `_tool` to
`_brush_type` (e.g. `sculpt_tool` -> `sculpt_brush_type`) to better
distinguish the property from the concept of tools in a workspace
context.

Resolves #124201

Pull Request: https://projects.blender.org/blender/blender/pulls/139909
2025-06-06 23:40:13 +02:00
Sean Kim
440c6c8b6f Fix #138662: Image Editor View and Mask modes show UVs
With 24d08e0bae, the ability to view UVs
in the Image Editor was introduced in all modes, not just Texture Paint
and Edit Mode. This introduced a new flag that was enabled by default,
causing UVs to be displayed in any of the Image Editor modes.

While this is helpful for some workflows, it is unnecessarily
distracting for many usecases when using the Image and Mask modes of the
Image Editor. To remedy this, this PR adds various polls to ensure
that these are only shown in the Paint Mode of the Image Editor and the
UV Editor. Further thought should be put into the potential separation
between the different usecases of this editor, but that is out of scope
for now.

Pull Request: https://projects.blender.org/blender/blender/pulls/139563
2025-06-02 23:42:01 +02:00
Campbell Barton
72f24fcbab Cleanup: resolve pylint warnings 2025-05-23 14:03:20 +10:00
Habib Gahbiche
f6048a5e7b Compositor: UI: Visualize render size and domain size in image editor
Show render region as a bounding box with a passepartout option.
Additionally, a text info is shown at the upper left corner, similar to
the info text in 3d view, showing the render size and current image
size.

Devtalk thread:
https://devtalk.blender.org/t/compositor-ui-improvements/34186?u=izo

Pull Request: https://projects.blender.org/blender/blender/pulls/120471
2025-05-21 15:57:31 +02:00
Campbell Barton
16c87b62e4 UI: include rip in the UV menu
The shortcut for this operator wasn't discoverable.
Show this in the menu as done with with edit-mesh rip.
2025-05-07 15:49:21 +10:00
Campbell Barton
509b39f90e UV: support sticky modes when edge sync-select is enabled
Previously sync-select in edge-select mode behaved in much the same
way as vertex selection, since a selected edge could cause a vertex
on an a disconnected UV island to be selected.

Now single vertices are no longer considered selected when the
Sticky-Mode is set to "Location" (the default).

Notes on changes when sync-select is enabled:

- The main change from a user perspective is edge & face select modes
  show the selected edges.

- This resolves a problem in edge & face selection modes where it wasn't
  possible to differentiate between a selected edge and two selected
  vertices on either side of an unselected edge.
2025-05-06 02:59:40 +00:00
Campbell Barton
1d80d15b8f UV: support sticky modes when face sync-select is enabled
Previously UV sync-select in face mode would isolate UV selection
so dragging a face would disconnect it from adjacent faces.

Now the sticky mode is respected for face selection.

This is needed for #136817 so storing per-selection doesn't result
in a user visible change in behavior.
2025-04-30 15:54:26 +10:00
Pratik Borhade
8d05ad3195 Fix #138072: UV stitch from menu doesn't allow user to configure what get's stitch
Calling UV stitch from menu executes `exec` function instead of modal() due
to wrong opcontext. Set `operator_context=INVOKE_REGION_WIN` so that
clicking operator from menu invokes `stitch_invoke()` which later calls
modal operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/138075
2025-04-29 06:10:07 +02:00
Campbell Barton
d21b488ac9 UI: hide the "Geometry" panel when viewing the render result
Ref !137242
2025-04-10 01:50:43 +00:00
T0MIS0N
24d08e0bae Overlay: Allow drawing UVs in Image Editor in any mode
**Problem**
When using Texture Paint mode, the Image Editor will show a UV Wireframe
to display the active object's UVs. In every other mode, this wireframe
is absent. This is currently a big problem for Sculpt Mode since the
Experimental Texture Paint system is a part of that mode, meaning that
the user can't see their UVs while they paint in Sculpt Mode. This is
also troublesome for users that would like to quickly view an object's
UVs without using Texture Paint Mode.

**Solution**
Since it's useful to be able to view an object's UVs at all times, the
Image Editor should display UV Wireframes in all Object Modes regardless
of the Image Editor's mode. This is the best solution since it means
that future Blender features, that would benefit from having a preview
of an object's UV Wireframes, will automatically have that option since
UV Wireframes are supported in all modes. Also, if a user doesn't want
to see UV Wireframes for any reason, it can be disabled with an Overlay
option.

Additionally, when multiple objects are selected, each object should
have its UV Wireframe drawn in the Image Editor. The selected objects
that aren't active should have less opaque wireframes to indicate which
wireframe belongs to the active object. This is the best approach for
having multiple objects selected since it allows the user to quickly
view the UV layout for all selected objects to troubleshoot UV problems,
like texture mapping. This is especially helpful when using a material
for multiple different objects.

An alternative solution would be to only show the UV Wireframe for the
active object, but this would be undesirable because it would make
troubleshooting UV positions tedious when working with multiple objects
since the user would need to select objects individually.

Co-authored-by: T0MIS0N <50230774+T0MIS0N@users.noreply.github.com>
Co-authored-by: Sean Kim <SeanCTKim@protonmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/135102
2025-04-04 21:30:05 +02:00
Harley Acheson
c13d3e2f7a UI: Color Icons for Red, Green, & Blue
This adds icons for ICON_RGB_RED, ICON_RGB_GREEN, and ICON_RGB_BLUE
that display with those colors. This does not remove the existing
monochrome ICON_COLOR_* icons. This also allows the translation of
the "R", "G", "B" characters shown, for languages that prefer color
words that do not start with these.

Pull Request: https://projects.blender.org/blender/blender/pulls/136154
2025-03-21 01:57:32 +01:00
Sean Kim
f1fca48a4f Fix #134292: Clone brush cannot access local blendfile images
With the brush assets project, brushes were moved from being local to
the working blendfile to being linked from asset libraries. This breaks
the Image Paint 'Clone' brush, as it has a brush property that links to
other Image datablocks.

To support this functionality, this commit adds the corresponding
properties into the `ImagePaintSettings` struct so that it is stored
locally with the images that will be used by the tool, inside the main
blendfile.

The source image property is shared with the 3D version of the 'Clone'
brush instead of adding a separate field to preserve old behavior.

Notably, this has the following limitations:
* If clone brush assets have been made and shared with external packs,
  they would not work out of the box with linked image assets.
* Despite these settings being stored on the scene, they are populated
  inside the tool window under "Brush Settings" which is potentially
  misleading. However, this is already the case for the 3D version of
  the brush, so further UI refinement will happen outside of this PR.
* Users will be unable to use separate images simultaneously for the
  Image editor and the 3D viewport, unlike in pre-4.3 versions. This
  can be adjusted in the future if it is a critical workflow.

Because the intended design and functionality of this tool is currently
questionable, this commit opts to make these changes instead of doing
further design to support both accessing data on the brush and on the
scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/134474
2025-02-19 22:00:39 +01:00
Nathan Vegdahl
b2a06888c7 Anim: add Action+Slot selector for Masks
This adds an Animation panel to the Mask tab of the n-panel of the
Movie Clip and Image editors. Masks can be animated (for example, the
opacity of a Mask Layer), but there was no way to manage the Action
and Slot that held those F-Curves.

To keep things DRY, this PR also moves the code for drawing Action+Slot
selectors from the `PropertiesAnimationMixin` class to a utility
function, which is now called from both that class and the Mask UI code.

Pull Request: https://projects.blender.org/blender/blender/pulls/133153
2025-01-21 15:12:59 +01:00
Campbell Barton
84c9e6e655 Cleanup: use single quotes for enums 2025-01-21 23:50:17 +11:00
Nika Kutsniashvili
5e5c68fa62 UI: Expand brush/tool falloff curve presets in popovers
Expand falloff curve presets for brush/tools, to match other falloff
types such as proportional editing.

Pull Request: https://projects.blender.org/blender/blender/pulls/130905
2025-01-21 12:41:05 +01:00
Pratik Borhade
8dde2f6689 Fix #114901: Shortcut assigned to pack island not showing in menu
`wm_keymap_item_find_props()` finds the keyitem for respective operator.
This function expects opcontext to be `WM_OP_EXEC/INVOKE_REGION_WIN`.
Set operator_context to `INVOKE_REGION_WIN` in UI drawing code for pack
island button, this will allow drawing shortcut key infront of the label.

Pull Request: https://projects.blender.org/blender/blender/pulls/133298
2025-01-21 01:57:56 +01:00
Campbell Barton
be0c9174aa Cleanup: argument wrapping for Python scripts
- Wrap the closing parenthesis onto it's own line
  which makes assignments to the return value
  read better.
- Reduce right-shift with multi-line function calls.
2025-01-14 12:53:32 +11:00
Campbell Barton
64e3bfb485 UI: revert changes to the unwrap menu in 4.3 based on user feedback
Move unwrapping operators from the "Unwrap" sub-menu back into
the top-level menu. Now pressing U twice unwraps as before.

Ref !132719
2025-01-08 11:31:44 +11:00
Campbell Barton
0eb2491e40 Fix UV sculpt panels showing in "Misc" category, error on startup
Error in [0] intended to remove the panels but kept the space type &
region type, causing a warning on startup and the panels to be added
to a "Misc" tab.

[0]: 46773766a3
2024-11-26 15:38:58 +11:00
Nika Kutsniashvili
46773766a3 UI: UV Editor: Remove unrelated tool panels
The "Options" and "Falloff" panels only apply to UV sculpt tools
yet they were visible for all tools.

Pull Request: https://projects.blender.org/blender/blender/pulls/130499
2024-11-20 17:46:45 +01:00
Campbell Barton
ccaf144e6d Cleanup: compare full platform name for "darwin"
Avoid checking a shortened prefix when it's not necessary.
2024-10-29 18:09:47 +11:00
Lukas Tönne
3d6a142162 GPv3: Remove unused GPv2 operators
Removes many of the operators, panels, and menus used exclusively by Grease Pencil v2 that are no longer needed in v3.
No functional changes are expected.

Some operators are still used by the annotations system and have to be kept around. These may be renamed in future.

Pull Request: https://projects.blender.org/blender/blender/pulls/128521
2024-10-04 13:05:09 +02:00
Jonas Holzman
92d00678ac macOS: Add Image Clipboard Copy/Paste Support
This Pull Request adds support for image clipboard copy-pasting to the Image Viewer on macOS, accepting sources from both raw image data and image files.

Tracking Issue: #111404

Pull Request: https://projects.blender.org/blender/blender/pulls/126574
2024-10-01 18:32:32 +02:00
Lukasz Czyz
788bc5158e UV: add support for the SLIM unwrapping algorithm
Integrate an existing implementation of the SLIM unwrapping algorithm
into Blender. More info about SLIM here:
https://igl.ethz.ch/projects/slim/

This commit is based on the integration code written by Aurel Gruber
for Blender 2.7x (unfinished and never merged with the main branch).

This commit is based on Aurel's code, rebased and further improved.

Details:

- Unwrap has been moved into a sub-menu,
  slim unwrapping is exposed as: "Minimum Stretch".
- Live unwrap with SLIM refines the solutions using a timer.
- When using SLIM there are options to:
  - Set the number of iterations.
  - Weight the influence using vertex weights.
- SLIM can be disabled using the `WITH_UV_SLIM` build option.

Co-authored-by: Aurel Gruber <aurel.gruber@infix.ch>

Ref !114545
2024-09-21 16:48:53 +10:00
Julian Eisel
a38c96b92c Sculpt/Paint: Bring back support for multiple brush based tools
Design: https://projects.blender.org/blender/blender/issues/126032

The brush assets project merged all brush based tools into a single, "Brush"
tool. After feedback, we want to bring back some of the previous brush based
tools. For example in grease pencil draw mode, not having an eraser or fill tool
available, and having to go through all the brush assets instead made the
workflow more cumbersome, and features less discoverable (an eraser tool in the
toolbar is quite easy to find, a brush deep down in the asset library may not
be).

With this commit we can add back some tools for specific brush types in sculpt &
paint modes. The follow up commit will start with the eraser and fill tools for
grease pencil draw mode, but more tools in other modes are expected to follow.

For every brush type that has a tool in the toolbar, the last used brush is
remembered. This is the biggest part of the changes here.

Brush asset popups will only show the brushes supported by the active tool for
now. The permanent asset shelf region displays all brushes. Activating a brush
that isn't compatible with the current tool will also activate the general
"Brush" tool, but while the brush tool is active we never switch to another one
(e.g. activating an eraser brush will keep the "Brush" tool active). All this
might change after further feedback.

Pull Request: https://projects.blender.org/blender/blender/pulls/125449
2024-09-20 18:09:31 +02:00
Julian Eisel
b64bf66257 Refactor: Tools: Change how tools are marked as using brushes
The previous way of considering tools with the `data_block` member set
as using brushes was rather unclear/confusing, but also a bit outdated
with the brush assets changes. Since then most sculpt/paint modes use a
unified brush tool, there was no tool for every brush type (aka brush
tool) anymore. So now the `data_block` member was just set dynamically to
match the active brush type which is otherwise irrelevant to the tool
system now.

Further, this will become important to bring back some of the tools that
use brushes in grease pencil draw mode, see #116337. For that we want to
keep the unified brush tool, but still allow other tools that only use a
specific brush type. So marking a tool as using brushes should be done
separately from indicating a specific brush type.

Removing/replacing the `data_block` member should happen separately
still, pending further developments (e.g. see #125449).

Pull Request: https://projects.blender.org/blender/blender/pulls/125911
2024-09-16 12:20:25 +02:00
Pablo Vazquez
f4eb0d810d UI: Add missing new/open icons in menus
Image -> New and Clip -> Open were missing ellipsis and icon, to be
consistent with every other new/open entry in menus.
2024-09-12 18:34:53 +02:00
Philipp Oeser
d1aa30f1ac UI: Expose "Frame Selected" in image editor mask mode
Was already included in `IMAGE_MT_view_pie`, but missing from
`IMAGE_MT_view`

NOTE: the functionality has problems, see #127352, but that will be
tackled separately

Pull Request: https://projects.blender.org/blender/blender/pulls/127391
2024-09-11 13:30:40 +02:00
Pratik Borhade
0ef35bc475 UI: Expose Proportional edit in image editor mask mode
Proportional edit works with shortcut in mask mode of image editor but
it was never exposed in UI (header). Also move pivot point along with
proportional edit property to the right of mask template.

Pull Request: https://projects.blender.org/blender/blender/pulls/126482
2024-09-03 22:56:48 +02:00
Germano Cavalcante
0dad3bdfa7 Fix #123179: can't select multiple snap target elements in UV Editor
Missed after 'Set Snap Base' commit.

Just like in 3D View, UV editing can also benefit from selecting
multiple snap target elements.

The C++ code was already done, it was only necessary to edit the
interface.

Pull Request: https://projects.blender.org/blender/blender/pulls/124986
2024-07-26 14:59:13 +02:00