Commit Graph

873 Commits

Author SHA1 Message Date
Germano Cavalcante
0f2988fd2c Revert preset changes in c6db3f98bb
This partialy reverts commit c6db3f98bb.

The presets are case-sensitive, as explained in issue #110642.
2023-11-20 19:41:25 -03:00
Hans Goudey
f2bcd73bd2 Mesh: Move sculpt mask to a generic attribute
Store paint masks as generic float attributes, with the name
`".sculpt_mask"`. This is similar to 060a534141, which made
the same change for face sets. The benefits are general
consistency, nicer code, and more support in newer areas
that deal with attributes like geometry nodes.

The RNA API is replaced with one created in Python. The new
API only presents a single layer as an attribute class, so it
should be simpler to use in general:
- Before: `object.data.vertex_paint_masks[0].data[0].value`
- After: `object.data.vertex_paint_mask.data[0].value`

Pull Request: https://projects.blender.org/blender/blender/pulls/115119
2023-11-20 17:42:01 +01:00
Hans Goudey
b3d4fc80fd Fix: Duplicate node tools menus in sculpt mode 2023-11-20 09:50:26 -05:00
Bastien Montagne
7ce745a76b UI messages fixes/cleanups. 2023-11-20 12:20:58 +01:00
Aras Pranckevicius
17c793e43c IO: C++ STL exporter
There was a C++ STL importer since Blender 3.3, but no corresponding C++ STL exporter. This PR is adding said exporter: taking https://projects.blender.org/blender/blender/pulls/105598 and finishing it (agreed with original author).

Exporting Suzanne with 6 level subdivision (4 million triangles), on Apple M1 Max:
- Binary: python exporter 7.8 sec -> C++ exporter 0.9 sec.
- Ascii: python exporter 13.1 sec -> C++ exporter 4.5 sec.

Co-authored-by: Iyad Ahmed <iyadahmed430@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/114862
2023-11-19 16:41:20 +01:00
Hoshinova
0b11c591ec Nodes: Merge Musgrave node into Noise node
This path merges the Musgrave and Noise Texture nodes into a single
combined Noise Texture node. The reasoning is that both nodes
intrinsically do the same thing, which is the layering of Perlin noise
derivatives to produce fractal noise. So the patch de-duplicates code
and unifies the use of fractal noise for the end use.

Since the Noise node had a Distortion input and a Color output, while
the Musgrave node did not, those are now available to the Musgrave types
as new functionalities.

The Dimension input of the Musgrave node is analogous to the Roughness
input of the Noise node, so both inputs were unified to follow the same
behavior of the Roughness input, which is arguable more intuitive to
control. Similarly, the Detail input was slightly different across both
nodes, since the Noise node evaluated one extra layer of noise. This was
also unified to follow the behavior of the Noise node.

The patch, coincidentally fixes an unreported bug causing repeated
output for certain noise types and another floating precision bug
#112180.

The versioning code implemented with this patch ensures backward
compatibility for both the Musgrave and Noise Texture nodes. When
opening older Blender files in Blender 4.1 the output of both nodes are
guaranteed to always be exactly identical to that of Blender files
created before the nodes were merged in all cases.

Forward compatibility with Blender 4.0 is implemented by #114236.
Forward compatibility with Blender 3.6 LTS is implemented by #115015.

Pull Request: #111187
2023-11-18 09:40:44 +01:00
Pratik Borhade
bf7d4ef054 Fix #115025: Transform operations not working in particle edit mode
Earlier 3d-view keymap was used by particle edit mode for transform
operation. After d7558a243c, this global transform keymap is removed.
So add `_template_items_transform_actions` in particle-edit mode to
allow transforming from shortcuts.

Pull Request: https://projects.blender.org/blender/blender/pulls/115031
2023-11-18 07:37:03 +01:00
Jeroen Bakker
f6569b7726 Cleanup: Make format 2023-11-17 11:54:19 +01:00
casey bianco-davis
4dfed520a3 GPv3: Delete operator
Adds the delete operator to edit mode grease pencil, and also adds it to the delete menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/111571
2023-11-17 10:35:56 +01:00
Antonio Vazquez
39f30e848c GPv3: Show All Materials Operator
Adds the Show All Materials operator.

Also includes a refresh of despgraph when the hide prop changes.

Note: The actual render engine does not support hiding by materials.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115001
2023-11-17 10:32:35 +01:00
Philipp Oeser
f815484e7d Outliner: add "Expand/Collapse All" to view context menu
This was only in the blender keymap, but seems useful to have this in a
menu as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/114138
2023-11-17 00:49:04 +01:00
Philipp Oeser
4793b4592b Outliner: clarify "Show Hierarchy" context menu entry
Display OUTLINER_OT_show_hierarchy as "Show Object Hierarchy"

Pull Request: https://projects.blender.org/blender/blender/pulls/114139
2023-11-17 00:31:32 +01:00
Nate Rupsis
661e7e451a Anim: Rename NLA "Channels" to "Tracks"
Updating "NLA Channel"  to "NLA Tracks" across board, since the terminology "Tracks" is the most prevalent in operators, code, etc.
2023-11-16 17:59:18 +01:00
Jeroen Bakker
81eec5ff44 Cleanup: Make format 2023-11-16 07:59:20 +01:00
Hans Goudey
3fcd9c9425 Geometry Nodes: Support node tools in object mode
Extend node tools to display tool assets in object mode as well
as edit and sculpt modes. For consistency with existing Blender
design, selection cannot be set and is just "true" in object mode
because it can't be visualized. The visibility of tools can be
customized per object type in object mode as well.

See #101778

Pull Request: https://projects.blender.org/blender/blender/pulls/114819
2023-11-15 17:01:18 +01:00
ariva00
d7b7938706 Fix #92287: focal legth not correctly computed when tracking vertial videos
The motion tracking always operates with horizontal sensor mapping, but
conversion code form tracking camera to Blender camera was not setting
the sensor fitting to Horizontal (Python code was leaving sensor fitting
unchanged, C code was setting it to Auto).

Additionally, the Python code was not handling camera shift, making it
so non-centered optical center was not handled correctly.

The reason why the code is written in two places is because C code is
used when conversion from tracking camera to Blender happens after solving
the motion, and the Python code is used for the "Setup Tracking Scene".
It is possible to unify some code, but it is not that much of an importance
at this time.

Pull Request: https://projects.blender.org/blender/blender/pulls/114253
2023-11-15 10:53:30 +01:00
Harley Acheson
3f5654b491 Fix #114080: Add Khmer Font
Add Noto Sans Khmer (variable) font, needed for new translation.
2023-11-13 17:38:03 +01:00
Thomas Dinges
3cac5c83ec Merge branch 'blender-v4.0-release' 2023-11-13 16:32:30 +01:00
Thomas Dinges
905c0b84f2 Release: Update manual references for 4.0. 2023-11-13 16:31:41 +01:00
Germano Cavalcante
c6db3f98bb Fix modal key assignment for "Rotate Normals" in keymap versioning
Error in 78943edc5d

The key was not included in the appropriate condition block, leading to
an error.
2023-11-13 09:47:10 -03:00
Antonio Vazquez
7c899d2271 GPv3: Set caps operator
This operator is similar to V2 GPENCIL_OT_caps_set to set the type of cap used by the stroke curve.

Related to #113977

Pull Request: https://projects.blender.org/blender/blender/pulls/113978
2023-11-12 14:13:13 +01:00
Germano Cavalcante
78943edc5d Transform: Custom modifier to navigate while transforming
Discussed in #114646.

This commit transforms the "alt_navigation" option of the transform
operators into a new modal key item. "PASSTHROUGH_NAVIGATE"

In addition to cleaning up a lot of the code, it allows you to
customize the key chosen to navigate while transforming.
2023-11-09 21:33:34 -03:00
Campbell Barton
8eb5223663 Cleanup: remove unused variables & imports in scripts/ 2023-11-10 10:06:41 +11:00
Campbell Barton
45cf94904b Fix EEVEE Next panel masking the non-next EEVEE panel
Mistake in [0] re-used the same names for both panels.

[0]: 80a8368b88
2023-11-09 23:17:23 +11:00
Hans Goudey
d0ce1ca173 Merge branch 'blender-v4.0-release' 2023-11-09 11:58:29 +01:00
Falk David
ff5df8a78f Fix #114564: Can't search grease pencil modifiers
The grease pencil modifier list hasn't been converted to a menu yet.
This fixes the issue by filtering out grease pencil objects in
the search poll function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114665
2023-11-09 11:57:07 +01:00
Antonio Vazquez
405ad22429 GPv3: Set Uniform operator for Thickness and Opacity
This operator has the same functionality that GPv2 version of Stroke Normalize.

Note: The radius is set with the entry value * 0.5 and the param is named Thickness.

Related to #113991

Pull Request: https://projects.blender.org/blender/blender/pulls/114006
2023-11-08 16:19:00 +01:00
Matias Mendiola
e5704d37de GPv3: Switch Direction operator
This Operator is similar to GPv2 GPENCIL_OT_stroke_flip to switch the stroke direction.

Related to: [113590](113590)

Pull Request: https://projects.blender.org/blender/blender/pulls/114007
2023-11-08 16:05:54 +01:00
Antonio Vazquez
a8cb0b0ca0 GPv3: Set selected curve material as active material
This operator assigns the material of the first selected curve as active material.

Related to #113569

Pull Request: https://projects.blender.org/blender/blender/pulls/114188
2023-11-08 15:00:48 +01:00
Pratik Borhade
34874910b6 Merge branch 'blender-v4.0-release' 2023-11-08 17:33:26 +05:30
Pratik Borhade
2a45027203 UI: Type to search for sequencer add menu
Sequencer add menu supports searching with spacebar but "type to search"
was missing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114625
2023-11-08 12:56:58 +01:00
Omar Emara
474b6fa070 Realtime Compositor: Support full precision compositing
This patch adds support for full precision compositing for the Realtime
Compositor. A new precision option was added to the compositor to change
between half and full precision compositing, where the Auto option uses
half for the viewport compositor and the interactive render compositor,
while full is used for final renders.

The compositor context now need to implement the get_precision() method
to indicate its preferred precision. Intermediate results will be stored
using the context's precision, with a number of exceptions that can use
a different precision regardless of the context's precision. For
instance, summed area tables are always stored in full float results
even if the context specified half float. Conversely, jump flooding
tables are always stored in half integer results even if the context
specified full. The former requires full float while the latter has no
use for it.

Since shaders are created for a specific precision, we need two variants
of each compositor shader to account for the context's possible
precision. However, to avoid doubling the shader info count and reduce
boilerplate code and development time, an automated mechanism was
employed. A single shader info of whatever precision needs to be added,
then, at runtime, the shader info can be adjusted to change the
precision of the outputs. That shader variant is then cached in the
static cache manager for future processing-free shader retrieval.
Therefore, the shader manager was removed in favor of a cached shader
container in the static cache manager.

A number of utilities were added to make the creation of results as well as
the retrieval of shader with the target precision easier. Further, a
number of precision-specific shaders were removed in favor of more
generic ones that utilizes the aforementioned shader retrieval
mechanism.

Pull Request: https://projects.blender.org/blender/blender/pulls/113476
2023-11-08 08:32:00 +01:00
Damien Picard
7231ac0a52 I18n: extract and disambiguate a few messages
Extract:
- "Attribute", when creating a new attribute with
  `GEOMETRY_OT_attribute_add()`: make the default name in the operator
  a null string, and set it to "Attribute" translated inside an invoke
  method instead.
- Also for new attributes, from `BKE_id_attribute_calc_unique_name()`,
  for instance to create a default vertex color layer when going into
  Vertex Paint mode: use `DATA_()` instead of `IFACE_()`, since it
  represents user data.

Disambiguate:
- "Weight" can be the thickness of font glyphs.
- "Mark as Asset" and "Clear Asset" are operator names already
  extracted using the Operator context. They were recently added to a
  manual translation in the UI, but the existing one can be reused.
- "Second" as a time unit in the context of frame snapping.

Some messages reported by Satoshi Yamasaki in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/114159
2023-11-07 18:08:58 +01:00
Damien Picard
772e99b4f7 I18n: extract node group asset sockets
Each node group asset exposes various properties through sockets.
Although they can generally be considered user-created data, for
built-in assets they are also part of the UI and should be
translated--especially since more modifiers should be migrated to
Geometry Nodes in the future.

This commit allows extraction of such socket names and descriptions.
Since the message extraction script already extracted names and
descriptions for each asset, this commit only adds the socket in the
same loop, so that they are extracted while the asset file is already
being read.

Properties from sockets are not yet translated in the modifier
properties editor, this will be enabled in a follow-up commit.
2023-11-07 18:08:28 +01:00
Miguel Pozo
b4316445a8 EEVEE-Next: Add Max Displacement option
Add a Max Displacement option to Material settings, so frustum culling
can work correctly with vertex displacement.

Pull Request: https://projects.blender.org/blender/blender/pulls/114200
2023-11-07 15:28:07 +01:00
Philipp Oeser
1699163feb Merge branch 'blender-v4.0-release' 2023-11-07 10:12:07 +01:00
Alaska
967e36cf68 UI: Don't show HDR setting when using False Color view transform
False Color view transforms doesn't show HDR values.

Pull Request: https://projects.blender.org/blender/blender/pulls/114503
2023-11-07 07:48:54 +01:00
Campbell Barton
1e66938d7a Cleanup: spelling in comments, format 2023-11-07 11:35:16 +11:00
Miguel Pozo
6d0b5e2ace EEVEE-Next: New shadow settings
Remove `Material > Shadow Mode` and use `Object > Shadow Ray Visibility`
and `Material > Transparent Shadows` instead.

The versioning system auto-updates objects/materials in EEVEE
scenes so their behavior is as close as possible to the previous one.

Update Cycles to use the native `use_transparent_shadow` property.

Note:
Material changes don't set any `recalc` flag on the objects that use
them, so the EEVEE Next shadow maps don't update when changing
settings/nodes.
Fixing this issue is required for 4.1, but it's out of the scope of this PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/113980
2023-11-06 15:45:00 +01:00
Richard Antalik
fe4f895214 Merge branch 'blender-v4.0-release' 2023-11-06 06:09:38 +01:00
Aaron Franke
c62009a6ac 3D View: add local up/down movement to walk navigation
Minor usability enhancement for the walk navigation mode. Previously
walk navigation had local movement for forward/back/left/right,
but only global movement for up/down.
This PR adds local up/down movement, bound to the R and F keys.

Ref: !111682
2023-11-05 17:23:59 +11:00
Douglas Paul
23e3f8f563 Fix: Correct order of nodes in the Mesh > Write menu
The ordering of geometry nodes in the menus is intended to be
alphabetic, but the new "Set Face Set" node was listed _after_ the
"Set Shade Smooth" node in the Mesh > Write menu. This fixes the order.

Pull Request: https://projects.blender.org/blender/blender/pulls/114475
2023-11-04 11:02:59 +01:00
Campbell Barton
b177f27e6f Cleanup: compile the match for reuse in UI_UL_list.filter_items_by_name 2023-11-04 16:53:49 +11:00
Jeroen Bakker
747ec05f69 Cleanup: Make format 2023-11-03 12:00:38 +01:00
Clément Foucault
0684b68eb4 EEVEE-Next: Make Ambient Occlusion Pass use Horizon Scan
This adds a new way of computing occlusion using visibility bitmask. To
make it more algorithm agnostic, we name it horizon scan.
This cleans-up / simplify the code compared to the Horizon based solution.
There is no more trickery for fading influence of distant samples which
makes the result match cycles closer.

This introduces a new thickness option. Maintaining it relatively low
makes it possible to avoid over occlusion because of in front geometry.
Making it too low will cause under occlusion.

Related #112979

Pull Request: https://projects.blender.org/blender/blender/pulls/114150
2023-11-02 19:22:01 +01:00
Falk David
91db8fc5a0 GPv3: Multi-frame editing
Adds a new scene tool setting `use_grease_pencil_multi_frame_editing`.

The `foreach_*_drawing` functions are moved to the `ed::greasepencil` namespace in the editor, since they are now context sensitive and depend on the toolsetting. They are now named `retrieve_editable_drawings` and `retrieve_visible_drawings` and return
an array of drawings instead of calling a callback function.

Pull Request: https://projects.blender.org/blender/blender/pulls/114283
2023-11-02 17:10:59 +01:00
Miguel Pozo
b679ea939a EEVEE-Next: Per probe viewport display
* Add viewport display support for Sphere and Plane probes.
* Make all probe display options per object instead of per scene.
  (Uses the already existing `LIGHTPROBE_FLAG_SHOW_DATA`
   and adds a new `data_display_size ` property to the `LightProbe` DNA)
* Python `show_data` property has been deprecated and renamed to
   `use_data_display` (`data_display_size ` has been exposed as well).

Pull Request: https://projects.blender.org/blender/blender/pulls/114176
2023-11-02 17:08:13 +01:00
Gilberto Rodrigues
dfd1b63cc7 UI: improve mesh edge highlighting
Changes to edit mode mesh overlays, use hue shift instead of color
fading/darkening for selection mode visual differentiation, and some
theme changes to improve the display of mesh edges and faces with good
selection visibility.

- Removed "edge" toggle from edit mode overlays panel.
- No longer halves the edge and face alpha depending on selection mode.
  Half the face alpha in wire-frame mode. For better visibility on most
  themes.

Ref !111431
2023-11-02 22:09:17 +11:00
Antonio Vazquez
c412aa1a17 GPv3: Rename stroke_color_set to stroke_material_set
The old name was logic when the color of the stroke was using a palette and not materials, but now always a material is used so the name "color" is not logic.

As we are changing all the API, now is the moment to set the right name.

Also, the commit includes some cleanup of the code.

Pull Request: https://projects.blender.org/blender/blender/pulls/114186
2023-11-01 10:39:17 +01:00
Julian Eisel
6dcc394104 Merge branch 'blender-v4.0-release' 2023-10-31 15:38:21 +01:00