Commit Graph

309 Commits

Author SHA1 Message Date
Iliya Katueshenock
667d5d5a7e Geometry Nodes: Move simulation panel higher in node editor sidebar
Swap simulation sockets panel and node socket properties panels
to change the default panel order to make it easier to edit the list.

Pull Request: https://projects.blender.org/blender/blender/pulls/109305
2023-06-23 19:23:26 +02:00
lolloz98
fdc0402a50 GPv3: Select Alternate
Adds a "Select Alternate" operator for the new Grease Pencil data type.
This replaces the previous `gpencil.select_alternate`.

Resolves #109204.

Pull Request: https://projects.blender.org/blender/blender/pulls/109240
2023-06-23 11:34:00 +02:00
Clément Foucault
ddd88c00b4 EEVEE-Next: Irradiance Cache: Initial Implementation
This is a full rewrite of the irradiance volume baking.
The baking is much faster and doesn't scale linearly with the number
of irradiance samples in the volumes.

Ref #105643

Pull Request: https://projects.blender.org/blender/blender/pulls/108639
2023-06-23 08:39:46 +02:00
Falk David
b3f3b41d09 GPv3: Initial Layer Tree UI
Adds a new UI template to view the current layer tree of the active Grease Pencil object.

This UI tree view implements the following features (for now):
 - Displaying all the layers with their names and highlighting the active layer.
 - Changing the active layer by clicking on an item.
 - Adding new layers (using a new operator).
 - Removing the active layer (using a new operator).
 - Renaming a layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/109197
2023-06-22 10:51:43 +02:00
Campbell Barton
02b8bde4b3 Cleanup: use the term "props" for operator properties
Differentiate operators from their properties.
2023-06-22 12:35:49 +10:00
Chris Blackbourn
e0e3650495 Fix #108811: Follow active quads doesn't respect uv selection
Added selection support to the Follow Active Quads operator.

Simplified code and added comments.

Also added new error codes:
 * STATUS_ERR_MISSING_UV_LAYER
 * STATUS_ERR_NO_FACES_SELECTED

Pull Request: https://projects.blender.org/blender/blender/pulls/109095
2023-06-22 01:02:32 +02:00
Falk David
2264a32f54 Fix: Missing select menu for GPv3
This change was mistakenly not included in bb041b3f.
2023-06-21 17:28:39 +02:00
Falk David
bb041b3f48 Fix #109207: Can't select in gpencil edit mode
This was due to a wrong mapping of tools in the toolbar.

The fix makes sure that the correct selection tools are used for the
old grease pencil objects.
In order to accomplish this properly, the new grease pencil objects
use their own edit mode context.
This way the two objects are cleanly seperated.
2023-06-21 16:49:18 +02:00
Pratik Borhade
57e4eea7b9 Merge branch 'blender-v3.6-release' 2023-06-21 11:47:08 +05:30
Pratik Borhade
3d3569852f Animation: Change channel selection key preferences in IC keymap
Missed in 80feb13665. Include changes in key
preferences of `extend` and `extend_range` in Industry Compatible keymap.

Pull Request: https://projects.blender.org/blender/blender/pulls/108790
2023-06-21 08:14:56 +02:00
casey bianco-davis
fff98eb59f Fix: Grease pencil conversion to new type not in menu
When legacy grease pencil objects were selected the conversion operator was not visible.

Pull Request: https://projects.blender.org/blender/blender/pulls/109094
2023-06-20 11:02:17 +02:00
Jacques Lucke
98d675ac6c Geometry Nodes: make evaluation and logging system aware of zones
This refactors how a geometry nodes node tree is converted to a lazy-function
graph. Previously, all nodes were inserted into a single graph. This was fine
because every node was evaluated at most once per node group evaluation.
However, loops (#108896) break this assumption since now nodes may be
evaluated multiple times and thus a single flat graph does not work anymore.

Now, a separate lazy-function is build for every zone which gives us much
more flexibility for what can happen in a zone. Right now, the change only
applies to simulation zones since that's the only kind of zone we have.
Technically, those zones could be inlined, but turning them into a separate
lazy-function also does not hurt and makes it possible to test this refactor
without implementing loops first. Also, having them as separate functions
might help in the future if we integrate a substep loop directly into the
simulation zone.

The most tricky part here is to just link everything up correctly, especially
with respect to deterministic anonymous attribute lifetimes. Fortunately,
correctness can be checked visually by looking at the generated graphs.

The logging/viewer system also had to be refactored a bit, because now there
can be multiple different `ComputeContext` in a single node tree. Each zone
is in a separate `ComputeContext`. To make it work, the `ViewerPath` system
now explicitly supports zones and drawing code will look up the right logger
for showing inspection data.

No functional changes are expected, except that the spreadsheet now shows
"Simulation Zone" in the context path if the viewer is in a simulation.
2023-06-20 10:08:57 +02:00
Campbell Barton
3a32a44002 Merge branch 'blender-v3.6-release' 2023-06-20 12:15:57 +10:00
Campbell Barton
a474fdece5 Fix every call to Mesh.shade_flat(..) adding a new layer
Also avoid exception handling for checking if the layer exists.
2023-06-20 12:11:38 +10:00
Campbell Barton
1d4ce828e5 PyAPI: require a unique_id for bl_ui.generic_ui_list
An empty unique_id would generate a warning when drawing.
2023-06-20 11:50:30 +10:00
Campbell Barton
75ac92ed85 Fix #109061: UI list generic template fails with error 2023-06-20 11:50:30 +10:00
Hans Goudey
4bd0676cf1 Merge branch 'blender-v3.6-release' 2023-06-19 21:45:36 -04:00
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