Commit Graph

885 Commits

Author SHA1 Message Date
Jacques Lucke
ea98c39c50 Cleanup: remove debug print 2023-11-24 09:52:50 +01:00
Antonio Vazquez
9d8283d113 GPv3: Hide Others operator
This operators hide all materials except the active one.

There is a parameter to hide only active as it was in GPv2.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115038
2023-11-23 16:03:30 +01:00
Antonio Vazquez
1d6a617aa2 GPv3: Lock and Unlock all materials operators
This is the conversion of existing operators in GPv2.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115041
2023-11-23 15:36:05 +01:00
Antonio Vazquez
eb935bf32d GPv3: Lock Unused Materials operator
Conversion of GPv2 operator.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115272
2023-11-23 15:31:47 +01:00
Clément Foucault
6f1ed59c4d EEVEE-Next: Display render pass panel in viewport 2023-11-22 16:57:21 +01:00
Hans Goudey
8d5aa6eed4 Geometry Nodes: Index switch node
Add an "Index Switch" node which is meant as a simpler version of
the "Menu Switch" from #113445 that doesn't allow naming items
or displaying them in a dropdown, but still allows choosing between
an arbitrary number of items, unlike the regular "Switch" node.
Even when the Menu Switch is included (which should be in the
same release as this), it may still be helpful to have explicit mapping
of indices, and a fair amount of the internals can be shared anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/115250
2023-11-22 16:11:32 +01:00
Hans Goudey
ba1c8fe6a5 Mesh: Improve remesh attribute transfer
Currently we have options to transfer the paint mask, face sets, and
color attributes to the new mesh created by voxel remesh. This doesn't
make use of the generic attribute design, where it would be clearer to
transfer all attributes with the same methods. That's reflected in the
code as well-- we do duplicate work for the mask and vertex colors, for
example.

This commit replaces the transfer options with a single checkbox for
all attributes. All attribute types on all domains are transferred with
basically the same method as the "Sample Nearest" node from geometry
nodes-- they take the value from the nearest source element of the same
domain. Face corners are handled differently than before. Instead of
retrieving the mixed value of all the corners from the nearest source
vertex, the value from the nearest corner of the nearest face.

---

Some timing information, showing that when interpolating the same
data, the attribute propagation is significantly faster than before.
Edge and corner attributes would add some cost (edges more than
corners), but might not always be present.

Before
```
voxel_remesh_exec: 3834.63 ms
BKE_shrinkwrap_remesh_target_project: 1141.17 ms
BKE_mesh_remesh_reproject_paint_mask: 689.35 ms
BKE_remesh_reproject_sculpt_face_sets: 257.14 ms
BKE_remesh_reproject_vertex_paint: 54.64 ms
BKE_mesh_smooth_flag_set: 0.15 ms
```

After
```
voxel_remesh_exec: 3339.32 ms
BKE_shrinkwrap_remesh_target_project: 1158.76 ms
mesh_remesh_reproject_attributes: 517.52 ms
```

Pull Request: https://projects.blender.org/blender/blender/pulls/115116
2023-11-22 15:21:58 +01:00
Jeroen Bakker
266f4305a7 EEVEE-Next: Naming & UI tweaks Light Probes
* Rename "Type" to "Shape" in user interface. RDNA already used
  the term Shape (Still need to push this from office)
* Show LightProbe overlay settings
* Rename "Cubemap" to "Sphere"
* Rename "Planar" to "Plane"

Pull Request: https://projects.blender.org/blender/blender/pulls/114406
2023-11-22 14:43:52 +01:00
Clément Foucault
a001cf9f2b EEVEE-Next: Displacement Option
This add the displacement option to EEVEE materials.
This unifies the option for Cycles and EEVEE.

The displacement only option is not matching cycles
and not particularly useful. So we decided to not
support it and revert to displacement + bump.

Pull Request: https://projects.blender.org/blender/blender/pulls/113979
2023-11-21 19:55:38 +01:00
Clément Foucault
3097d5d821 EEVEE-Next: Add horizon scan to raytracing module
This uses the principles outlined in
Screen Space Indirect Lighting with Visibility Bitmask
to compute local and distant diffuse lighting.

This implements it inside the ray-tracing module as a fallback when the
surface is too rough. The threshold for blending between technique is
available to the user.

The implementation first setup a radiance buffer and a view normal
buffer. These buffer are tracing resolution as the lighting quality is
less important for rough surfaces. These buffers are necessary to avoid
re-projection on a per sample basis, and finding and rotating the
surface normal.

The processing phase scans the whole screen in 2 directions and outputs
local incomming lighting from neighbor pixels and the remaining
occlusion for everything that is outside the view.

The final steps filters the result of the previous phase while applying
the occlusion on the probe radiance to have an energy conserving mix.

Related #112979

Pull Request: https://projects.blender.org/blender/blender/pulls/114259
2023-11-21 16:24:14 +01:00
Christoph Lendenfeld
a99e419b6e Anim: Insert keyframes without keying sets
When animators want to key something in the viewport,
the code needs to know *which properties* should be keyed of that selected thing.
So far that was done with keying sets, and a pop-up that let's
you choose the keying set to use. You can get rid of the popup by
choosing a keying set ahead of time. But that is also not always desirable.

That pop-up is quite confusing and gives way too many options.
To simplify this process this PR adds a User Preference option to choose one or more of:
* Location
* Rotation
* Scale
* Rotation Mode
* Custom Properties

Now whenever the `I` key is pressed in the viewport,
and no keying set is enabled, it reads the preferences for which channels to insert.

# User Facing changes
* The popup will not be shown when pressing the hotkey,
 but you can still explicitly use keying sets by going to the menu
* Which channels are keyed is defined by a User Preference setting under animation
* when a keying set is used explicitly, the User Preference settings are ignored

Part of #113278

Pull Request: https://projects.blender.org/blender/blender/pulls/113504
2023-11-21 15:38:01 +01:00
20kdc
f01c82e268 VSE: Use Strip Volume property for scenes
Scene strips had scene volume property in side panel, but this meant,
that it is shared across all strips using particular scene.

Add `volume` RNA property for scene strips and use this in side panel.

Co-authored-by: 20kdc <asdd2808@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/112597
2023-11-21 08:09:18 +01:00
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