Commit Graph

3276 Commits

Author SHA1 Message Date
Hans Goudey
e5ec04d73c Mesh: Move vertex/edge crease to generic attributes
Store subdivision surface creases in two new named float attributes:
- `crease_vert`
- `crease_edge`
This is similar to 2a56403cb0.

The attributes are naming conventions, so their data type and domain
aren't enforced, and may be interpolated when necessary. Editing tools
and the subdivision surface modifier use the hard-coded name. It might
be best if these were edited as generic attributes in the future, but
in the meantime using generic attributes helps.

The attributes are visible in the list, which is how they're now meant
to be removed. They are now interchangeable with any tool that works
with the generic attribute system-- even tools like vertex paint can
affect creases now.

This is a breaking change. Forward compatibility isn't preserved for
versions before 3.6, and the `crease` property in RNA is removed in
favor of making a smaller API surface area with just the attribute API.
`Mesh.vertex_creases` and `Mesh.edge_creases` now just return the
matching attribute if possible, and are now implemented in Python.
New functions `*ensure` and `*remove` also replace the operators to
add and remove the layers for Python.

A few extrude node test files have to be updated because of different
(now generic) attribute interpolation behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/108089
2023-06-13 20:23:39 +02:00
Brecht Van Lommel
835252fd1c Merge branch 'blender-v3.6-release' into main 2023-06-13 19:48:48 +02:00
nutti
c3514b0eb7 Docs: add data types of missing bpy.types.Object properties
Pull Request: https://projects.blender.org/blender/blender/pulls/108852
2023-06-13 19:46:11 +02:00
Damien Picard
b73ecb0be8 UI: improve layout for the texture mapping panel
Group Mirror X and Y under a heading.
Similarly, do the same for Even and Odd tiles.

Pull Request: https://projects.blender.org/blender/blender/pulls/107987
2023-06-13 19:20:17 +02:00
Chao Li
e165dae3b8 GPv3: Select ends operator
Adds a "Select Ends" operator for the new Grease Pencil data type.
This replaces the previous `gpencil.select_first` and `gpencil.select_last`.

Resolves #108802.

Pull Request: https://projects.blender.org/blender/blender/pulls/108864
2023-06-13 13:02:49 +02:00
Campbell Barton
508a2d8125 Cleanup: avoid 2x context modifier lookups 2023-06-13 14:33:15 +10:00
Julian Eisel
acb4f89a40 UI: Add filtering support to UI views
No user visible changes expected.

Needed for the asset shelf (#102879).

Adds a UI operator triggered on Ctrl+F that will attempt to start
filtering for the hovered UI view, typically enabling a filter text
button.

View items can implement their own filter method, there's no default
one. Maybe we should add default or re-usable string filtering method
though.
Filtering is applied after constructing the view and filtered out (as
in, invisible) items are kept in storage, so that their state
(selection, active, etc.) is preserved. The filtered state is cached in
the item, so this is only done once per redraw.
2023-06-12 12:31:11 +02:00
Chao Li
126bff3099 GPv3: "Select Linked" operator
This adds `GREASE_PENCIL_OT_select_linked` operator for the new grease pencil data.

Resolves #108750.

Pull Request: https://projects.blender.org/blender/blender/pulls/108829
2023-06-11 17:35:49 +02:00
Casey Bianco-Davis
825d2d301b GPv3: "Select More" and "Select Less" operators
Adds `GREASE_PENCIL_OT_select_more` and `GREASE_PENCIL_OT_select_less` operators for the new grease pencil system.

Resolves #108752.

Pull Request: https://projects.blender.org/blender/blender/pulls/108847
2023-06-11 16:09:11 +02:00
Jeroen Bakker
b1b74eb335 Cleanup: make format 2023-06-09 16:28:00 +02:00
Falk David
26bad3b187 Curves: Add separate start and end amounts to Select Ends operator
This commit renames the `curve.select_end` operator to `curves.select_ends` and replaces the properties with a `amount_start` and `amount_end` property.

Pull Request: https://projects.blender.org/blender/blender/pulls/108799
2023-06-09 16:12:27 +02:00
Philipp Oeser
d62ebe9318 Merge branch 'blender-v3.6-release' 2023-06-09 15:08:06 +02:00
Philipp Oeser
0696dd636c Fix #108737: Python error in Property Editor search menu
Caused by 5ca65001ea (which was already patched with ae7c71ef09 and
fa5cc84a0a)

Getting the right modifier would still fail / throw errors when not done
from the modifier extra ops dropdown.
Only there,  a 'modifier' attribute is set for context (via
`uiLayoutSetContextPointer` in `modifier_ops_extra_draw`).

So now check if a 'modifier' attribute is set for context (and fallback
to using the active modifier instead).
This way, polling errors in F3 search are gone and you can actually
execute the operators which are also in modifier extra ops dropdown from
elsewhere (e.g. F3 search).

Pull Request: https://projects.blender.org/blender/blender/pulls/108795
2023-06-09 15:07:00 +02:00
Hans Goudey
46cf093270 Mesh: Remove face map list, convert to integer attribute
Face maps were added as a prototype of a new rigging solution during
2.8 development. Their storage is redundant with the newer generic
attribute system (specifically with integer face attributes), and
they were never used much. This commit removes the face map list
and converts the storage to an attribute with the name `face_maps`.
There is nowhere to store the face map names anymore, so those
are not kept.

It probably still makes sense to have a feature like mesh face gizmo
selection for rigging. But the design and implementation woulds likely
have to change significantly, including possibly changing the storage
type, and making use of the generic attribute system instead of a
special type.

See #105317 for more discussion.
2023-06-09 13:54:52 +02:00
Sybren A. Stüvel
6452eccc80 #107126: Make FCurve.update() also deduplicate keys
The RNA function `FCurve.update()` now also deduplicates keys. This is done
in a way that is independent of key selection; simply the last key in the
list of keyframes 'wins' and overwrites earlier ones. It is exactly the
same as `FCurve.keyframe_points.deduplicate()`.
2023-06-09 12:06:27 +02:00
Pratik Borhade
03e4c4b26d Merge branch 'blender-v3.6-release' 2023-06-09 09:58:51 +05:30
Fynn Grotehans
bab7548f94 Fix #104628: Rename Texture-paint brush display panel to 'Cursor'
The same Panel was named different in Image editor -> Paint
and in 3D view -> Texture Paint. 'Cursor' is the common name for
this panel in all paint modes.

Co-authored-by: Fynn Grotehans <68659993+Fynn-G@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/108544
2023-06-09 06:26:28 +02:00
Habib Gahbiche
f3cb157452 Compositor: add new node: Kuwahara filter
The filter is used to reduce noise while preserving edges. It can be used to create a cartoon effect from photorealistic images.

It offers two variations:
1) Classic aka isotropic kuwahara filter: simple and faster computation. Algorithm splits an area around a single pixel in four parts and computes the mean of the region with the lowest standard deviation.
2) Anisotropic Kuwahara filter: improves the classical approach by considering the direction of structures of regions

This patch implements both approaches above as multi-threaded operations for the full-frame and tiled compositor.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107015
2023-06-08 16:14:45 +02:00
Christoph Lendenfeld
cfcf2cc3fa Merge branch 'blender-v3.6-release' 2023-06-08 11:08:47 +02:00
Christoph Lendenfeld
2387290e4f Fix #102737: Keyframe jump operator includes hidden curves in Graph Editor
The graph editor has the function to hide the display of FCurves and to only draw keyframes on selected curves.

Both options were not respected when executing the frame jump operator,
meaning it would jump to potentially hidden keyframes.

This patch adds a new operator that is specific to the Graph Editor and that respects those features.

The only possible issue that could arise from this is a slight confusion for the user
why they behave differently between editors.
Especially with only the Graph Editor and the 3D view open.
In general I think it's an improvement and follows the "you can only modify what you see" mantra in blender

Also
Resolves #97701

Pull Request: https://projects.blender.org/blender/blender/pulls/108549
2023-06-08 11:02:19 +02:00
Falk David
7f4f771442 GPv3: Add "Select Box" operator
This implements the `VIEW3D_OT_select_box` for the new grease pencil data-block.

Note that this also adds a `get_evaluated_grease_pencil_drawing_deformation` function, but there are TODOs left.
This will have to be updated once the modifier logic is in place.

Pull Request: https://projects.blender.org/blender/blender/pulls/108661
2023-06-08 10:20:18 +02:00
Jeroen Bakker
52b6a37845 Cleanup formatting. 2023-06-08 08:07:13 +02:00
Harley Acheson
08d2c17478 Merge branch 'blender-v3.6-release' 2023-06-07 08:24:23 -07:00
Sam Cantwell
2a7739f9d3 Fix #108303: Added missing Auto-Masking label
The Auto-Masking label in the brush settings of
sculpt mode was missing. Added the label back.

Pull Request: #108494
2023-06-07 08:19:41 -07:00
Brecht Van Lommel
0900c3f87f Merge branch 'blender-v3.6-release' into main 2023-06-07 14:37:21 +02:00
Germano Cavalcante
8dd1a6d91b Fix keymap versioning mistake in 3010f1233b
The file version was bumped to (4, 0, 4), so the new version check
should be done against (4, 0, 3).
2023-06-07 09:22:55 -03:00
Brecht Van Lommel
65fc10bd33 Compositor: first steps to use realtime compositor for renders
* Enable "Experimental Compositors" in preferences, then choose
  Realtime GPU execution mode in node editor sidebar.
* Only supports combined pass input and Render Result combined output.
* No viewer nodes, no file output nodes, and no node previews yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/108629
2023-06-07 14:17:48 +02:00
Campbell Barton
6704881708 Cleanup: spelling in comments 2023-06-07 21:47:45 +10:00
Christian Brinkmann
8c340a8bc7 Fix animation playback to work with both OpenRV and RV commercial
And add preview range support.

Pull Request: https://projects.blender.org/blender/blender/pulls/108559
2023-06-07 13:28:16 +02:00
Philipp Oeser
9ef62fb13a Fix: missing grease pencil select menu
3aaacd6e30 renamed the greasepencil select
menu (but didnt do in places where it is actually called).

Pull Request: https://projects.blender.org/blender/blender/pulls/108690
2023-06-07 10:34:51 +02:00
Campbell Barton
dfb8ff00fb Fix attribute error running TEXT_OT_jump_to_file_at_point
Resolve Python exception running this operator without a filepath set,
outside a text-space.
2023-06-07 15:28:09 +10:00
Campbell Barton
1251b7c400 Text: always use TEXT_OT_jump_to_file_at_point for jumping to source
Now the operator is used for both the internal & external editor,
so there is no need for the caller to call this operator only when
the preferences are set.
2023-06-07 15:28:09 +10:00
guishe
e16ec95a16 UI: Add a custom text editor preference
Add a user preference to set up a custom text editor for editing text
files with the "Edit Source" action in the UI context menu.

- An operator TEXT_OT_jump_to_file_at_point has been added.
- A custom editor can be set in the user preferences.
- A preset has been included for "Visual Studio Code".
- When the editor is not set, use Blender's internal editor.

Ref !108299.
2023-06-07 14:09:19 +10:00
Germano Cavalcante
8e059b569b UI: move 'Face Nearest' snap option to another section
The snap mode called "Face Nearest" (and the "Increment" but that's for
another time) doesn't behave like the other snap modes.

Unlike the other snap modes, "Face Nearest" does not act on a Snap
Base (or Snap Source).

It always acts on the origin of individually transformed elements, (such
as each vertex individually).

It works just like the "Project Individual Elements" option.

So this commit makes the following changes:
- `Snap With` was moved to the beginning of the popover
- `Align Rotation to Target` and `Backface Culling` have been moved closer to the snap targets
- `Snap With`, `Target Selection` and `Align Rotation to Target` are no longer hidden by varying the mode and options
- `Project Individual Elements` has been replaced with the `Face Project` option
- `Face Nearest` has been moved to stick together with the `Face Project` option

Co-authored-by: Germano Cavalcante <germano.costa@ig.com.br>
Pull Request: https://projects.blender.org/blender/blender/pulls/108555
2023-06-06 19:35:57 +02:00
Falk David
b29ba95cae GPv3: Add "(De)select All" operator and keymap
This adds the `GREASE_PENCIL_OT_select_all` operator as well as a new keymap for edit mode for the new grease pencil objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/108628
2023-06-06 14:45:54 +02:00
Julian Eisel
8e64030a40 Assets: Remove unnecessary poll condition in "Open Blend File" operator
Since ccc9eef1b9, the asset-library-reference isn't required anymore to
get the full path of an asset. So don't check for this in the `poll()`
method of the operator.
2023-06-06 13:04:04 +02:00
Pratik Borhade
b84eedbb74 GPv3: Set default tool in draw mode
Default tool ("Draw") is not selected in draw mode due to typo

Pull Request: https://projects.blender.org/blender/blender/pulls/108652
2023-06-06 12:38:25 +02:00
Germano Cavalcante
260125aed0 Transform: Allow navigation for operator when called from macro or menu
Extrude and duplicate operators now support navigation
(if enabled in preferences).
2023-06-05 16:49:44 -03:00
Germano Cavalcante
17d12522be Cleanup: Simplify Extrude menu code
This commit simplifies the "Extrude" menu layout code.

This should make future modifications and maintenance easier.

Refs:
33b1cbf06d
46b0e90cf6
db4a205fa0
2023-06-05 16:49:44 -03:00
Germano Cavalcante
05b8cfec5e Transform: Allow navigation with "release_confirm"
This limitation was added to avoid conflicts with tools.

But since we now have the "allow_navigation" option on transform
operators, there is no real benefit to having this limitation.
2023-06-05 16:49:44 -03:00
Bastien Montagne
90a0f39c02 Merge branch 'blender-v3.6-release' 2023-06-05 18:12:35 +02:00
Damien Picard
745baa788d I18n: extract a few messages
- "Invalid" in transformation messages.
- For three messages, translation occured after a string
- concatenation, so the full message was not found.
  Instead, translate a format pattern and format it afterwards.
- Alembic errors when there is an import type mismatch.

Pull Request: https://projects.blender.org/blender/blender/pulls/108212
2023-06-05 18:10:11 +02:00
Campbell Barton
e82ca9b5ff Cleanup: rename ParticleSettings.child_nbr to child_percent
The old name was only kept to avoid breaking compatibility.
2023-06-04 19:52:10 +10:00
Germano Cavalcante
3010f1233b Transform: new feature to edit the 'Snap Base'
This commit implements a new modifier key (`B`) for the transform
operators.

This new key allows changing the 'Snap Base' of a transform by snapping
it to a defined point in the scene.

Ref #66424

# Implementation Details

- This feature is only available in the 3D View.
- This feature is only available for the transform modes:
  - `Move`,
  - `Rotate`,
  - `Scale`,
  - `Vert Slide` and
  - `Edge Slide`.
- The `Snap Base Edit` is enabled while we are transforming and we
  press the key `B`
- The `Snap Base Edit` is confirmed when we press any of the keys:
 `B`, `LMB`, `Enter`
- During um operation, if no snap target is set for an element in the
  scene (Vertex, Edge...), the snap targets to geometry Vertex, Edge,
  Face, Center of Edge and Perpendicular of Edge are set automatically.
- Constraint or similar modal features are not available during the
  `Snap Base Edit` mode.
- Text input is not available during the `Snap Base Edit` mode.
- A prone snap base point is indicated with an small cursor drawing.

Pull Request: https://projects.blender.org/blender/blender/pulls/104443
2023-06-03 04:18:49 +02:00
Falk David
4f977ad56f Merge branch 'blender-v3.6-release' 2023-06-02 15:07:18 +02:00
Sietse Brouwer
ad28638c97 Fix #108472: weight painted when ctrl-left-click on bone in GP
In Grease Pencil weight paint mode, when ctrl-clicking on a bone
there was also weight painted on vertices. This was caused by a
redundant keymap entry in the Blender keymap. Entry is removed.
Now ctrl-clicking on a bone doesn't affect vertex weights.

Pull Request: https://projects.blender.org/blender/blender/pulls/108521
2023-06-02 15:01:15 +02:00
RedMser
240a1edfa1 UI: add text editor zoom in/out to view menu
Ref !108430.
2023-06-02 15:24:00 +10:00
Campbell Barton
f47aa50d7e Cleanup: format 2023-06-02 10:16:14 +10:00
Harley Acheson
a58e5ccdec UI: File Save Incremental Operator
Operator for the TopBar File Menu that saves the currently open file
with a numerically incremented name.

Pull Request: https://projects.blender.org/blender/blender/pulls/104678
2023-06-01 17:34:57 +02:00
Nate Rupsis
b95cf5ff0f Animation: Update NLA "TAB" tweak mode to be full stack evaluation
This PR updates the key mapping (TAB) for Tweak mode (Lower stack) to Full stack for the NLA editor

[Issue](https://projects.blender.org/blender/blender/issues/108026)

Pull Request: https://projects.blender.org/blender/blender/pulls/108050
2023-06-01 11:03:13 -04:00