Commit Graph

400 Commits

Author SHA1 Message Date
Germano Cavalcante
c0d230e0b8 Revert "Transform: Allow navigation by default"
This reverts commit d53862351d042c4c36c7ebb49feb230725e43a0b.

After conducting tests with artists at the studio, it was observed that
altering the Transform Modal Maps caused significant disruption due to
the heavy reliance on the "Proportional Editing" and "Automatic
Constraint" features.

Considering this, it is now deemed more beneficial to provide users
with the choice of adapting their muscle memory to the new changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/109660
2023-07-04 14:53:39 +02:00
Jeroen Bakker
8f00659fb7 Cleanup: make format 2023-07-04 07:51:11 +02:00
Chris Blackbourn
4f6ce68500 UV: Add "Invert Pins" to the menu in the uv editor
Thanks Robert Rioux for the suggestion.

Pull Request: https://projects.blender.org/blender/blender/pulls/109187
2023-07-04 02:46:23 +02:00
Falk David
3d99d05f00 GPv3: Add separate paint mode
This patch adds a separate paint mode for Grease Pencil 3.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/109453
2023-07-03 16:34:30 +02:00
Jeroen Bakker
590f3582c9 Eevee-next: Lookdev HDRI Switcher
This PR adds support to override the world with the HDRI of the
viewport.

Blurring of the background and camera based rotation isn't supported.
Switching the HDRI would still use the world diffuse light as that is
baked into the irradiance cache.

These issues have been added to #109646

![image](/attachments/2613adff-064a-4f81-8bdd-f687ab8ffcfb)

Pull Request: https://projects.blender.org/blender/blender/pulls/109548
2023-07-03 15:34:11 +02:00
Campbell Barton
ffab21a3ef Cleanup: format 2023-07-02 19:54:26 +10:00
Miguel Pozo
221f985129 EEVEE Next: Ambient Occlusion Node and RenderPass
Port Ambient Occlusion to EEVEE Next.

Add support for the AO Node and the AO RenderPass.
AO shading integration is still missing.

This also fixes the Shadow RenderPass.

Pull Request: https://projects.blender.org/blender/blender/pulls/108398
2023-06-30 19:37:30 +02:00
Hans Goudey
6eea4acc62 Fix #109547: Error creating geometry node group from property editor
Mistake in e4cc91a6113f14418b5d that assumed
the operator was always run from the node editor.
2023-06-30 11:55:18 -04:00
Hans Goudey
267d449a50 Spreadsheet: Support selection filter for point cloud objects
Similar to curves, the ".selection" attribute is used to store selection.
Selection isn't visualized in the viewport yet, but this should be added
at some point anywya. See f89b32382af9e49c46a0.
2023-06-29 12:57:24 -04:00
Germano Cavalcante
0b13c9c5a6 Fix #109490: Face and Extrude menu missing
Caused by a python error introduced by d53862351d

Some operators don't have `release_confirm` attribute.
2023-06-29 11:17:22 -03:00
Hans Goudey
e4cc91a611 Geometry Nodes: Node group operators initial phase
This PR adds a new operator to run a node group on object geometry.
Only curves sculpt mode is supported for now, to simplify the design.

A new geometry node editor context to edit operator groups is also
added. This allows changing any node group, rather than only node
groups that are part of the active modifier context.

3D viewport menus are added with any geometry node group
asset in a catalog that contains the `Operator` tag. Currently Blender
must be restarted to refresh the list of available operators.

This is only the first phase of the node group operator feature.
Many more features will be added in next steps.

See #101778

Pull Request: https://projects.blender.org/blender/blender/pulls/108947
2023-06-29 13:57:54 +02:00
Germano Cavalcante
3c70e12cf3 Partially Revert "Transform: Allow navigation by default"
This partially reverts commit d53862351d042c4c36c7ebb49feb230725e43a0b.

Some changes there were not intended.
2023-06-28 16:15:37 -03:00
Hans Goudey
f89b32382a Point Cloud: Add initial edit mode support
Similar to 5f16e24cc9ac4f620df2, this adds support for edit mode
to the point cloud object type, which is currently hidden behind an
experimental option. No interaction is possible yet, for now this
can be used as a testing for a node-group-operator-only mode.
2023-06-28 12:52:55 -04:00
Hans Goudey
a5b5623933 Fix: Spreadsheet filter toggle active when not functional
For unsupported object types, the toggle should be grayed out.
2023-06-28 12:52:55 -04:00
Campbell Barton
ea38268cdc Fix exception in the asset preferences panel when the list is empty 2023-06-28 20:18:23 +10:00
Germano Cavalcante
d53862351d Transform: Allow navigation by default
As suggested in #108669, the "Navigate during Transform" option has
been removed and this feature works by default.

Now if you press `G`, `R` or `S` to move, rotate or scale an object you
can also navigate in the viewport.

Note that this update modifies the default keymap.
Now pressing `Alt` is required for the following modals:
- `PROPORTIONAL_SIZE_UP`,
- `PROPORTIONAL_SIZE_DOWN`,
- `PROPORTIONAL_SIZE`,
- `AUTOIK_CHAIN_LEN_UP`,
- `AUTOIK_CHAIN_LEN_DOWN`,
- `AUTOCONSTRAIN`,
- `AUTOCONSTRAINPLANE`.

Pull Request: https://projects.blender.org/blender/blender/pulls/109388
2023-06-27 20:29:05 +02:00
Falk David
b61316c7ad GPv3: Add operator to add new layer group 2023-06-26 18:23:08 +02:00
Damien Picard
44d012ce1d I18n: disambiguate a few messages
- "Front"/"Back": 'put something at the front/back' or 'the front/back
  face of something'. (e. g. the Empty Image options, Depth and Side
  option, both use the same strings as enum, which should be avoided
  in some languages).
- "Flip": invert, as in normals, or mirror, as in an image.
- "Path": a path to a resource, in general a file but sometimes a
  datablock, as opposed to a trajectory in space.
- "Join": disambiguate for the Grease Pencil operator, which may use a
  different word as that for meshes.
- "Wave": an ondulating motion, as opposed to a fluid dynamics motion.
- "Step": can mean the distance between two things, or a number of
  times to do something. In this case it is better to use the plural.
- "Edge": generally the edges of a mesh, but can also mean edge
  detection. Additionally, it was used for the option to enable
  Freestyle. This was changed to "Use Freestyle".
- "Boundary": the limit of a grease pencil drawing for filling
  purposes, as opposed to the external limit of a (non-manifold) mesh.
- "Rotations": can be translated to something like "Turns", in the
  context of a spiral.

Pull Request: https://projects.blender.org/blender/blender/pulls/108213
2023-06-26 15:07:06 +02:00
Iliya Katueshenock
0f36f44db8 Fix #109295: Adding simulation item inconsistent with group interface
Use not only index of active slot, but also name and socket type.

Pull Request: https://projects.blender.org/blender/blender/pulls/109303
2023-06-26 14:07:26 +02:00
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
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
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
Hans Goudey
4bd0676cf1 Merge branch 'blender-v3.6-release' 2023-06-19 21:45:36 -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 01f0f8b86c733f02f010f6223c0802d890e2b458, reversing
changes made to 26b5de6865e0670f47ecd53459581235a24bb4ca.
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:
e1f6587f12f127b9a59fa35d6e5977fda2449a2b
b4100ed377de04cebbe2dd87356e66cc88b72c00
6749593aecb7db2219cfac5aac3f92c678733da0
a97cae3efcf304f91283d497e5e9c300d4bc0854
559898709f21f812c504621fa79ec19937e27ab4
e4eb9e04e016c63da10ebeb64fcdb640cfa5b752
bb1c503beee2b4b331ecbc34bc9b4888ee4bb5d6
b21695a507cd2d50d9855fc64ee92632d4e97c2b
7bf56e5c75f405248650f787d3ea9cbc13e69063
4dc026ec8e91c21d9b53c7d2f8bc0f3c56cc586f
354ef89d2045b70048d1d92a5591d653dec69d8e

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
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 2a56403cb0dbcbc1dfb19a9bf7e6434517cbdca9.

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
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
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 5ca65001ea9e (which was already patched with ae7c71ef0902 and
fa5cc84a0a52)

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
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
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
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
3aaacd6e3096ba67b9c2bff4703a71e85b76c83f 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:
33b1cbf06d2c822c68676390b1775eb5d78de6e6
46b0e90cf68cbc983afdabc4ea8572fc5a6938a2
db4a205fa0343f03eae4020f1beb3dcea4469337
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
RedMser
240a1edfa1 UI: add text editor zoom in/out to view menu
Ref !108430.
2023-06-02 15:24:00 +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
YimingWu
95f1d8289c GPv3: "Add Suzanne" option in Add operator
This patch moves the "Add Suzanne" option to the new data structure.

Pull Request: https://projects.blender.org/blender/blender/pulls/108503
2023-06-01 16:39:47 +02:00
Campbell Barton
d3e5c1bfa6 Merge branch 'blender-v3.6-release' 2023-06-01 18:15:36 +10:00
RedMser
6bea428b7f UI: Incorrect add-ons button label in preferences
"Remove addon" button was in the row labeled "Internet", which is
misleading when no documentation buttons appears in the same row.

Now a separate row is created instead.

Ref !108429.
2023-06-01 18:14:34 +10:00
Falk David
b14cdb440a GPv3: Add operator to create new grease pencil object
This adds the operator `OBJECT_OT_grease_pencil_add` to create a new grease pencil object.

Currently it supports the `EMPTY` and `STROKE` type.
This also replaces the add menu for the legacy grease pencil type in the Shift+A menu when the experimental option is enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/108462
2023-05-31 18:00:26 +02:00
Soeren Schmidt-Clausen
fdc3ed798d Geometry Nodes: Add Corners of Edge node
Adds the "Corners of Edge" topology node to geometry nodes.
Combining this node with the "Face of Corner" node allows getting
informations about the faces connected to an edge. The behavior is
slightly non-obvious-- the node only gives the corner neighbors
that come *before* the current edge in directly neighboring faces.
This allows the operation to be easily reversed and reduces
redundancy between nodes.

See the devtalk thread: https://devtalk.blender.org/t/29379

Pull Request: https://projects.blender.org/blender/blender/pulls/107968
2023-05-31 15:25:48 +02:00
Philipp Oeser
243f20ec10 Revert "Particles: remove Halo, Line and Path render options"
broke tests, will check again tomorrow

This reverts commit fbd2bd81548d2a330858ab504b1bd763238e356b.
2023-05-30 22:20:17 +02:00
Aras Pranckevicius
23afc6161c IO: remove OBJ and PLY Python add-ons (#104503, #104504)
With C++ based built-in implementations having both more features
and way better performance, it's time to retire the add-ons. Implements
#104503 and #104504.

Pull Request: https://projects.blender.org/blender/blender/pulls/108440
2023-05-30 21:41:26 +02:00
Philipp Oeser
fbd2bd8154 Particles: remove Halo, Line and Path render options
For emitter particle systems, these were never rendered anyways, Path is
kept for hair systems of course.

As a consequence, the new default for particle systems is:
- render as None (users have to explicitly set this to object/
collection)
- display as point

When changing to Hair type, this automatically gets set back to
- render as Path
- display as Render

Changing back to emitter, will use points as display again (and render
as None -- same here, users have to explicitly set this to object/
collection)

Not sure if this is still for 3.6, patch is for 4.0 for now.

"Fixes" #80197

Pull Request: https://projects.blender.org/blender/blender/pulls/108231
2023-05-30 20:45:32 +02:00
Falk David
d21f4efc8e Cleanup: formatting 2023-05-30 11:18:35 +02:00
Falk David
3aaacd6e30 GPencil 3.0: Initial commit
Adds the initial stage for the grease pencil 3.0 project.

This patch includes:
* New ID and new object type.
* New DNA structures.
* New drawing engine for grease pencil (gpencil-next).
* Tests for the new grease pencil data-type.
* A few operators for conversion, switching modes and (simple) drawing.

Exposed to the user:
* An experimental option to switch to the new grease pencil.
   * This will switch the grease pencil render engine to gpencil-next which can only render the new object type.
     Current grease pencil objects will no longer render.
   * Changing this option currently requires a restart of blender (for the keymap to update).
* A conversion setting in the `Object` > `Convert To` operator.
* A drawing operator in `Draw Mode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/106848
2023-05-30 11:14:16 +02:00
Christoph Lendenfeld
dfb3e0d262 Merge branch 'blender-v3.6-release' 2023-05-26 09:16:50 +02:00
Christoph Lendenfeld
e2a75814ac Animation: change Slider Popup menu hotkeys
Since the change in #106113 the Slider menu which was called with the D hotkey was no longer in any menu.
This made it really hard to discover.

Since there is now more than 1 menu popup, it needs more than 1 hotkey.
The idea is that the ALT key is used in combination with keys that are easy to reach with the left hand.
Right now it is ALT+S and ALT+D but if needed in the future it can be extended to f, w and e

Pull Request: https://projects.blender.org/blender/blender/pulls/107866
2023-05-26 09:03:08 +02:00
Brecht Van Lommel
1d7832a6a4 Fix Make Links showing light link operators for engines other than Cycles 2023-05-25 13:49:38 +02:00
Hans Goudey
2d3bb2787c Fix: Spreadsheet selection filter UI inactive in curves edit mode
Curves edit mode does select the selection filter feature.
2023-05-24 20:05:42 -04:00
Harley Acheson
9cf77efaa0 UI: Updated Windows File Registration
Windows file associations using ProgID, needed because of the launcher.
This fixes "pin to taskbar" and Recent Documents lists, allow per-
version jump lists and an "Open with" list with multiple versions.

Pull Request: https://projects.blender.org/blender/blender/pulls/107013
2023-05-24 21:19:56 +02:00
Hans Goudey
9acff4edab Merge branch 'blender-v3.6-release' 2023-05-24 11:26:03 -04:00
Damien Picard
9f0807acd6 UI: Fix and improve a few messages
- Samplerate -> Sample rate: should be two words.
- "Falloff type the feather": typo.
- JPEG, OpenJPEG and JPEG 2000 are the official spellings of the
  respective projects.
- "... boundary of image(including ...": missing space.
- "Points in . direction (cannot be changed ...)":
  Plural, it is a collection of multiple points. Also do not use
  contraction for "cannot".
- The Bevel modifier's "Only Vertices" option was replaced by a
  Vertices mode in 2.90.
- "Metaball Types": affects one object, should be singular.
- "Metaball data-block to defined blobby surfaces": typo.
- "Wire Size": this option has nothing to do with wireframes, I suppose
  it's an old terminology.
- "... (for negative speed.)": remove trailing period.
- "Smooth factor effect": the prop describes a factor for an effect,
  not an effect for a factor.
- "... assigned to their vertices(ensures ...": missing space.
- "... used when faces have the ObColor mode enabled": ObColor is not
  used anywhere else in the UI (since Blender 2.50).
- "Effect Children": typo -> Affect.
- "Distort Min/Max": copy-pasted from another pair of properties.
- "... dismiss menu on release.(in 1/100ths of sec)": replace period
  with space.
- "resolution": field names should be capitalized.

Pull Request: https://projects.blender.org/blender/blender/pulls/108227
2023-05-24 16:33:33 +02:00
Sergey Sharybin
ba3f26fac5 Cycles: light and shadow linking
With light linking, lights can be set to affect only specific objects in the
scene. Shadow linking additionally gives control over which objects acts a
shadow blockers for a light.

Usage:
https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Cycles

Implementation:
https://wiki.blender.org/wiki/Source/Render/Cycles/LightLinking

Ref #104972
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2023-05-24 14:11:47 +02:00
Philipp Oeser
a4217d8a71 Merge branch 'blender-v3.6-release' 2023-05-24 09:26:42 +02:00
Philipp Oeser
9511384442 Fix: editor naming in recent spreadsheet animation update commit
Followup to adb36b89c7f487bd0dc3c07a270078fb5e20cdb6.

"Spreadsheet Editors" > "Spreadsheet" (as this is what the spreadsheet
is called e.g. in the Editor type dropdown).

Pull Request: https://projects.blender.org/blender/blender/pulls/108186
2023-05-24 09:25:10 +02:00
Miguel Pozo
9ae2dd577a Overlay-Next: Initial implementation
This contains the basis of the new overlay engine.
Only a few overlays are ported for proof of concept of the new design.

This new design unifies the selection drawing with the overlay-next engine.
It now becomes responsible of selection in object mode.
For this we create a dedicated shader module that patches the shaders
for selection.

Note that the gizmo selection still uses the occlusion queries and edit-mode
the current selection engine (select_engine.c).

Related task #102179
Related task #102177

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/107734
2023-05-23 15:00:38 +02:00
Campbell Barton
ac263a9bce PyAPI: remove context override argument from bpy.ops
Remove deprecated context override argument to operator execution and
poll() method in favor of context.temp_override().
2023-05-23 14:34:09 +10:00
Campbell Barton
6ac6e63eaf Merge branch 'blender-v3.6-release' 2023-05-23 10:52:24 +10:00
Campbell Barton
93ca0444f3 Fix #108129: exception editing custom properties
Regression in [0], caused by the sub-type enum not containing NONE.

[0]: 6e2721da303455b57e3a313fd7905fc37d6f3708
2023-05-23 10:50:36 +10:00
Philipp Oeser
7b818e7bcb Merge branch 'blender-v3.6-release' 2023-05-22 15:25:35 +02:00
Philipp Oeser
adb36b89c7 Fix #107988: Spreadsheet not updating when playing animation
Similar to other screen options, add one for Spreadsheet editors that
makes them update when playing animation.

NOTE: there are some editors that always update when playback was
invoked from an animation editor while others only do this when their
respective option is specifically set (think the later behavior fits the
spreadsheet better).

Pull Request: #108002
2023-05-22 15:15:22 +02:00
Germano Cavalcante
33c13ae6e3 Transform: support navigation while transforming in 3D view
Implements a new option in keymap settings:
- "Navigate during Transform"

Note that with the option enabled, the keymap changes as follows:

|Modal Map (Blender):| Conflict: | Current: | New:
|---|---|---|---
| Increase Proportional Influence | VIEW3D_OT_zoom | Wheel Down | Alt Wheel Down
| Decrease Proportional Influence | VIEW3D_OT_zoom | Wheel Up | Alt Wheel Up
| Adjust Proportional Influence | VIEW3D_OT_rotate | Mouse/Trackpad Pan | Alt Mouse/Trackpad Pan
| Increase Max AutoIK Chain Length | VIEW3D_OT_zoom | Wheel Down | Alt Wheel Down
| Decrease Max AutoIK Chain Length | VIEW3D_OT_zoom | Wheel Up | Alt Wheel Up
| Automatic Constraint | VIEW3D_OT_rotate | Middle Mouse | Alt Middle Mouse
| Automatic Constraint Plane | VIEW3D_OT_move | Shift Middle Mouse | Shift Alt Middle Mouse

Design Task: #106008
Pull Request: https://projects.blender.org/blender/blender/pulls/105764
2023-05-19 23:45:27 +02:00
Germano Cavalcante
560e9c654b UI: Edit Mode Options panel cleanup
AutoMerge is a property of transform operations, so it seems more
convenient to have this option bundled with transform settings.

Another thing is that the 'Live Unwrap' option has no real relation to
Transform.

Therefore, remove the 'AutoMerge' sub-panel and create two sub-panels
for the Options Panel:
- Transform
- UVs

Merge the 'AutoMerge' settings into the 'Transform' sub-panel.

Move 'Live Unwrap' to the 'UVs' sub-panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/108056
2023-05-19 17:32:46 +02:00
Hans Goudey
2a56403cb0 Mesh: Move bevel weight to generic attribute
Store bevel weights in two new named float attributes:
- `bevel_weight_vert`
- `bevel_weight_edge`

These attributes are naming conventions. Blender doesn't enforce
their data type or domain at all, but some editing features and
modifiers use the hard-coded name. Eventually those tools should
become more generic, but this is a simple change to allow more
flexibility in the meantime.

The largest user-visible changes are that the attributes populate the
attribute list, and are propagated by geometry nodes. The method of
removing this data is now the attribute list as well.

This is a breaking change. Forward compatibility is not preserved, and
the vertex and edge `bevel_weight` properties are removed. Python API
users are expected to use the attribute API to get and set the values.

Fixes #106949

Pull Request: https://projects.blender.org/blender/blender/pulls/108023
2023-05-19 14:31:31 +02:00
Richard Antalik
40ccc37fc6 VSE: Add go to current frame operator to view menu 2023-05-19 00:46:53 +02:00
Lukas Stockner
8cde7d8f8a Cycles: Merge Anisotropic BSDF node into Glossy BSDF node
Used to be https://archive.blender.org/developer/D17123.

Internally these are already using the same code path anyways, there's no point in maintaining two distinct nodes.

The obvious approach would be to add Anisotropy controls to the Glossy BSDF node and remove the Anisotropic BSDF node. However, that would break forward compability, since older Blender versions don't know how to handle the Anisotropy input on the Glossy BSDF node.

Therefore, this commit technically removes the Glossy BSDF node, uses versioning to replace them with an Anisotropic BSDF node, and renames that node to "Glossy BSDF".

That way, when you open a new file in an older version, all the nodes show up as Anisotropic BSDF nodes and render correctly.

This is a bit ugly internally since we need to preserve the old `idname` which now no longer matches the UI name, but that's not too bad.

Also removes the "Sharp" distribution option and replaces it with GGX, sets Roughness to zero and disconnects any input to the Roughness socket.

Pull Request: https://projects.blender.org/blender/blender/pulls/104445
2023-05-18 23:12:20 +02:00
Bastien Montagne
086dada878 Fix/Update the 'search previous startup data' versioning logic.
`PREFERENCES_OT_copy_prev` handling of versionning was for older release
cycles type (pre-3.0), now that we are in 4.0, we can use a simpler
logic: Just look for startup data from this major release cycle (i.e.
4.x currently) and the previous one (i.e. all 3.x releases).

Fixes the 're-use previous settings' option not showing when first
starting 4.0 build.
2023-05-17 16:38:56 +02:00
Clément Foucault
2d66a0ef84 EEVEE: Add Transparent Render-Pass option
This renderpass pass outputs alpha blender surface
to allow combining them with the opaque passes.

Limitation: This only supports monochromatic opacity.
Colored opacity will show differently than in combined pass.

Pull Request: https://projects.blender.org/blender/blender/pulls/107890
2023-05-17 11:57:36 +02:00
Erik Abrahamsson
3195c1a669 Geometry Nodes: Add Sample Volume node
This commit adds a new experimental node "Sample Volume".
It's purpose is to be able to sample values from a volume grid given
a position field.
The 'Grid' input accepts a named attribute input with the name
of the volume grid to sample. Values will be implicitly converted
from the grid type to the specified value type.

Pull Request: #107656
2023-05-16 19:08:08 +02:00
Germano Cavalcante
932baa18b7 Fix #106558: Add Primitive tool options not saving
Since a generic snap cursor was implemented (which can be used by Tools and by DragDrop), the Placement Settings are no longer a settings of the "VIEW3D_OT_interactive_add" Operator.

With that implementation, those properties started to be defined in a
static struct, filled in at runtime and accessed in the UI through
workarrounds.

As they are properties initialized at runtime, they are not saved in
the file.

The solution is to move the Placement Settings to `ToolSettings`.

Co-authored-by: Germano Cavalcante <germano.costa@ig.com.br>
Pull Request: https://projects.blender.org/blender/blender/pulls/107951
2023-05-16 15:00:45 +02:00
Damien Picard
3f1ea280cf I18n: translate node group socket type and subtype
Node group sockets have user-exposed data types, and sometimes
subtypes for some data types (e.g. Percentage or Angle for floats).
The UI to select these types and subtypes use an operator menu with a
text depending on the current type or subtype.

This button needs to be manually translated since its label is
manually defined.

Additionally, some subtypes need to be extracted from the Property
class's RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ITEMS, so this commit also
removes Property from the extraction blacklist in
bl_extract_messages.py. This has the side effect that it introduces a
few dozens translations, which are probably not used anywhere.

Pull Request: https://projects.blender.org/blender/blender/pulls/107100
2023-05-16 14:53:28 +02:00
Damien Picard
dc999d83b4 I18n: disambiguate a few messages
- "Out" meaning "one end of a bone". Same as in 9120c86c3f.
- "Canvas" meaning a painting support for Dynamic Paint.
- "Twist" meaning an action verb, as opposed to an amount.
- "Solid" meaning a textureless, single-color material.
- "Blend mode" meaning material opacity blending, as opposed to color
  blending.
- "Pixel Size" meaning "a size measured using pixels as the unit".
- "Light" meaning "not dark", as in "Light Theme".

Ref #43295
2023-05-16 14:51:52 +02:00
Damien Picard
072002a672 I18n: translate Quick Fur data
The Quick Fur operator creates a curves object with hair modifiers and
a material.
These modifiers' and material's names can be translated if the user
chose to translate data in the preferences.

Only the modifier names are translated, the node groups are not
because they may be reused instead of appended again.

Pull Request: https://projects.blender.org/blender/blender/pulls/107909
2023-05-16 10:46:10 +02:00
Damien Picard
56df93bfc6 I18n: Asset browser: do not translate non-editable tags
Asset tags are data and should not be translated, even if they are
built-in data such as hair nodes.

Issue reported by @SatoshiYamasaki in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/107907
2023-05-16 10:45:15 +02:00
Damien Picard
1d6464cf97 Fix error when adding a simulation zone while using i18n
When adding a new simulation zone, the input and output would be
accessed by their name, however the name can be translated if the user
has enabled translation of data.

Instead, get the first socket of type 'GEOMETRY' in the simulation
input and output nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/107819
2023-05-15 15:38:35 +02:00
Campbell Barton
a85ad2d0eb Cleanup: remove f-string use, single quote enums 2023-05-15 20:58:00 +10:00
51c2a0f816 Fix #104606: iTaSC solver moves root bone to origin and imobilizes it
Add a new flag that determines whether root bones (i.e. bones without a
parent) should be translated to the armature object's origin. This can
be found in the Armature's IK properties panel.

By default this flag is disabled, so new rigs will not see this 'locking
to the origin' behaviour. Versioning code ensures that the flag is
enabled on older files, to preserve the behaviour of existing rigs.

This also bumps the Blender subversion and at the same time fixes an
incorrect bump in ee08b2ddffbe34a9ffe6396e394640ab70b41338 (where the
'minimum compatible version' was updated instead of the current Blender
version).

Pull request: https://projects.blender.org/blender/blender/pulls/107869
2023-05-15 10:46:26 +02:00
Damien Picard
d17f9f4872 UI: Capitalize "Python" in UI messages, improve a few others
- "... (matches pythons ...)": capitalize and use possessive ('s).
- "Layer Proxy Protection": replace proxy by override, following 2.80.
- "Enable Plane Trim": expand description.
- "Make curve path children to rotate along the path": remove "to".
- "Option for curve-deform: make deformed child to stretch along
  entire path": remove "to".
- "... apply the curve radius with path following it and deforming":
  rephrase unclear description.
- "Custom light falloff curve" : unrelated to lights, used in Grease
  Pencil modifiers.
- "Grease Pencil layer assigned to the generated strokes": rephrase
  because a GP stroke is assigned to a layer, not the other way
  around.
- "Attribute domain where the attribute domain is stored in the
  simulation state": remove second "domain" (typo).

Pull Request: https://projects.blender.org/blender/blender/pulls/107916
2023-05-14 15:23:43 +02:00
Hans Goudey
ee08b2ddff Geometry Nodes: Add display toggle for simulation cache in timeline
Similar to the existing options for toggling physics cache display.
2023-05-12 13:48:52 -04:00
Dalai Felinto
676c6d8e9a utm_source: use blender version as part of the URL
This makes the URL links to blender.org to have more information than
just utm_source=blender

For example:
* utm_source=blender-3.6.0-alpha
* utm_source=blender-3.3.16-release

Pull Request #107849
2023-05-12 15:29:46 +02:00
Dalai Felinto
a15c637e63 Introduce utm_source=blender to urls pointing to blender.org
This fuctionality allow the Blender project to know if users
are reaching our websites from within Blender:

 * User Manual
 * Python API
 * Release Notes
 * Development Fund

Pull Request #107849
2023-05-12 15:29:46 +02:00
Dalai Felinto
cbd838d077 Cleanup: Unify operators to use wm.url_open 2023-05-12 15:29:46 +02:00
Chris Blackbourn
edc12436c6 UV: During packing, add progress bar and ability to cancel
Uses job system.

Co-authored-by: Campbell Barton <campbell@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107859
2023-05-12 14:50:40 +12:00
Erik Abrahamsson
36983fb5e4 Geometry Nodes: Add 'Signed Distance' input node
Adds an input node Signed Distance that can
be used to refer to the distance-grid of an SDF volume.
Right now it's experimental and can be enabled by enabling
"New Volume Nodes" in the preferences.

It returns a float AttributeFieldInput called 'distance' which
can tell Volume nodes which grid to get.

See #103248.
2023-05-11 18:25:34 +02:00
Hans Goudey
8efd6d5f82 Geometry Nodes: Make simulation caching optional
For realtime use cases, storing the geometry's state in memory at every
frame can be prohibitively expensive. This commit adds an option to
disable the caching, stored per object and accessible in the baking
panel. The default is still to enable caching.

Pull Request: https://projects.blender.org/blender/blender/pulls/107767
2023-05-10 16:01:38 +02:00
Lukas Tönne
3e888d77ba Geometry Nodes: Simulation calculate to frame operator
Adds a new operator that resets caches and then iterates from the start
frame to the current frame in order to update caches.

Pull Request: https://projects.blender.org/blender/blender/pulls/107627
2023-05-08 13:41:21 +02:00
Damien Picard
31d71f39ad UI: fix or improve many messages
- The official spelling of FFMPEG is FFmpeg (upper, then lower case).
- The normal vector copy and paste operators shoud be singular because
  they can only be used on a single element.
- The "Parent File" file browser operator goes up one level in the
  file hierarchy. It should be called "Parent Directory", like the
  current description "Go to the parent directory".
- "Mass Vertex Group" used to define the mass, but was reused at some
  point and now actually defines cloth pinning so it should be called
  "Pin Vertex Group", as in the UI.
- The Transformation constraint's Map To Type suffered from a
  typo (probably of -> on).
- "Fall-off" is more commonly spelled "Falloff".
- "Effected" should really be "Affected" in this case.
- Rephrase the descriptions for the curve painting tools drawing
  plane, which did not seem to match what the settings do. Namely,
  they allow selecting in which plane to draw curves using the Curve
  Draw tool.

Reported by @Joan-Pujolar in #43295:
- Force exporting animation on every objects [objects singular]
- Color of the interface widgets text insertion cursor (caret) [delete
  interface widgets]
- Index of active aov [AOV in uppercase everywhere else]
- Does this tool use an painting canvas [an]
- This script was written Blender version %d.%d.%d ["for" missing
  before "Blender"]
- [fcurve -> F-curve]
- unknown error stating file [statting]
- Offset into each stroke before the beginning of  the dashed segment
  generation [Two spaces between of and the]
- Find the nearest element in the a group. [either "the" or "a"]

Pull Request: https://projects.blender.org/blender/blender/pulls/107699
2023-05-07 15:27:28 +02:00
Joseph Eagar
f15889a9f9 Sculpt: Split face set visibility invert into its own operator
Visibility invert should not use OPTYPE_DEPENDS_ON_CURSOR.
2023-05-04 17:49:40 -07:00
Germano Cavalcante
6b5b777ca3 UI: add Proportional Size to Proportional Edit popover
Rather than forcing the user to initiate a transform operation to edit the `Proportional Size`, allow editing of the `Proportional Size` through the UI.

The affected headers are:
- View 3D
- Dop Sheet
- Image Editor
- Graph Editor
- Mask Editor

Pull Request: https://projects.blender.org/blender/blender/pulls/107507
2023-05-04 16:39:22 +02:00
Christoph Lendenfeld
5e1470d1b3 Animation: Clean up "Key" menu in Graph Editor
* remove "Keyframe" label from the Key menu
* "Jump To Keyframe" -> "Jump to Selected"
* added a new menu "Density" with Decimate, Sample and Clean operators
* removed the "Clean Channels" entry. It does the same as the "Clean" operator but also removes channels IF the remaining keys are at the default value. The feature is still available in the redo panel
* Split the slider operators out by functionality
* Move Euler filter to Channel menu
* Remove "Add F-Curve modifier" from Key menu (it already is in the Channel menu)
* Move Bake/Unbake Curve functions to Channel menu
* Move "Bake Sound to FCurves" to Channel menu

Pull Request: https://projects.blender.org/blender/blender/pulls/106113
2023-05-04 14:10:27 +02:00
Jacques Lucke
0de54b84c6 Geometry Nodes: add simulation support
This adds support for building simulations with geometry nodes. A new
`Simulation Input` and `Simulation Output` node allow maintaining a
simulation state across multiple frames. Together these two nodes form
a `simulation zone` which contains all the nodes that update the simulation
state from one frame to the next.

A new simulation zone can be added via the menu
(`Simulation > Simulation Zone`) or with the node add search.

The simulation state contains a geometry by default. However, it is possible
to add multiple geometry sockets as well as other socket types. Currently,
field inputs are evaluated and stored for the preceding geometry socket in
the order that the sockets are shown. Simulation state items can be added
by linking one of the empty sockets to something else. In the sidebar, there
is a new panel that allows adding, removing and reordering these sockets.

The simulation nodes behave as follows:
* On the first frame, the inputs of the `Simulation Input` node are evaluated
  to initialize the simulation state. In later frames these sockets are not
  evaluated anymore. The `Delta Time` at the first frame is zero, but the
  simulation zone is still evaluated.
* On every next frame, the `Simulation Input` node outputs the simulation
  state of the previous frame. Nodes in the simulation zone can edit that
  data in arbitrary ways, also taking into account the `Delta Time`. The new
  simulation state has to be passed to the `Simulation Output` node where it
  is cached and forwarded.
* On a frame that is already cached or baked, the nodes in the simulation
  zone are not evaluated, because the `Simulation Output` node can return
  the previously cached data directly.

It is not allowed to connect sockets from inside the simulation zone to the
outside without going through the `Simulation Output` node. This is a necessary
restriction to make caching and sub-frame interpolation work. Links can go into
the simulation zone without problems though.

Anonymous attributes are not propagated by the simulation nodes unless they
are explicitly stored in the simulation state. This is unfortunate, but
currently there is no practical and reliable alternative. The core problem
is detecting which anonymous attributes will be required for the simulation
and afterwards. While we can detect this for the current evaluation, we can't
look into the future in time to see what data will be necessary. We intend to
make it easier to explicitly pass data through a simulation in the future,
even if the simulation is in a nested node group.

There is a new `Simulation Nodes` panel in the physics tab in the properties
editor. It allows baking all simulation zones on the selected objects. The
baking options are intentially kept at a minimum for this MVP. More features
for simulation baking as well as baking in general can be expected to be added
separately.

All baked data is stored on disk in a folder next to the .blend file. #106937
describes how baking is implemented in more detail. Volumes can not be baked
yet and materials are lost during baking for now. Packing the baked data into
the .blend file is not yet supported.

The timeline indicates which frames are currently cached, baked or cached but
invalidated by user-changes.

Simulation input and output nodes are internally linked together by their
`bNode.identifier` which stays the same even if the node name changes. They
are generally added and removed together. However, there are still cases where
"dangling" simulation nodes can be created currently. Those generally don't
cause harm, but would be nice to avoid this in more cases in the future.

Co-authored-by: Hans Goudey <h.goudey@me.com>
Co-authored-by: Lukas Tönne <lukas@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/104924
2023-05-03 13:18:59 +02:00
Campbell Barton
fa5cc84a0a WM: avoid Python exceptions in poll functions 2023-04-30 15:08:26 +10:00
Campbell Barton
1c026befca Cleanup: spelling in comments, remove annotations that aren't validated 2023-04-30 15:08:26 +10:00
Campbell Barton
2bb4abdc27 Cleanup: assign variables & use 'match' to avoid redundant lookups
Also use more verbose names for RNA subtype enum variables.
2023-04-28 16:56:34 +10:00
Colin Basnett
6e2721da30 Core: Add sub-types for float-type custom properties
This adds the ability for users to assign sub-types to `Float` type custom properties (e.g., distance, angle, time, power etc.)

Pull Request: https://projects.blender.org/blender/blender/pulls/106700
2023-04-28 05:44:50 +02:00
Dalai Felinto
5d0595fded Suport relative path option per-asset library
This option is true by default, but it can be changed for
any asset library (that may be using Link as import method).

This also fix "Reset to Default Value" for the Import Method
since this was originally not using the defaults.

Pull Request: https://projects.blender.org/blender/blender/pulls/107345
2023-04-25 20:56:57 +02:00
Philipp Oeser
2f0b166dce Fix #107294 : Node Editor "Frame All/Selected" ignore Smooth View
Caused by 3a1cf838ca09.

Smooth view transitions only work when an operator is **invoked** (wont
work from **exec**, see `WM_operator_smooth_viewtx_get`).

Now 3a1cf838ca09 changed the `operator_context` for some other operators
in the menu to 'EXEC_REGION_WIN' (for good reason). But setting
`operator_context` on a `uiLayout` will set context on the **root**
layout (not the actual sublayout alone), so all following operators
"inherited" the [changed] context.

Now make sure following operators get properly invoked again by giving
the right context.

Pull Request: https://projects.blender.org/blender/blender/pulls/107296
2023-04-25 10:29:55 +02:00
Damien Picard
ae7c71ef09 Fix Python error when trying to call the Search Menu with no object
When pressing F3 to bring up the Search Menu, an error appeared
because the MoveModifierToNodes operator's poll method did not
consider the context where no object was selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/107310
2023-04-24 20:47:20 +02:00
illua1
15f9e42c4f Geometry Nodes: new Index of Nearest node
The node outputs the index of the closest element to itself. See #102387
for the original design.

This is different from the Sample Nearest node in two important ways:
* It does not have a geometry input, instead the geometry is taken from the
  field evaluation context.
* The node can exclude the "current" element from the search.
* The group id input can be used to build subsets of elements that only
  consider each other as neighbors and ignore elements with other ids.

Pull Request: https://projects.blender.org/blender/blender/pulls/104619
2023-04-22 13:11:51 +02:00
Harley Acheson
68f8253c71 VFONT: Text Selection Operator
An operator to allow interactive text selection for 3D Text Objects.
This is from the code of Yash Dabhade (yashdabhade) for GSoC 2022
with corrections and simplifications. Also includes double-click for
word selection.

Pull Request: https://projects.blender.org/blender/blender/pulls/106915
2023-04-21 19:08:44 +02:00
Campbell Barton
0fa68d1a01 Cleanup: format 2023-04-20 18:28:50 +10:00
Sietse Brouwer
397a14deff GPencil: Several Weight Paint additions
This patch adds several tools and options to the weight paint mode of Grease Pencil.

* Blur tool: smooths out vertex weights, by calculating a gaussian blur of adjacent vertices.
* Average tool: painting the average weight from all weights under the brush.
* Smear tool: smudges weights by grabbing the weights under the brush and 'dragging' them.

* With the + and - icons in the toolbar, the user can easily switch between adding and subtracting weight while drawing weights.
* With shortcut `D` you can toggle between these two.

* The auto-normalize options ensures that all bone-deforming vertex groups add up to 1.0 while weight painting.
* With `Ctrl-F` a radial control for weight is invoked (in addition to the radial controls for brush size and strength).
* With `Ctrl-RMB` the user can sample the weight. This sets the brush Weight from the weight under the cursor.

* When painting weights in vertex groups for bones, the user can quickly switch to another vertex group by clicking on a bone with `Ctrl-LMB`.
For this to work, follow these steps:
* Select the armature and switch to Pose Mode.
* Select your Grease Pencil object and switch immediately to Weight Paint Mode.
* Select a bone in the armature with `Ctrl-LMB`. The corresponding vertex group is automatically activated.

Pull Request: https://projects.blender.org/blender/blender/pulls/106663
2023-04-20 07:55:24 +02:00
Campbell Barton
92f79e002e Cleanup: format 2023-04-20 13:35:35 +10:00
Harley Acheson
199c7da06d Assets: Do Not Show Blank Read-Only Metadata
Do not show asset metadata "description", "license", "copyright", or
"author" if they are empty AND read-only, since they can't be edited
and contain no useful information to show.

Pull Request: https://projects.blender.org/blender/blender/pulls/105812
2023-04-19 19:55:26 +02:00
Damien Picard
6d2351d26b Text object: operators to move cursor to the top or bottom
This adds new movement types TEXT_BEGIN and TEXT_END to allow
FONT_OT_move and FONT_OT_move_select operators move the text
cursor (caret) to the top and bottom of the text.

Pull Request: https://projects.blender.org/blender/blender/pulls/106196
2023-04-19 02:18:19 +02:00
Harley Acheson
f7ba61d3a6 Fix #107009: Setting Text Object Styles
This allows toggling of text styles of selected text and at the current
mouse cursor position if nothing is selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/107048
2023-04-18 21:24:38 +02:00
Harley Acheson
694f792ee1 UI: OS File Operations Within File Browser
Adds a submenu to the File Browser selected item context menu that
allows opening the item or viewing the location in an OS browsing
window. On Win32 also allows other actions like editing, searching,
opening command prompt, etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/104531
2023-04-18 20:39:30 +02:00
Campbell Barton
c4c1cc7cd3 Cleanup: double quotes for non-enum strings
Also use back-ticks for code-references in comments.
2023-04-18 10:51:32 +10:00
Damien Picard
38bf3e1911 I18n: translate default preset name
The "New Preset" message was already translated and used in some
preset panels, but not all.

Pull Request: https://projects.blender.org/blender/blender/pulls/106973
2023-04-17 15:00:07 +02:00
Patrick Foley
c08a9ec19f Sculpt: updated Mask and Face Set menu operators
Changed the menu operators:

    Expand Mask by Topology (hotkey Shift A)
    Expand Mask by Normals (hotkey Shift Alt A)
    Expand Face Set by Topology (hotkey Shift W)
    Expand Active Face Set (hotkey Shift Alt W)

so that their hotkeys would appear in their menu entries.

Resolves #104023

Co-authored-by: DisquietingFridge <30654622+DisquietingFridge@users.noreply.github.com>
Pull Request: #104568

Rebased for main instead of sculpt-dev
2023-04-16 15:04:58 -07:00
Campbell Barton
786734e6c8 Fix #106057: setting the sculpt curve brush in Python clears active tool
The built-in brush identifier didn't match the enum name causing
brush assignment not to update the tool-system (clearing the tool).

Resolve by using generate_from_enum_ex(..) to avoid each brush
definition having to manually duplicate enum definitions.
2023-04-14 20:14:06 +10:00
Campbell Barton
10b7d4f601 WM: support separators when generating tools from enums & icon map
Currently this is disabled for sculpt, we may want to enable this in the
future. Also add an icon map argument for brushes to use generic icons.
2023-04-14 20:14:06 +10:00
Campbell Barton
40683e524c Cleanup: remove unused argument for tool-systems generate_from_enum_ex
Also avoid using a dict as a default argument. While it didn't cause
problems - in general it's bad practice and worth avoiding as any
modifications produce strange behavior.
2023-04-14 20:14:06 +10:00
Harley Acheson
39bcf6bdc9 UI: Allow Clipboard Copy/Paste Images
Adds operators to copy and paste to and from the OS clipboard, but only
implemented for Windows.

Pull Request: https://projects.blender.org/blender/blender/pulls/105833
2023-04-14 03:48:17 +02:00
Pablo Vazquez
cef128e68a Fix menu padding in Console editor header
The View menu was a few pixels to the right compared to all other editors.
2023-04-13 18:06:12 +02:00
Campbell Barton
a7462f58d1 Fix missing import for DJV on APPLE
We might removing support for this if it's not used,
correct the import for now.
2023-04-13 13:14:17 +10:00
Campbell Barton
11ad851fbe Fix lightmap UV calculation ignoring unselected objects in edit-mode 2023-04-13 13:14:15 +10:00
Campbell Barton
ad5ec544c8 Cleanup: remove unused apply-image option from uvcalc_lightmap
Note that this was a quick update from Blender 2.4's API,
while many other improvements could be made - remove this option as
it does nothing.
2023-04-13 13:14:13 +10:00
Campbell Barton
678dc456e3 Cleanup: remove duplicate class
Introduced in ba982119cdcacfa8e603457face1d8ebc763ef75.
2023-04-13 13:14:09 +10:00
Campbell Barton
14905cd1d5 Cleanup: quiet pylint's inconsistent-return-statements warning
No functional changes as the return value either relied on None
evaluating to False or wasn't used.
2023-04-13 13:14:06 +10:00
Campbell Barton
6482f9fffe Cleanup: quiet various pylint warnings 2023-04-13 13:14:05 +10:00
Campbell Barton
84e72e8170 Cleanup: remove duplicate assignments, assign 'layout' early in draw(..)
Also remove unused assignments.
2023-04-13 13:14:03 +10:00
Campbell Barton
ab64bd264a Cleanup: consistent naming for tool_settings & operator properties
Use names:
- `tool_settings` instead of `ts`.

- `props` instead of `op` / `prop` / `op_props`
  As Python may reference operators, don't confuse the operator
  properties with an instance of the operator.

In both cases these names were already used for most scripts.
2023-04-13 13:14:01 +10:00
Campbell Barton
b0edd63752 Cleanup: avoid early imports, remove unused variable 2023-04-13 13:13:59 +10:00
Damien Picard
2b6c1600cf UI: Allow Float Kerning for Text Objects
Change Text Object character `kern` member to float from int, and allow
fractional changes to kerning with Shift-Alt-arrows.

Pull Request: https://projects.blender.org/blender/blender/pulls/105181
2023-04-12 19:11:53 +02:00
Damien Picard
2771f53cb7 UI: Fix disconnected and non-clickable checkbox labels in popovers
For popovers, draw the checkbox in header as usual with label, but
hide the panel header label, see ed870f87b942.

Patch by Yevgeny Makarov (@jenkm) in
https://archive.blender.org/developer/D9586

Co-authored-by: Yevgeny Makarov <jenkm>
Pull Request: https://projects.blender.org/blender/blender/pulls/105657
2023-04-12 17:00:51 +02:00
Damien Picard
5cf365554b I18n: disambiguate a few messages
- "Lens" can be a transparent object used in cameras, or specifically
  its property of focal length
- "Empty" can be an adjective meaning void, or an object type. The
  latter is already disambiguated using `ID_ID`
- "New" and "Old" are adjectives that can have agreements in some
  languages
- "Modified" is an adjective that can have agreement in some languages
- "Clipping" can be a property of a camera, or a behavior of the
  mirror modifier
- "Value" in HSV nodes, see #105113
- "Area" in the Face Area geometry node, can mean a measurement or a
  window type
- "New" is an adjective that can have agreement
- "Tab" can be a UI element or a whitespace character
- "Volume" can mean a measurement or an object type. The latter is
  already disambiguated using `ID_ID`

These changes introduce the new `BLT_I18NCONTEXT_TIME` translation
context.

They also remove `BLT_I18NCONTEXT_VIRTUAL_REALITY`, which I added at
one point but then couldn't find which messages I wanted to fix with
it.

Ref #43295

Pull Request: #106718
2023-04-12 15:09:17 +02:00
Hans Goudey
c31434a570 Cleanup: Remove setting polygon loop total from Python
This property is not editable after 7966cd16d6dc4e66d01f,
though doing so didn't seem to give an error. It doesn't have
to be set anymore, since the data is redundant with the
"loop_start" anyway.
2023-04-12 08:38:32 -04:00
Julian Eisel
da75495ada Fix user add-ons not showing up with "User" filter in Preferences
Mistake in ba25023d22, updated the drawing code with the wrong function
call. So when setting the add-ons category to "User", add-ons installed
in the user paths (custom paths configured in Preferences) wouldn't show
up.
2023-04-12 13:04:54 +02:00
Damien Picard
3f4f975228 I18n: fix footer in the text editor when loading an external file
When loading an external file in the text editor, the footer text
stating "File: <file>" or "File: <file> (unsaved)" was not translated,
because the translation happened after string formatting, and the
message was thus not found in the po files.

Pull Request: https://projects.blender.org/blender/blender/pulls/106716
2023-04-12 12:19:00 +02:00
zanqdo
5df8e35da7 UI: Add slash separators to Hue/Saturation/Value
It was that names of related "combo" operations
like Hue/Saturation/Value, *Dilate/Erode*
and Brightness/Contrast should be separated
by slashes in their names.

This patch changes this for the multiple nodes
and operators concerning Hue/Saturation/Value
across Blender.

Note1: This patch should only touch UI names
which do not need versioning and should not
break scripts.

Note2: This breaks first letter fuzzy search
for "hsv". It was noted by @HooglyBoogly that
the "/" character needs to be added to the
fuzzy search split list. Note however that such
search is already broken in Main for nodes like
Brightness/Contrast and Dilate/Erode which
already use slash separators

Pull Request: https://projects.blender.org/blender/blender/pulls/106721
2023-04-11 23:48:05 +02:00
zanqdo
f8108d6dfd UI: Rename Bright/Contrast to Brightness/Contrast
Rename *Bright/Contrast* to *Brightness/Contrast* in order to avoid the use of shortened names and improve consistency within Blender and with industry conventions.

Reasoning:

The modified color characteristic is called *brightness*, not *bright*. You don't modify the *bright* of an image.

This also interferes with search in case someone searches for brightness, producing no results.

*Note: This patch should only touch UI names which do not need versioning. It leaves the actual property name in nodes for a future breaking release.*

Pull Request: https://projects.blender.org/blender/blender/pulls/104998
2023-04-11 21:32:29 +02:00
Hans Goudey
c7995f3185 Fix #106366: Handle exceptions in add fur operator
Give errors in a few cases:
- The mesh has no UV map
- The faces have no area
- The applied modifier has no curve data (it may have been modified)

Use errors instead of cancelling the operator completely so the
operator can still do something useful when many meshes are
selected and only some fail.

Pull Request: https://projects.blender.org/blender/blender/pulls/106823
2023-04-11 19:19:41 +02:00
Julian Eisel
ba25023d22 Python: Support multiple custom script directories in Preferences
Makes it possible to select multiple custom script directories in Preferences >
File Paths, replacing the single Scripts path option. Each of these directories
supports the regular script directory layout with a startup file (or files?),
add-ons, modules and presets.
When installing an add-on, the script directory can be chosen.

NOTE: Deprecates the `bpy.types.PreferencesFilePaths.script_directory`
property, and replaces `bpy.utils.script_path_pref` with
`bpy.utils.script_paths_pref`.

Pull Request: https://projects.blender.org/blender/blender/pulls/104876
2023-04-11 15:20:52 +02:00
Martijn Versteegh
4ab7bb5b1f Fix : Show 'Exit group' menu entry also for non group nodes.
The Exit Group menu entry was mistakenly only whown for nodes who are
themselves also group nodes. It should be show for any node inside a
group.

Pull Request: https://projects.blender.org/blender/blender/pulls/106643
2023-04-07 13:09:33 +02:00
d85520f297 Python: bl_ui_utils.layout.operator_context context manager
Introduce a context manager that temporarily overrides a UILayout's
operator context.

Instead of writing this:

```py
default_op_context = layout.context
layout.context = 'OTHER_VALUE'
layout.do_stuff()
layout.context = default_op_context
```

you can now write this:

```py
from bl_ui_utils.layout import operator_context

with operator_context(layout, 'OTHER_VALUE'):
    layout.do_stuff()
```

This is also exception-safe; it will always ensure the layout's operator
context is restored when the `with` body is exited, regardless of
whether that's done with an exception or regularly.

Idea in-the-hallway approved by @Sergey.
2023-04-07 11:34:48 +02:00
Harley Acheson
14b112ef82 Fix #106422: Mesh Data Attributes Using tip_ for iface_
pgettext_tip incorrectly imported as iface_ instead of importing
pgettext_iface. These leads to incorrectly translated attribute text
shown when the user elects to translate only tooltips.

Pull Request: https://projects.blender.org/blender/blender/pulls/106507
2023-04-03 20:55:22 +02:00
Hans Goudey
e7f395dd20 Nodes: Add dropdown to select group socket subtype
Previously the only way to control the subtype was to remove the group
input or output and create it again. This commit adds a dropdown to
change an existing socket, for supported socket types.

Based on a patch by Angus Stanton: https://developer.blender.org/D15715

It was necessary to fix the UI code slightly; the layout's context
wasn't being used in calls to an operator's enum items callback.

Pull Request: https://projects.blender.org/blender/blender/pulls/105614
2023-04-03 18:23:30 +02:00
YimingWu
dc63f75837 Fix #106414: Handle mat==None case in GPencil Change Active Material operator
Some material slots could be empty, the operator could encounter a python
exception. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/106418
2023-04-02 17:08:50 +02:00
Germano Cavalcante
6778460e53 Fix #106323: Snap to Face Nearest not working
Face Nearest only works with individual projection, so always set the
`SCE_SNAP_PROJECT` flag in this case.

Also gray out the `Project Individual Elements` option in the UI if
`Face Nearest` is enabled.

And change the description to indicate that `Project Individual Elements`
is always enabled with the `Face Nearest` option.

(I feel a better design for this option needs to be considered).
2023-03-31 17:30:26 -03:00
Christoph Lendenfeld
0187943a3d Animation: Weight Paint select more/less for faces
This adds the select more/less operators to the weight paint mode face selection.

Just like in edit mode, press `CTRL`+`Numpad Plus/Minus` to use them.
They have also been added to the `Select` menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/105607
2023-03-31 14:53:00 +02:00
Christoph Lendenfeld
0d1a0cb453 Animation: Weight Paint select more/less for vertices
This adds the select more/less operators to the weight paint mode vertex selection.

Just like in edit mode, press CTRL+Numpad Plus/Minus to use them.
They have also been added to the Select menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/105633
2023-03-31 14:47:57 +02:00
Thomas Dinges
1987cbb12a Merge branch 'blender-v3.5-release' 2023-03-28 13:41:43 +02:00
Jacques Lucke
57712d7b18 Fix #106177: modal operator does not work from Node menu
This was an issue with the `operator_context`. It's a bit confusing because it
looks like every `uiLayout` has its own, but in `uiLayoutSetOperatorContext`
you can see that the `operator_context` is always set on the root layout for
some reason.

The fix is to set `INVOKE_REGION_WIN` as the operator context after it has been
set to something else (I found this to be the default by printing the operator
context before it was changed).

Pull Request: https://projects.blender.org/blender/blender/pulls/106213
2023-03-28 13:13:30 +02:00
Hans Goudey
de5ec852f3 Merge branch 'blender-v3.5-release' 2023-03-27 14:52:51 -04:00
Hans Goudey
ba4442ef41 Fix #105965: Add fur modifier properties missing UI data
Currently assigning values to IDProperties clears their UI data.
That is fixed by #106161, but that is too risky for 3.5. Instead,
work around the issue by triggering `MOD_nodes_update_interface`
function which recreates the UI data of the modifier properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/106190
2023-03-27 20:51:35 +02:00
Christoph Lendenfeld
5d5027db03 Animation: Gaussian Smooth operator for Graph Editor
Add a Gaussian smoothing operator to supersede the current
smoothing operator in the graph editor.

Advantage over the current implementation:
* Supports modal operations
* Is independent of key density
* More options in the redo panel
* More predictable Impulse Response

Option in the redo panel to change

Filter Width: How far out on each side of a key the code checks
to average key values

Sigma: The shape of the bell curve, lower values make a sharper bell curve
reducing the smoothing effect.
Too High values will make the code behave like an average filter as the
curve in the -1/1 range will almost be flat.

On a technical note, the operator needs to store additional data when running in modal
to avoid allocating/deallocating data on every modal run.
For that reason the `tGraphSliderOp` struct has been extended with
`void *operator_data` and `void (*free_operator_data)(void *operator_data)`.
The former is the data and the latter is a function responsible for freeing that data.

Pull Request: https://projects.blender.org/blender/blender/pulls/105635
2023-03-24 12:11:20 +01:00
Christoph Lendenfeld
84e170c563 Animation: Add duration display to frame range settings
This patch adds an option to the Status Bar: `Scene Duration`

This shows the duration of the current scene in frames and timecode
`Duration: <timecode> (Frame <current frame>/<total frames>)`
The timecode follows the formatting defined in the user preferences.

Pull Request: https://projects.blender.org/blender/blender/pulls/104882
2023-03-23 10:18:38 +01:00
Campbell Barton
846ed20ad6 Cleanup: remove unused argument signified from used arguments in Python
Also simplify import for `_bpy._utils_previews`.
2023-03-23 15:31:14 +11:00
45c1deac4f Bone relation lines: optionally draw between bone heads
Add control over how bone relation lines are drawn. Instead of always
drawing from the head of the child to the tail of the parent, give users
a choice for the parent side of the line. This can now be toggled
between the head and the tail of the bone, where the tail is Blender's
original behaviour and is retained as default value.

Pull request: https://projects.blender.org/blender/blender/pulls/105427
2023-03-21 15:16:13 +01:00
Erik Abrahamsson
4b30b5c57f Nodes: SDF Volume nodes milestone 1
Geometry Nodes: SDF Volume nodes milestone 1

Adds initial support for SDF volume creation and manipulation.
`SDF volume` is Blender's name of an OpenVDB grid of type Level Set.
See the discussion about naming in #91668.

The new nodes are:
- Mesh to SDF Volume: Converts a mesh to an SDF Volume
- Points to SDF Volume: Converts points to an SDF Volume
- Mean Filter SDF Volume: Applies a Mean Filter to an SDF
- Offset SDF Volume: Applies an offset to an SDF
- SDF Volume Sphere: Creates an SDF Volume in the shape of a sphere

For now an experimental option `New Volume Nodes` needs to be
enabled in Blender preferences for the nodes to be visible.

See the current work plan for Volume Nodes in #103248.

Pull Request: https://projects.blender.org/blender/blender/pulls/105090
2023-03-19 11:21:08 +01:00