Commit Graph

2997 Commits

Author SHA1 Message Date
Pratik Borhade
06a2617107 Fix #100786: Collection hide viewport in properties tab
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
2025-01-10 14:49:43 +01:00
Habib Gahbiche
9b484b5251 UI: Add hint for snapping inversion in status bar
Followup to https://projects.blender.org/blender/blender/pulls/130379

Status bar now shows correctly that pressing `ctrl` while snapping will invert snapping.

Pull Request: https://projects.blender.org/blender/blender/pulls/131009
2025-01-10 10:12:27 +01:00
Omar Emara
e52bbae2bf Compositor: Only show precision for GPU device
The compositor precision option only matters for GPU device, so hide it
when in CPU mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/132680
2025-01-08 07:41:48 +01:00
Campbell Barton
7b174109d1 Fix #132734: Follow Active Quads fails with non-manifold meshes
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.
2025-01-08 14:02: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
Falk David
a9c87a15fc Cleanup: VSE: Rename SequenceColorTag to StripColorTag and flags
Also rename the flags from `SEQUENCE_COLOR_*` to `STRIP_COLOR_*`.
2025-01-07 17:19:24 +01:00
ZHU Xinyu
a69e48be54 Fix #132655: 'Add Modifier' operator missing in menu for Lattice and Point Cloud objects
LATTICE was missing as one of the supported_types for VIEW3D_MT_object_modifiers.

Fixing https://projects.blender.org/blender/blender/issues/132655

Pull Request: https://projects.blender.org/blender/blender/pulls/132656
2025-01-07 13:52:44 +01:00
Christoph Lendenfeld
6b421326b6 Fix #131495: Pose Library error with enum values
Enums in Blender evaluate to a string, so trying to add them to a pose
failed with an error because FCurves only accept numbers.

The fix is to modify the data path and split the property name off.
By evaluating that we arrive at the bone, from which we can call `get(property_name)`
to get the int value.

Pull Request: https://projects.blender.org/blender/blender/pulls/132124
2025-01-07 10:41:40 +01:00
Campbell Barton
104c655fb7 Refactor: adjust the URL/file-system data iterators for extensions
The logic to generalize over downloading a URL or reading data from
the file-system included static values in the iterator along with the
data being read - so the caller could access the total expected size of
the data being read. While this worked, the result didn't read well.

Now these iterators yield the data being read, a new type has been
added for the caller to read the size hint from.

Also correct invalid doc-string.
2025-01-07 17:51:04 +11:00
Campbell Barton
2f309c10c5 Cleanup: replace Generator type with Iterator where appropriate 2025-01-07 10:10:25 +11:00
Falk David
655a17a6ab Refactor: VSE: Rename Sequence to Strip
This renames the struct `Sequence` to `Strip`.

While the motivation for this partially comes from
the "Sequence Design" #131329, it seems like this
is a good refactor whether the design gets implemented
or not.

The `Sequence` represents what users see as strips in the
VSE. Many places in the code already refere to a `Sequence`
as "strip". It's the C-style "base class" of all strip types.

This also renames the python RNA type `bpy.types.Sequence`
to `bpy.types.Strip` which means that this technically breaks
the python API.

Pull Request: https://projects.blender.org/blender/blender/pulls/132179
2025-01-06 14:19:24 +01:00
Pratik Borhade
c2a54f6858 Fix #132377: Grease Pencil: Toolbar color does not change in context menu
Use unified paint settings for "color" prop in vertex paint context menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/132447
2025-01-06 11:29:01 +01:00
Campbell Barton
4f1817cc18 Cleanup: declare __all__ for Python scripts
Declare all to make public public API's explicit and
help detect unused code.
2025-01-06 16:45:36 +11:00
Campbell Barton
6ac52551d3 Cleanup: edit comments to avoid confusion type-checking commands
These comments caused vulture to fail.
2025-01-06 16:27:27 +11:00
Campbell Barton
c5203ef7fd Cleanup: use context-manager for opening files 2025-01-04 22:26:18 +11:00
Campbell Barton
0f1e1bcdae Fix error adding presets with Python 3.13
A separate name-space from the functions body is cleaner
and avoids unlikely but possible errors if names ever conflict.
2025-01-04 22:24:00 +11:00
Campbell Barton
444f1064c9 Cleanup: remove unused functions, imports 2025-01-04 21:09:41 +11:00
Campbell Barton
6216e8574c Cleanup: declare __all__ for doc-generation & icon updating utils 2025-01-04 20:33:53 +11:00
Campbell Barton
8a9bdeb943 Extensions: suppress resource leak warning on WIN32
Accessing the internal extensions command would warn that the processes
stdout wasn't closed on completion. While it's harmless at the moment,
ensure it's closed using a context manager.
2025-01-04 19:52:18 +11:00
Julien Duroure
2add9e8224 glTF: Revert last changes, as these changes are reverted in core too 2025-01-03 21:08:42 +01:00
Julien Duroure
eb09364030 glTF: Update after recent Blender changes on b43e2168e3 2025-01-03 15:24:54 +01:00
RedMser
f58f77d24e Fix #132033: Falloff options greyed out when disabled
Falloff/cavity mask checkboxes seems disabled themselves when unticked.
The layout was split so that only the options below the checkbox are inactive.
UI looks and acts the same when checkboxes are ticked.

Pull Request: https://projects.blender.org/blender/blender/pulls/132507
2025-01-03 11:02:21 +01:00
Campbell Barton
c7fb01ff91 Cleanup: use static sets for "contains" checks 2025-01-03 14:47:57 +11:00
Sean Kim
9e78f1c840 Paint: Rename 'Frame Selected' Menu operator to 'Frame Last Stroke'
This commit better aligns the naming of this operator to what it does in
Sculpt, Vertex Paint, Weight Paint, and Texture Paint

Ref: #84044

Pull Request: https://projects.blender.org/blender/blender/pulls/132248
2025-01-02 18:11:39 +01:00
Sybren A. Stüvel
426d1683ee Import: explicitly create & assign action slots when importing BVH/FBX
Explicitly create & assign an action slot when importing animation data
from BHV and FBX files.

Ideally this fix wouldn't be necessary, and it's still my wish to have
stronger backward compatibility of the Python API. When/if we have that,
this commit could be reverted.

Fixes: #131305

Co-authored-by: Philipp Oeser <philipp@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/131360
Pull Request: https://projects.blender.org/blender/blender/pulls/131380
Pull Request: https://projects.blender.org/blender/blender/pulls/132549
2025-01-02 14:11:39 +01:00
Campbell Barton
7481355397 Cleanup: scripts, unused variables & re-declaring built-ins 2025-01-02 15:11:15 +11:00
Brecht Van Lommel
6a15f301ef Revert "Fix: Missing super().__del__() in Cycles and Hydra render engine"
This is leading to "'super' object has no attribute '__del__'" errors
in some situations. As explained in #132476 this is only for future
proofing, so don't do it yet.

This reverts commit f301952b6a.
2024-12-31 19:30:39 +01:00
Brecht Van Lommel
f301952b6a Fix: Missing super().__del__() in Cycles and Hydra render engine
According to the Python API release notes, this is required now along
with super().__init__() which was already done.

Also fixes mistake in example in API docs.

Pull Request: https://projects.blender.org/blender/blender/pulls/132476
2024-12-31 15:18:25 +01:00
Jonas Holzman
f6bbcaba6d UI: Improve Studio Lights Editor layout
Improve the Studio Lights Editor Preferences panel by replacing the
current column layout (which looks very horizontally compressed using
the default Preferences window size) by a grid flow layout with boxes.

Pull Request: https://projects.blender.org/blender/blender/pulls/132425
2024-12-30 00:40:07 +01:00
Alaska
8efd41271d Compositor: Add OIDN Quality to denoise node
This commit exposes the "Quality" option of the Open Image Denoiser
to the user for the denoise node in the compositor.

There are a few quality modes:
- High - Highest quality, but takes the longest to process.
- Balanced - Slightly lower quality, but usually halves
the processing time compared to High.
- Fast - Further reduce the quality, for a small increase in
speed over Balanced.

Along with that there is a `Follow Scene` option which will use the
quality set in the scene settings.

This allows users that have multiple denoise nodes
(E.g. For multi-pass denoising), to quickly switch all nodes between
different quality modes.

Performance (denoising time):
High: 13 seconds
Balanced: 6 seconds
Fast: 5 seconds

Test setup:
CPU: AMD Ryzen 9 5950X
Denoising a 3840x2160 render

---

Follow ups:
Ideally the "Denoise Nodes" UI panel in the render properties panel
would be hidden if the compositor setup does not contain any
denoise nodes.

However implementing this efficiently can be difficult and so it was
decided this task was outside the scope of this commit.

Pull Request: https://projects.blender.org/blender/blender/pulls/130252
2024-12-28 01:44:49 +01:00
SensArice
1098f434b0 Geometry Nodes: Find in String node
Add a node that finds the number of times a substring occurs in a string,
and the position of the start of the first match.

See the PR description for more rational and details.

Pull Request: https://projects.blender.org/blender/blender/pulls/129270
2024-12-24 17:12:19 +01:00
Dan-Gry
f363b09e6e Fix #132120: Separate Menu Class for Adding Empty Objects
This PR adds a separate menu class for adding empty objects, rather
than using operator_menu_enum. This way the menu can be extended by
python.

Pull Request: https://projects.blender.org/blender/blender/pulls/132192
2024-12-23 22:31:33 +01:00
Hans Goudey
081b0258ef Fix #101769: Curves sculpt strength UI sidebar inconsistency
"Add" and "Delete" don't use the brush strength, don't display
it in the sidebar in those cases.
2024-12-20 15:46:18 -05:00
Pratik Borhade
2e10c5d174 Fix #102439: Missing node tools in keymap hierarchy
Select_* tool keymap was only accessed from searching, they were not
exposed in hierarchy. Now fixed, added inside "node editor" keymap
category.

Pull Request: https://projects.blender.org/blender/blender/pulls/132154
2024-12-20 12:10:58 +01:00
YimingWu
5c04893104 Fix #132117: Grease Pencil: Material slots display logic fix
Sometimes context.material.grease_pencil will be none. E.g. when adding
a material slot in some grease pencil objects. This fix modified the
`poll` function to show material slots when the active object is a
grease pencil object or an active grease pencil material is present in
the context.

Pull Request: https://projects.blender.org/blender/blender/pulls/132158
2024-12-20 11:46:34 +01:00
Richard Antalik
8ce5356522 VSE: Text editing in preview
This commit implements most features needed for simple text editing.

Active text strip can be edited in preview by pressing tab key, which
enabled text editing mode. With this mode active, outline matches text
boundary box and cursor is drawn.

Cursor can be moved with usual keys. Pressing shift starts selection.
Selection and navigation works when text is scaled or rotated. Mirrored
text is not supported in this PR. it can be done, but the text is
unreadable that way, so I kept it simple.

Multi line text is supported. Pressing return key starts new line.

Copy/paste operator uses OS copy paste buffer, so text from other apps
can be pasted.

Text is still limited to 512 characters. Text string property still
exists in side panel and is limited to single line. Individual
characters can not be styled in different way like in 3D viewport, but
the code is mostly ready for such feature.

Ref: #126547

Pull Request: https://projects.blender.org/blender/blender/pulls/127239
2024-12-19 15:56:54 +01:00
Aras Pranckevicius
974efe7d23 Refactor: move ffmpeg/video related code into one place
Previously, code related to reading/writing movie files via ffmpeg was
scattered around: some under blenkernel, some directly in generic
imbuf headers, some under intern/ffmpeg. Some of the files were named
with not exactly clear names. Some parts not directly related to movies
were including ffmpeg headers directly (rna_scene.cc).

What is in this PR:

Movie and ffmpeg related code is now under imbuf/movie:
- IMB_anim.hh: movie reading, proxy querying, various utility functions.
- IMB_movie_enums.hh: simple enum definitions,
- IMB_movie_write.hh: movie writing functions.
- intern: actual implementation and private headers.
    - ffmpeg_compat.h: various ffmpeg version difference handling
      utilities,
    - ffmpeg_swscale.hh/cc: scaling and format conversion utilities
      for ffmpeg libswscale,
    - ffmpeg_util.hh/cc: misc utilities related to ffmpeg,
    - movie_proxy_indexer.hh/cc: proxies and timecode indexing for movies,
    - movie_read.hh/cc: decoding of movies into images,
    - movie_write.cc: encoding of images into movies.
- tests: basic ffmpeg library unit tests that previously
  lived under intern/ffmpeg.

Interface changes (at C++ level, no Python API changes):
- Mostly just movie related functions that were BKE_ previously, are now IMB_.
- I did one large-ish change though, and that is to remove bMovieHandle
  struct that had pointers to several functions. Now that is
  IMB_movie_write_begin, IMB_movie_write_append, IMB_movie_write_end
  functions using a single opaque struct handle. As a result, usages
  of that in pipeline.cc and render_opengl.cc have changed.

Pull Request: https://projects.blender.org/blender/blender/pulls/132074
2024-12-19 12:34:30 +01:00
Sean Kim
3e71e6c216 Cleanup: Suppress python console warning after previous commit
Introduced in ee2f2f00bd

Without the `register` function we get the following error in the
console when running blender:

Warning! '<path_to_blender>/scripts/startup/nodeitems_builtins.py'
has no register function, this is now a requirement for registerable
scripts

Pull Request: https://projects.blender.org/blender/blender/pulls/132091
2024-12-19 00:51:45 +01:00
Sean Kim
0c1ee9eba2 Texture Paint: Add keybind for "merged" option when sampling colors
The removal of the UNDO flag to prevent adding undo steps when using the
`paint.sample_color` operator results in the "Sample Merged" option
being inaccessible to users without them adding a keymap of their own.

This commit makes the following changes:
* For Texture Paint using the default blender keymap, the Shift-Ctrl-X
  keybind is assigned to this operator with the merged option set to True
* For Texture Paint, using the industry compatible keymap, the Shift-I
  keybind is assigned to this operator with the merged option set to
  True

This parameter is only relevant for 3D Texture Painting so it is not
added to the other modes.

For all other `paint.sample_color` entries in both the keymap and in
some menus, the `merge` option is explicitly set to False.

Ref: #101144

Pull Request: https://projects.blender.org/blender/blender/pulls/132047
2024-12-18 20:30:10 +01:00
Hans Goudey
91e1031c42 Fix #132079: Python error when adding modifier on Surface object
It looks like the Mesh Sequence Cache modifier isn't supported
for this object type.
2024-12-18 13:17:27 -05:00
dupoxy
dc0032cc2a Fix #124937: Grease Pencil: Change Shear tool icon to match Blender 4.2
Update the icon of the shear tool in edit mode to match the
Grease Pencil shear icon in Blender 4.2.

Pull Request: https://projects.blender.org/blender/blender/pulls/131993
2024-12-18 19:15:30 +01:00
Sean Kim
a8f1b4c462 Fix #49740: Reset Stencil Transform occasionally doesn't work
Prior to this commit, if the "Texture Mask" stencil was reset, this
would call the `brush.stencil_reset_transform` operator with the `mask`
parameter set to `True`. Subsequent clicks, even on the "Texture"
stencil "Reset Transform" button would still pass `True` to the
underlying C++ API, even though the `mask` property was left
uninitialized.

This commit sets the parameter to False explicitly to fix this bug.

Pull Request: https://projects.blender.org/blender/blender/pulls/132001
2024-12-17 17:51:08 +01:00
ernst-ellert
c4b8210c55 VSE: Add Duplicate operator for preview region
This is implemented as macro `sequencer.preview_duplicate_move`. New
macro is needed, because different transform operator is called than in
`sequencer.duplicate_move`

Duplicate operator was modified to handle overlap and to delete sound
strips after duplication.

When strip is duplicated in preview, it will be moved to nearest free
channel above original strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/131529
2024-12-17 17:42:54 +01:00
Jacques Lucke
16fa437006 Nodes: update menu integration in the custom nodes Python template
The `NodeCategory` system is not used by Blender anymore for a couple years
already. Instead of using an additional abstraction layer, we now just use a
normal menu. One benefit of the `NodeCategory` system was that it could be used
to populate the search. However, the search is now directly populated from the
menu anyway.

Fixes #115746.

Pull Request: https://projects.blender.org/blender/blender/pulls/132021
2024-12-17 15:59:06 +01:00
Jacques Lucke
ee2f2f00bd Nodes: remove dead code that was used for node menus
Blender does not use this code anymore and a global search on Github
suggests that this was not used by anyone.

Pull Request: https://projects.blender.org/blender/blender/pulls/132019
2024-12-17 15:30:21 +01:00
Pratik Borhade
1debbcae1e Fix #130853: Asset shelf popup when Spacebar mapped to different actions
Similar to toolbar, when spacebar is mapped to `play`, use `shift +
spacebar` for asset-shelf popup. When spacebar mapped `toolbar`, invoke
asset shelf in paint modes. When `spacebar=search`, do not map any key
for asset-shelf popup

Co-authored-by: Julian Eisel

Pull Request: https://projects.blender.org/blender/blender/pulls/131351
2024-12-17 11:15:26 +01:00
Campbell Barton
c1951f6508 Cleanup: remove unused variables 2024-12-14 23:17:48 +11:00
Jacques Lucke
ebfbc7757b Fix #128589: allow disabling node group interface UI for custom node tree types
This adds a new `bl_use_group_interface` property that can be set on custom node
group types. By default it is `true` to avoid this being a breaking change. If
it's set to `false` some UI elements related to the built-in node group
interface are hidden.

Pull Request: https://projects.blender.org/blender/blender/pulls/131877
2024-12-14 11:51:19 +01:00
Thomas Dinges
f3e5c17283 Cleanup: Remove legacy GPENCIL code from UI python files.
Also remove unused gpencil modifier defines.

Pull Request: https://projects.blender.org/blender/blender/pulls/131879
2024-12-14 11:19:24 +01:00
Aras Pranckevicius
82f0578ca3 Compositor: always use the new CPU compositor
Part of #125968: this makes the new CPU compositor always be used.

Pull Request: https://projects.blender.org/blender/blender/pulls/131783
2024-12-12 20:17:36 +01:00