Commit Graph

3492 Commits

Author SHA1 Message Date
Hans Goudey
ee352c968f Fix #109070: Creating mesh from Python skips setting faces sharp
The default value of the "sharp_face" attribute is False like other
boolean attributes. That mistakenly changed behavior in addons
that created meshes with `Mesh.from_pydata`. To fix, add an
argument with a default value that maintains the behavior
from before, and add convenience, `shade_smooth` and
`shade_flat` methods.
2023-06-19 21:40:59 -04:00
Hans Goudey
c3a12704de Fix: Torus primitive shaded smooth after mesh refactor
See #109070 (full fix will contain a more general change).
2023-06-19 21:33:14 -04:00
Falk David
19f5590658 Fix GPv3 selection operators always showing 2023-06-19 16:32:29 +02:00
Sietse Brouwer
3432fc0b87 GPv3: Domain support for selection operators
This patch adds support for two of the three selection domains in the Edit Mode tool settings: point and stroke.

Affected selection operators: select all, lasso select, select pick, box select.

Pull Request: https://projects.blender.org/blender/blender/pulls/108970
2023-06-19 16:12:11 +02:00
Philipp Oeser
83990475a7 Fix: improve poll for NodePanelOperator
Also check for actually being in the Node Editor, otherwise we get
errors from other editors (e.g. on F3 search) due to missing
'edit_tree'.

Pull Request: https://projects.blender.org/blender/blender/pulls/109125
2023-06-19 15:18:56 +02:00
lolloz98
fb81740adc GPv3: Select random operator
Adds a "Select random" operator for the new Grease Pencil data type.

Resolves: #108933

Pull Request: https://projects.blender.org/blender/blender/pulls/109009
2023-06-19 12:14:52 +02:00
Falk David
81b99c327b Fix GPv3 experimental link 2023-06-19 11:40:40 +02:00
Chris Blackbourn
1069584a0a Cleanup: Fix typo in comment of uvcalc_lightmap.py 2023-06-18 16:18:58 +12:00
Sun Kim
e9de2f9fb7 Fix: Sculpt: Remove face map option from face set initialization
The face map option was removed from 46cf093270. This can be
replaced by an option to create face sets from an integer attribute.

Pull Request: https://projects.blender.org/blender/blender/pulls/109068
2023-06-17 16:29:31 +02:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Hans Goudey
63dae2a105 Nodes: Add rotation socket type, support in many geometry nodes
Add a quaternion rotation socket type, and using the recently added
rotation attribute type, support the type in most of the multi-type
geometry nodes, and modifier attribute inputs and outputs.

The socket is still exposed with an XYZ Euler default value.
In the future we can add modes to this rotation value similar
to object rotations.

Rotation values have no implicit conversions to other types.
Nodes to convert to and from rotation values will be added
in a follow-up commit.

For now, the new socket type is hidden behind and experimental
option, because we haven't chosen the final color for it yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/108903
2023-06-14 20:30:10 +02:00
Lukas Tönne
8c2ad8bbd3 Nodes: Panel declarations for grouping sockets
Adds an optional list of panels to node trees. Each socket can be
assigned a panel. UI panels will be created in the future in the
modifier for these grouped sockets.

Panels are stored as a pointer array in node trees, next to socket
declarations. Each panel has a name, but it does not have to be unique.
In future a panel might also store whether it is visible by default and
similar information.

C API and RNA API are both added. Panels and their socket
assignments are accessible to users through another list in the "Group"
tab of the node editor sidebar.

Sockets in the same panel will remain together even when adding,
removing, or moving sockets or panels, renaming, etc.
A socket can be moved up or down within a panel but each panel
remains a contiguous block. Actual tree views may be created later.

Pull Request: https://projects.blender.org/blender/blender/pulls/108649
2023-06-14 18:02:40 +02:00
Richard Antalik
58d8a2ed67 Revert "Merge branch 'blender-v3.6-release'"
This reverts commit 01f0f8b86c, reversing
changes made to 26b5de6865.
2023-06-14 04:47:53 +02:00
Richard Antalik
01f0f8b86c Merge branch 'blender-v3.6-release' 2023-06-14 04:41:57 +02:00
Richard Antalik
b77e7480ef VSE: Remove retiming tool for 3.6 release
This reverts commits:
e1f6587f12
b4100ed377
6749593aec
a97cae3efc
559898709f
e4eb9e04e0
bb1c503bee
b21695a507
7bf56e5c75
4dc026ec8e
354ef89d20

Reason for reverting is to not introduce this feature with current UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/108870
2023-06-14 04:25:52 +02:00
Campbell Barton
26b5de6865 Docs: correct reference to types, remove redundant bpy.types prefix 2023-06-14 12:20:09 +10:00
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