This makes it so that all the draw mode tools can use
the `Unified Paint Settings`.
Similar to other modes, the toggle for using unified settings is exposed
in the side panel and in the context menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/160195
There were many cases across the VSE codebase where the active scene
was used rather than the current sequencer scene.
Thus when the two differed many bugs could arise.
When changing cache settings, there was even a crash. In other cases,
operators/properties would just fail to register.
Pull Request: https://projects.blender.org/blender/blender/pulls/164154
This PR implements a new `Carver` tool in Draw Mode.
Both strokes & fills are cut along the lasso input. Holes are
automatically created when needed.
Notes:
* Cutting non-poly curves is currently not supported. All non-poly type
curves near the lasso will be converted to poly, with a warning
displayed to the user.
* Fills are automatically split into separate ids when the shape is
split up into multiple fill islands.
* If a curve uses both stroke and fill, carving a hole into the fill
will also add a stroke to the hole.
* If a curve uses both stroke and fill, carving into the shape from the
outside will currently close the fill.
The implementation is based on a modified version of the Greiner-Hormann
clipping algorithm.
Pull Request: https://projects.blender.org/blender/blender/pulls/144181
---------
Co-authored-by: Falk David <falk@blender.org>
This adds a new Comment node to simplify documenting a node tree.
Currently people use two main ways to add such comments:
* Frame nodes with titles/descriptions. Titles should stay, but
multi-line text in frame nodes doesn't work well and might be removed
eventually.
* String input nodes. Since those have multi-line textboxes, they can be
used for documentation.
For the common use-case of adding a description to some part of the node
tree (that is not just a frame title), this new Comment node is superior
to both alternatives. It has better ux and supports markdown rendering.
The Comment node uses the same background color as frame nodes and thus
integrates nicely visually already. It also has the same alternating-color
behavior like nested frames so that it remains visible even if it's in a
frame.
There are multiple ways to edit the comment:
* Double click on it.
* Activate the node and press F2.
* Hover the node and hit enter.
* Click the edit icon.
* In the sidebar in the node panel.
Pull Request: https://projects.blender.org/blender/blender/pulls/163168
This adds support for some of the basic edit mode operators
in Draw Mode:
- Circle, Box, and Pick selection tools.
- Copy and Paste operators.
- Delete operator.
- Transform operators.
- Draw mode `Stroke` menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/162890
Note: The `x` and `b` keybind for delete and box select has not be added
because `x` is already used for swapping the brush colors and `b` is
used for box delete.
Co-authored-by: Falk David <falk@blender.org>
This allows to search in side panels similar in Properties or Preferences,
and for that this adds floating button on top of side regions panels
that allows editing the search query, however this filter button is hidden
by default, the user must use the shortcut to start filtering, o use the
`Search` button in the panel context menu.
Keybindings for start search and clear search are added, they are similar
to the keybindings used in the the Properties/Preferences editors for
searching.
Pull Request: https://projects.blender.org/blender/blender/pulls/153894
Implements basic selection support in Draw Mode. For now, there's not
much users can do with the selection. Following PR's will add operator
support.
* Add selection overlay support. Only show selected edit lines.
* Only support stroke selection.
* Expose lasso selection tool and some operators. E.g. select all/none.
Ref: #161558.
Pull Request: https://projects.blender.org/blender/blender/pulls/161685
This PR moves the controls of "Use Unified xxx" (such as Use Unified
Size) from the scene / mode level to the brush level, meaning each brush
can have this option toggled on and off separately. It used to be that
every brush shares the same toggle state.
I moved the `UNIFIED_xxx` flags from `UnifiedPaintSettings` to `Brush`.
Ialso added relevant RNA properties and hooked them up to Python
scripts.
Resolves#138469
Pull Request: https://projects.blender.org/blender/blender/pulls/159382
This patch adds a few shortcuts for adding, removing, copying, and
making scene compositor effects active. We follow the same convention
used by object modifiers.
Pull Request: https://projects.blender.org/blender/blender/pulls/162747
This adds code to convert animation from one rotation mode to another.
There are multiple ways to do the conversion:
* Using Ctrl+R in pose mode
* In the 3D viewport, open the "Object" or "Pose" menu, under
"Animation" there is a new entry "Convert Rotation Mode"
* Using the python API `convert_rotation_mode()` either on bones or
objects
**Important Behavior**
* The result of the operation is always a fully keyed rotation, even
if previously only a single channel was keyed. This is the only way
to ensure that the rotations line up.
* Interpolation may not match. In fact it is expected not to.
This is desired for animators for when they are running into gimbal
lock and they just want to try if a different rotation mode works better.
* In case interpolation *has to* match, there is an option to insert
keys on every frame before the conversion.
* key types are somewhat preserved. We assume that for any given
frame, all rotation keys are the same type.
* keys on all related actions are converted, that includes the NLA
Even though the animation data conversion could be triggered
automatically by changes to the rotation_mode RNA property, I chose not
to do that for a reason.
This may be set directly via python in an addon and we shouldn't
include the costly (and maybe unexpected) side effect of converting
animation.
This adds a new operator `anim.rotation_mode_convert` instead of
modifying the existing `pose.rotation_mode_set`.
Since the operator now works with objects as well, it's probably better
to move it out of the `pose` category.
`pose.rotation_mode_set` and `pose.convert_rotation` from rigify are
deprecated with a warning that pops up every time you execute them.
**Implementation**
The core of the changes are in `anim_convert.cc`.
* `convert_to_rotation_mode` is a high level function that converts
the rotation for a single transformable.
* `build_rotation_fcurve_map` and `convert_rotation_keys` are two
functions that work in concert. The first builds the data structure
to quickly find FCurves by their RNA path and the second consumes
that data to do the conversion.
* `bake_rotation_fcurves` utility function to bake FCurves before
converting their rotation.
This uses the `AnimTransformable` class to make this functionality
available to objects and bones at the same time.
When dealing with multiple transformables, we would need to iterate
the action for each to find the FCurves for it.
To avoid that I added `ChannelbagFCurveMap` which is created by
`build_rotation_fcurve_map`.
With that we can easily iterate iterate the FCurves of each Channelbag
sorted by RNA path.
`KeyframeIterator`
Is a new helper class to iterate all frames with keys of N FCurves.
**Deprecates** the existing `POSE_OT_convert_rotation` operator and
removes it from the pose menu.
Resolves#149607Resolves#159131
Design: #137281
UI improvements will be handled in a separate PR: !159981
Pull Request: https://projects.blender.org/blender/blender/pulls/154309
This commit adds support for brush and scene level automasking into
Vertex and Weight Paint mode. The following options are supported:
* Topology
* Mesh Boundary
* Cavity & Inverted Cavity
* View Normal
* Area Normal
Face set automasking is not supported, as face sets do not currently
display in either mode. Additionally, none of the operators that create
dedicated masks are available, as masks are not displayed in either mode
as well.
The pie menu is also exposed for easy access to these properties via
`Alt-A`
Part of #156409
Pull Request: https://projects.blender.org/blender/blender/pulls/158071
Part of the Ripple Editing project: #153963
This PR adds a ripple version of the delete operator for removing strips
from the edit timeline while closing gaps left behind.
There is an `all_channels` property for controlling whether the ripple
happens on just the strips occupied by the deleted strips, as well as an
option `markers` which determines whether markers are rippled too.
It adds a keyboard shortcut (<kbd>Shift+X</kbd>), and the item is added
to the context menu.
After ripple deleting, there can be cases where strips overlap.
Currently this follows existing overlap mode logic, which can be
awkward, but a companion PR exists to resolve these issues: !160608
Pull Request: https://projects.blender.org/blender/blender/pulls/160607
This PR adds keymap for adding sequencer strip modifiers with Shift-A.
New operator is also added because we need a poll function to limit
this menu, so that it only appears in strip modifiers tab.
Pull Request: https://projects.blender.org/blender/blender/pulls/160867
Unlike object modifiers, where clicking anywhere in the modifier's
panel makes the modifier the active one, strip modifiers can only be
made active by clicking on the modifier's panel header.
Align the invocation of `SEQUENCER_OT_strip_modifier_set_active` with
that of `OBJECT_OT_modifier_set_active` so that it also checks on
context pointers set when drawing the modifiers to detect an active
modifier from any click. This also exposes the
`SEQUENCER_OT_strip_modifier_set_active` to default keymaps as it
is required to call the operator from clicks.
Pull Request: https://projects.blender.org/blender/blender/pulls/160892
Operator `UI_OT_view_item_page_scroll` to scroll to next/previous
page with Page `UP/Down` keys and first/last page with `Home/End` keys.
Added new member function `page_scroll(direction)` that handles
scrolling separately for tree view and grid view (asset shelf).
Part of #144486
See PR description for videos
Pull Request: https://projects.blender.org/blender/blender/pulls/144773
For the default Blender key config, this adds:
* `file.refresh` - `Ctrl+R`
* `file.select_all` - `Ctrl+A`
* `file.parent` - `Ctrl+Up`
* `space_data.params.show_hidden` toggle - `Ctrl+H` and `Ctrl+Shift+.`
* `file.next/previous` - `Ctrl+]`, `Ctrl+[`
* Change `space_data.params.display_type` - `Ctrl+1`, `Ctrl+2`, `Ctrl+3`
It also adds the `show_hidden` ones for Industry Compatible, which were
missing. Note that all `Ctrl` shortcuts above are aliased to `Cmd` on
MacOS.
The rationale is that we may eventually want to replace all single-key
shortcuts with common OS file browser shortcuts, so that we can support
"type to search/highlight".
This should happen in a breaking release all at once e.g. 6.0, but we
can add the new items for now without disrupting anything.
Pull Request: https://projects.blender.org/blender/blender/pulls/160120
The names for `Select Grouped` types were often misleading and
incorrect.
For two of them, it would just select certain strip types:
- `Global Type` would either select all visual or all audio strips.
- `Effect Type` would either select all effect or all non-effect strips.
We can replace these with a new `Select All by Type` menu just like
the 3D viewport, and add all the other strip types while we're at it.
For the rest, improve them by explaining exactly what kinds of strips
get selected with each type, and add fuller tooltips with more
information.
Also add support to the VSE preview too (it was broken before) and
the Shift+G keybind there, and modernize most of the code.
Pull Request: https://projects.blender.org/blender/blender/pulls/155826
The Bone Envelope tool now actually edits the Envelope property.
Previously it changed the B-Bone Display Size.
The Bone Size tool now is called B-Bone Size, and actually affects the
B-Bone Size X/Z properties. Previously it edited the bone radius, only
effective in Envelope display mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/155349
Cmd/Ctrl+Shift+N</kbd> is more standard across operating systems and
software for "creating new folders" than I.
No versioning is added in case users already rebound the shortcut
themselves, this is just a new default going forward.
Pull Request: https://projects.blender.org/blender/blender/pulls/159672
Issue from c8b32bd722.
Turns out the template function for the context menu adds another entry
for the application key. So calling this function twice with different
key-bindings would add a duplicate item.
When right click selection is used, the file and asset browser use "W"
to spawn the context menu. That may be unexpected for many users, even
when using right click selection, see #159567. The Outliner and UI
elements like regular buttons also spawn the context menu on right
click.
This adds right clicking for the context menu in both the asset and the
file browser, *in addition to the "W"-key*.
Pull Request: https://projects.blender.org/blender/blender/pulls/159629
Bring active element into focus inside when num period key is
pressed. This works in tree view and grid view (asset shelf)
After ad04c9dfdf, this has
become quite straightforward, just need to call
`scroll_active_into_view()`.
Part of #144486 / #146018
See PR description for videos
Pull Request: https://projects.blender.org/blender/blender/pulls/147964
Introduce a new operator: Reload Remote Listing. It forces a re-download
of the asset library's remote asset listing.
`ASSET_OT_library_refresh` now has an 'invoke' function that checks for
the shift button, but only if the `use_shift_for_remote_listing` is
set. If shift is pressed, then the operator will call the Reload Remote
Listing operator to do its work.
This refresh mode is not supported for local asset libraries.
The Asset Browser now has a Library menu, with the existing Refresh and
the new Reload Remote Listing operators. This helps to make the new
functionality, otherwise hidden behind a shift press, discoverable.
Pull Request: https://projects.blender.org/blender/blender/pulls/159111
Most modern mice include extra side buttons, commonly labeled
"Previous" and "Next" buttons which are more and more used.
Until now those buttons weren't used by default in Blender keymap.
This PR assigns various "Frame Selected" operators to the Button 4.
In every place where Numpad . (dot/comma) was used for framing active
element, now works with Mouse Button 4 as well (only exception being
File Browser, where MB4 is already used as "Back" to mimic how OS
file browsers work).
Pull Request: https://projects.blender.org/blender/blender/pulls/158549
Similar to 3d viewport, implement local/isolate view for graph editor to
isolate selected FCurves. `local_view_bit` member variable of SpaceGraph
tells whether view is isolated or not. Whereas, FCurve member
`local_view_bits` for how many local views this curve is part of.
`find_free_localview_bit ` copied from `view3d_view.cc`.
View is zoomed when entering the local view to fit selected FCurves
in visible range. Likewise, zoom is reset when exiting the local view.
Added `local_view_visible_region_before ` member in SpaceGraph struct to
store view bounds prior to local view.
Operator is mapped to `/` key. This zoom in/out behavior can be avoided
by disabling `frame_selected` operator property from keymap.
Note: Local view is currently not supported in driver editor (could be
done in future).
Design task: #147503
See PR description for video
Pull Request: https://projects.blender.org/blender/blender/pulls/154187
New operator `UI_OT_view_item_navigate` to walk in the view and select
next item depending on the direction. Virtual functions `navigate_xx()`
to handle navigation in each direction separately for tree view and grid
view. In short, navigating with arrow keys is possible in asset shelf,
shape key panel, etc.
- UP: Select item above the active
- Down: Select item below the active
- Left: Collapse active item or jump to parent in treeview. Select item
to the left of active in grid view
- Right: Expand active item in treeview. Select item to the right of
active in grid view
Part of #144486
See PR description for videos
Pull Request: https://projects.blender.org/blender/blender/pulls/144548
Add "deselect" property to "select linked" operator. Property value is
passed to `ed::curves::select_linked`. When `deselect=true` and curve
is completely selected (`is_curve_selected=true`), clear that curve
selection.
Use `Shift + L` to invoke the operator with deselect property.
Resolves#157245
See PR description for the video
Pull Request: https://projects.blender.org/blender/blender/pulls/157260
As we move screen area edges, if any line up exactly then we join them
together so that they act as one. They become a single edge permanently
without a way to break them. This PR removes that functionality. Under
the hood what currently happens is that area corner vertexes are merged
if duplicated. As are area edges. This PR just turns off this
deduplication. It then adds an "extend" option to allow moving multiple
edges if they are close together. And an "merge edge" operator to turn
multiple aligned edges into a single edge.
Pull Request: https://projects.blender.org/blender/blender/pulls/151389
Expand the existing `marker.select_leftright` operator to enable the
user to select all markers to the left or right of the playhead with
Ctrl-Click.
This also shares the same key binding as the camera marker select
operator: ctrl-clicking ON a marker will still activate the camera
object. Ctrl-clicking BETWEEN markers will select all markers on that
side of the playhead.
The corresponding keymap entries `[` and `]` have been expanded to
work in the markers area as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/153309
Adding a "Move to Layer" operator to Video Editor masks. Similar what
already exists for Greasepencil layers or objects Collection.
It allows to easily change the layers of the selected splines. At the
moment I think the way to do it would be to copy and paste the spline
on another layer, and then delete the original one from the source
layer.
The shortcut for this operator is `M`, so it is consistent with similar
operators.
The shortcut for Mute Footage operator becomes `Ctrl+H`.
Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/138886
`Alt-LMB` is bound to Orbiting in the 3D viewport, this keybind was also
used for the quick mask brush usage in Sculpt Mode, preventing the
former from working.
Switch the mask keybind to `Ctrl-Alt-LMB` and the invert mask keybind
to `Shift-Ctrl-Alt-LMB` to avoid this.
Pull Request: https://projects.blender.org/blender/blender/pulls/155900
This commit makes the following changes to the Sculpt Color Filter tool
to make common operations faster to apply and more easily accessible
- Fill uses the active brush or unified paint color depending on the
current active tool
- Clicking and releasing without dragging applies the current primary
color at the current strength, holding Ctrl while doing so applies the
secondary color. Dragging to "dial in" the fill is still supported.
- Ctrl+X keybind triggers a direct, non-modal full-strength fill.
- The fill tool shows and uses the scene unified paint colors.
Pull Request: https://projects.blender.org/blender/blender/pulls/154263
When blend files are saved, a new dialog option will pop up if there
are modified images, asking the user if they would like to also save
the modified images.
This feature helps prevent data loss since it notifies the user that
there are unsaved textures, and gives them a quick and easy way to save
all the image textures when saving the blend file.
A new boolean RNA property, `show_save_modified_images_dialog`, has
been added to the `WM_OT_save_mainfile` and `WM_OT_save_as_mainfile`
operators to determine if the new dialog should be shown when saving.
This property defaults to `false`. When this property is `true`, it will
be updated to `false` right before opening the dialog to prevent it from
opening repeatedly after the user interacts with the dialog.
Additionally, a `char` has been added to the `WindowManagerRuntime`
`struct` to track the state of this checkbox to ensure it remains
consistent with the user's last choice across uses for a particular
session.
This dialog makes use of callbacks with id properties to simplify code
and to ensure the correct file saving option is invoked after choosing
`Save`. This approach allows the dialog to preserve the RNA
properties from the save operators before the dialog was opened.
This PR addresses item 1 from issue #134518
Pull Request: https://projects.blender.org/blender/blender/pulls/151557
Lengthen/Shorten were just swapped.
For the keymap, this affects `PageUp` and `PageDown` (Up should
increase, Down should decrease). MouseWheel Up/Down is less obvious
(more often Up decreases values in the blender keymap), so the same
behavior is kept here.
Pull Request: https://projects.blender.org/blender/blender/pulls/154657
The node operator 'Cut' was assigned Ctrl+X as a default shortcut. After
some testing this proved to be problematic for the following use case:
- Copy nodes A and B
- Dissolve node C as a preparation for pasting A and B
- Paste
- => The dissolved node C is pasted instead of the expected A and B
nodes.
This PR removes the shortcut, but keeps the operator accessible by
adding a new 'Cut' entry in the node context menu.
Note: the shortcut is not removed for the industry compatible keymap
because there are no conflicts with the dissolve operator there.
Pull Request: https://projects.blender.org/blender/blender/pulls/154522
This adds a new operator `sequencer.strip_modifier_duplicate` and
a new "extras" menu to each strip modifier. The menu is located next
to the render toggle. Similar to the menu for object modifiers.
The menu allows for duplicating the modifier, copying it to
all other selected strips, and moving it to the first or last
position in the stack.
The duplicate operator is also mapped to `Shift+D`.
This is aligned with the object modifiers. All possible options are
available.
Pull Request: https://projects.blender.org/blender/blender/pulls/154375
Despite being the same editor, using the same field, the python enum
string value differed between modes of the editor. This commit fixes the
problem by re-syncing the mapping between `pivot_items` and
`rna_enum_transform_pivot_full_items`
Note that this change is a minor breaking change for the `pivot_point`
field.