This implements all the auto masking options in sculpt mode.
* Stroke: Only affects strokes that are initially under the cursor.
* Layer: Only affect strokes in the same layer as the initial strokes under the cursor.
* Material: Only affect strokes with the same material as the initial strokes under the cursor.
* Active Layer: Only affect strokes in the active layer.
* Active Material: Only affect strokes that use the active material.
The `Active Layer` toggle in the toolbar has been moved to this panel.
Resolves#130022.
Pull Request: https://projects.blender.org/blender/blender/pulls/132986
When locking a material, the preview icon would get greyed-out (as would
the rest of the properties in the row).
This issue is that this defeats the purpose of an accurate preview of
the material. Artists want to know what the material _actually_ looks
like.
This moves the icon into a separate row and property so that
it doesn't get disabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/133478
This adds an Animation panel to the Footage tab of the n-panel of the Movie Clip
editor. Movie Clips have various properties that can be animated, but there was
previously no way to manage the Action and Slot that held those F-Curves.
Pull Request: https://projects.blender.org/blender/blender/pulls/133380
Material preview panel for grease pencil was accidentally removed in e10b0b3449 because it had EEVEE engine listed as `COMPAT_ENGINES`, which also seemed accidental. After adding panel back I noticed that .blend file for generating previews was also faulty. It was updated 2 years ago when GPv3 was experimental feature, and file wasn't up to date to current state.
This PR also adds new .blend file for generating material previews that is mostly the same as one in Blender 4.2, except:
- I organized it, removed unnecessary stuff.
- For Flat preview it was using flat checkerboard background, for other modes 3D room, which seemed unnecessary and not useful for Grease Pencil, so now every mode uses flat background.
- "Cloth", "Liquid", and "Shaderball" modes in 4.2 didn't render at all and resulted in all white screen. Now they render default Circle, which is not correct, but at least better than nothing. In future we can add custom drawings to those modes for previewing materials on more complex objects.
Pull Request: https://projects.blender.org/blender/blender/pulls/133372
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
The interpolate tool was using a linear re-sampling of the curves, which changes
non-uniform point distributions can causes unexpected shifts in points along the
curve, even very close to an input stroke (mix factor ~0 or ~1).
This patch adds an alternative interpolation function with explicit segment
indices and fractions, which can then be computed by the interpolation tool.
The point segment factors are chosen such that each point of the input strokes
has an exact matching point in the interpolation. When the factor is close to
0 or 1 the shape of the curve thus matches the respective input exactly.
This approach is more similar to what GPv2 did, except instead of sub-dividing
each segment it simply generates a _local_ uniform sample to fit more points
into the same segment. These extra points are colinear at the extremes of the
mix factor range, so the curve matches the input curves visually.
Pull Request: https://projects.blender.org/blender/blender/pulls/130594
Add icons to better identify data types in the Batch Rename type menu.
Makes it easy for users to recognize icons they are already familiar
with, especially when following tutorials in English while using a
translated UI.
Also fixes 'Light' being singular, while others were plural.
Pull Request: https://projects.blender.org/blender/blender/pulls/130300
This PR adds new RNA properties that deprecate and replace any `sequence` property.
The old prooperties are still there and fully functional, but the description is changed
to indicate that these will be removed in the future and that the new properties should
be used instead.
| Deprecated property | Replacement property |
| --------------------------------- | ----------------------------------- |
| `context.active_sequence_strip` | `context.active_strip` |
| `context.selected_editable_sequences` | `context.selected_editable_strips` |
| `context.selected_sequences` | `context.selected_strips` |
| `context.sequences` | `context.strips` |
| `SequenceEditor.sequences` | `SequenceEditor.strips` |
| `SequenceEditor.sequences_all` | `SequenceEditor.strips_all` |
| `MetaStrip.sequences` | `MetaStrip.strips` |
Previously, rna paths for animation data on strips started with `sequence_editor.sequences`.
This PRadds versioning for the rna paths to make sure to use
the new naming scheme. This does mean that in previous versions of blender,
the animations don't show but the data is not lost (even if the file is saved in the older version).
Also do some cleanup of existing python scripts inside the source to use the
new properties.
Part of #132963.
Pull Request: https://projects.blender.org/blender/blender/pulls/133156
`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
The name `id_root` was not descriptive, and was just a hold-over from the
equivalent (now deprecated) property on the Action itself. `target_id_type`
is more clear, reflecting that this is the type of ID the Slot is intended
to animate.
This PR also renames the corresponding `id_root_icon` to
`target_id_type_icon`.
Note that this PR updates the GLTF import/export core addon to adhere to
these name changes as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/133164
This allows users to manage the Action and Slot assignment of a Scene's
compositing nodes. The selector lives in the Animation Panel in Scene
Properties, alongside the Action+Slot selector of the Scene ID itself.
Pull Request: https://projects.blender.org/blender/blender/pulls/133141
Use operator context of 'INVOKE_DEFAULT' for object.data_transfer and
object.datalayout_transfer in menu VIEW3D_MT_make_links so that they
work correctly when called from popup menus.
Pull Request: https://projects.blender.org/blender/blender/pulls/133228
Generally, checkbox labels are not grayed out when they are not checked. Better
be consistent with other parts of the UI here. When I saw this, I was first
confused because it looked like I can't enable the values that are not checked.
This was introduced in #112393.
Pull Request: https://projects.blender.org/blender/blender/pulls/132180
Changed custom sculpt brushes currently shows "*Unsaved Changes" as a
label that can overlap with the "Brush Assets" header. This PR makes
the header text show as "Brush Asset (Unsaved)" in this circumstance.
Pull Request: https://projects.blender.org/blender/blender/pulls/131119
Allow user to remove the preview of an asset from the asset browser details region.
Additionally, user can now reuse the default icons after adding a preview.
Pull Request: https://projects.blender.org/blender/blender/pulls/132575
This PR renames `bpy.types` that contain `Sequence` (and refer to a strip) to `Strip`.
The `bpy.types.Sequence` has already been renamed to `bpy.types.Strip` in
a previous PR. See !132179.
Additionally, this PR does some cleanup renamings in the sequencer
RNA files (e.g. `sequence` -> `strip`).
Part of #132963.
Pull Request: https://projects.blender.org/blender/blender/pulls/133054
Support differentiating between portable & system installations,
useful to properly locate relative paths which would not work
on system installations.
Ref !133143
Part of the Jan 2025 Code Quality project described in #130975.
This patch aims to improve user-facing messaging when adding effects or
transitions, properly polling them out based on context, and avoiding
unnecessary error messages when possible.
- Rearrange "add Effect Strip" UI in order of required number of
selected strips to create the effect strip, from 0 -> 1 -> 2
- Properly poll out these operators if not enough non-sound strips (i.e.
any strips with video content) are selected.
- Note that this does not require any extra iterations over the
entire seqbase.
- Gracefully avoid errors with trying to add effect/transition strips
when sound strips are part of the selection: for example, when the
user has selected connected strips.
- In these cases, it is clear that the user wishes to operate on
the strips with video content.
- Refactor `seq_effect_find_selected` to fix bugs and account for all
cases, removing TODOs in place. Rename it `seq_effect_get_new_inputs`
to more accurately express its purpose.
- Rename various `last_seq` to `active_strip` to adhere to new conventions
laid out in #132736
- Update UI tooltips for effect, transition, and fades to make their use
clearer.
Pull Request: https://projects.blender.org/blender/blender/pulls/132672
Show the Indices overlay setting regardless of Developer Extras being
turned on or not.
With the introduction of Geometry Nodes, having access to the indices
is handy outside of development environments (as well as in game
development or to debug i/o issues).
Pull Request: https://projects.blender.org/blender/blender/pulls/133095
The hardcoded value doesn't work well with real scale human heads for
example (was already adjusted once in a76b5d3a07).
The result for too high values is a complete "freeze" of the whole curve
(since the solution from e7606139ba has the problem that it keeps
running into max iterations of the collision solver).
As long as no better solver is implemented, it is better to have an
adjustable value (to work on differently sizes objects) to not run into
the above issue (same as the old particle hair system had) and show it
in sculptmode next to the button which enables collision.
This is done per `Curves` (same as the flag
`CV_SCULPT_COLLISION_ENABLED`), similar to symmetry settings
[alternatively, it could be part of `BrushCurvesSculptSettings` but I
think it makes more sense in Curves] and then passed on to the
`CurvesConstraintSolver`.
Includes versioning code (to set the default for old files).
Pull Request: https://projects.blender.org/blender/blender/pulls/132997
As the complaint shows, using default layout the column for absolute
keys in the Shape Keys list gets cut off. This PR increases this space
by changes to alignment and column split factor.
Pull Request: https://projects.blender.org/blender/blender/pulls/131887
The Action Editor was already getting crowded, but has become even
moreso with the addition of the new Slot selector. Part of this clutter
is due to the NLA-related buttons:
- The up/down track switching buttons.
- The Push Down button.
- The Stash button.
The latter two are currently still useful, but don't need to be directly
on the header itself. This PR moves them to the header's Action menu.
The up/down buttons have several issues:
- They are conceptually confusing: you cannot visually see what's
happening or which track you're on without an NLA editor open anyway,
so somewhere in the NLA Editor would be a better place for them.
- Their functionality is broken, and it seems has been for a long time:
you can go down in the track stack, but often can't go back up,
despite the existence of the up button. It doesn't appear that anyone
has reported this cripplingly broken behavior, which strongly suggests
that very few people (if anyone) is using or relying on these buttons.
- They don't make any sense when you have more than one strip on a track
anyway (which strip do you go into tweak mode on?).
For all these reasons, this PR simply removes the up/down buttons.
- 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.
Two messages were not translatable because they used a string stored
in a variable, or an if/else expression.
One was translated when it should not have, because it prints the name
of a material.
Pull Request: https://projects.blender.org/blender/blender/pulls/132737
- "Strength" in the context of Grease Pencil, deals with opacity, and
adjusts the brush stroke alpha.
- "Strength" can mean measurable units like 'noise', 'light', etc.
- Anything else using physical strength in a generic concept.
Issue reported by Hoang Duy Tran.
"Smooth" can be many things, but mostly a verb or adjective depending
on context.
Already handled in the past, but some things were missed or introduced
since then.
- In the context of color balance, refers to a power function. Uses
ID_MOVIECLIP context, because the ID_NODE is already used for math
functions.
- In the context of the scale constraint, also a power function.
- In the context of physics and particle settings, refers to a
falloff.
- In the context of property subtypes and units, refers to a
quantity.
Issue reported by Hoang Duy Tran.
"Light" already has multiple contexts, but some were missing:
- In general, "Light" refers to a Blender Light object. In many cases,
this comes from an `id_type` enum, already using the ID context. Use
it also for properties that were missing that context.
- In the context of render passes, "Light" is the actual illumination
factor, not the light emitor. A new "Render Layer" translation
context is introduced for this purpose as no existing ones are both
specific and explicit enough.
Issue reported by Hoang Duy Tran.
"End" in "Clip End" can be better translated to something like "Far"
in some languages. Using the "Camera" context even when it's not
specifically a camera clipping (also affects light probes).
Issue reported by Gorazd-Gorup.
- In a text sequence, "Box" refers to the color rectangle behind the
text. Reuses the "Sequence" context already used for the same thing.
Issue reported by Gabriel Gazzán.
- "Match Case" and "Wrap Around" were renamed but they do not need a
translation context anymore.
- Spreadsheet tooltips with unneeded translation of format
strings like `fmt::format(TIP_("{}"))`.
EEVEE material slots would be erroreously shown when there's no material
slots in a Grease Pencil object. Changed the `poll` function to prevent
this from happening.
Pull Request: https://projects.blender.org/blender/blender/pulls/132846
Similar to other visibility properties, include "hide_viewport" in
collection properties tab. One issue is that, when collection is
disabled, automatically parent collection is selected or tab is gone
when parent collection does not exist. The check was added in
0a903e7ab1, it doesn't seem very useful so
removed that.
Pull Request: https://projects.blender.org/blender/blender/pulls/132107
Support walking over non-manifold edge loops since calculating a
per-edge UV length only makes sense if all UV's that use that edge
are taken into account.