This adds back the new mix node to the Color sections
of the add node menu.
The add menu now contains two entries for the mix node.
One under Utilites/Converter which defaults for float.
One under Color which defaults to color with `Mix Color` label.
This was moved as part of D13749.
The issue was reported on BlenderArtists.
Differential Revision: https://developer.blender.org/D15887
This change adds cryptomatte render passes to EEVEE-Next. Due to the upcoming viewport
compositor we also improved cryptomatte so it will be real-time. This also allows viewing
the cryptomatte passes in the viewport directly.
{F13482749}
A surface shader would store any active cryptomatte layer to a texture. Object hash is stored
as R, Asset hash as G and Material hash as B. Hashes are only calculated when the cryptomatte
layer is active to reduce any unneeded work.
During film accumulation the hashes are separated and stored in a texture array that matches
the cryptomatte standard. For the real-time use case sorting is skipped. For final rendering
the samples are sorted and normalized.
NOTE: Eventually we should also do sample normalization in the viewport in order to extract the correct
mask when using the viewport compositor.
Reviewed By: fclem
Maniphest Tasks: T99390
Differential Revision: https://developer.blender.org/D15753
This operator allows to set the start point for any cyclic stroke.
This is very handy to fit interpolation issues or
use thickness modifier.
Note: There is small change in this commit to fix
a typo error in the name of the operator.
Reviewed By: mendio, frogstomp
Maniphest Tasks: T100827
Differential Revision: https://developer.blender.org/D15881
As described in T95966, the goal is to move to a "struct of arrays"
approach rather than gathering an arbitrary set of data in hard-coded
structs. This has performance benefits, but also code complexity
benefits (this patch removes plenty of code, though the boilerplate
for the new operators outweighs that here).
To mirror the internal change, the options for storing mesh bevel
weights are converted into operators that add or remove the layer,
like for some other layers.
The most complex change is to the solidify modifier, where bevel
weights had special handling. Other than that, most changes are
removing clearing of the weights, boilerplate for the add/remove
operators, and removing the manual transfer of bevel weights
in bmesh - mesh conversion.
Eventually bevel weights can become a fully generic attribute,
but for now this patch aims to avoid most functional changes.
Bevel weights are still written and read from the mesh in the old way,
so neither forward nor backward compatibility are affected. As described
in T95965, writing in the old format will be done until 4.0.
Differential Revision: https://developer.blender.org/D14077
The library overrides context menu operators only make sense when at
least one ID is selected in the Outliner. So don't show them unless
that's the case. This also means the menu items don't show up anymore
for things like RNA properties, or the overridden properties in the
Library Overrides Properties view.
Also see 7eda9d8dda59 and the previous commit.
The asset context menu operators only make sense when at least one ID is
selected in the Outliner. So don't show them unless that's the case.
This also means the menu items don't show up anymore for things like RNA
properties, or the overridden properties in the Library Overrides
Properties view.
Also see 7eda9d8dda59.
a) There were two filter icons next to each other in the header which
isn't exactly professional, b) the filter was redundant since IDs are
now grouped under an ID type element ("Objects", "Collection", ...)
anyway.
In the hierarchies view it was already hidden (because the whole point
of it is to show relationships between IDs, you wouldn't want to have
any parts of the hierarchy hidden).
Searching isn't possible in the hierarchies view anymore, so the options
for it shouldn't be displayed either.
Followup to 21b92a5f31a4, forgot to remove these.
c9a996790307 added a workaround for performance issues in heavy
production scenes in the library overrides hierarchies view, reducing
the amounts of elements to be built. Searching for elements would still
have to build the entire tree, so Blender would essentially freeze when
searching in mentioned heavy scenes. Removing the search functionality
works around this issue for now.
Adds a new operator to automatically rotate UV Islands into alignment.
Modes:
* Auto (All edges)
* Geometry (V direction will point in geometry direction) [1]
* Edge (Rotate until selected edge is in V direction)
Also adds uv_sync_selection support to UV Randomize Transform.
Resolves: T78399
Differential Revision: https://developer.blender.org/D15820
[1] Listed as "World" in Task description.
The per-keymap user preferences messages were not extracted. This goes
through the keymap preferences RNA, as well as Python files for UI.
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15871
When saving, the default file name is "untitled" regardless of
selected language. This can be translated, like many graphical
applications do.
This applies to:
- blend file
- alembic file
- collada file
- obj file
- usd file
- rendered image
- grease pencil export
- subtitles export
- other Python exports through ExportHelper
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15868
Replacement of our Hebrew font, which has bad variable weight default.
See D15846 for more details.
Differential Revision: https://developer.blender.org/D15846
Reviewed by Brecht Van Lommel
This is a new implementation of the draw manager using modern
rendering practices and GPU driven culling.
This only ports features that are not considered deprecated or to be
removed.
The old DRW API is kept working along side this new one, and does not
interfeer with it. However this needed some more hacking inside the
draw_view_lib.glsl. At least the create info are well separated.
The reviewer might start by looking at `draw_pass_test.cc` to see the
API in usage.
Important files are `draw_pass.hh`, `draw_command.hh`,
`draw_command_shared.hh`.
In a nutshell (for a developper used to old DRW API):
- `DRWShadingGroups` are replaced by `Pass<T>::Sub`.
- Contrary to DRWShadingGroups, all commands recorded inside a pass or
sub-pass (even binds / push_constant / uniforms) will be executed in order.
- All memory is managed per object (except for Sub-Pass which are managed
by their parent pass) and not from draw manager pools. So passes "can"
potentially be recorded once and submitted multiple time (but this is
not really encouraged for now). The only implicit link is between resource
lifetime and `ResourceHandles`
- Sub passes can be any level deep.
- IMPORTANT: All state propagate from sub pass to subpass. There is no
state stack concept anymore. Ensure the correct render state is set before
drawing anything using `Pass::state_set()`.
- The drawcalls now needs a `ResourceHandle` instead of an `Object *`.
This is to remove any implicit dependency between `Pass` and `Manager`.
This was a huge problem in old implementation since the manager did not
know what to pull from the object. Now it is explicitly requested by the
engine.
- The pases need to be submitted to a `draw::Manager` instance which can
be retrieved using `DRW_manager_get()` (for now).
Internally:
- All object data are stored in contiguous storage buffers. Removing a lot
of complexity in the pass submission.
- Draw calls are sorted and visibility tested on GPU. Making more modern
culling and better instancing usage possible in the future.
- Unit Tests have been added for regression testing and avoid most API
breakage.
- `draw::View` now contains culling data for all objects in the scene
allowing caching for multiple views.
- Bounding box and sphere final setup is moved to GPU.
- Some global resources locations have been hardcoded to reduce complexity.
What is missing:
- ~~Workaround for lack of gl_BaseInstanceARB.~~ Done
- ~~Object Uniform Attributes.~~ Done (Not in this patch)
- Workaround for hardware supporting a maximum of 8 SSBO.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D15817
Since rB6269d66da, creating formats no longer depends solely on the
shader, but now depends on the dimensions used to fill the VBOs.
This allows 3D shaders to work flawlessly when assigned dimensions are
2D.
So there's no real benefit to us having shaders that are limited to 2D
use anymore.
This limitation makes it difficult to implement other builtin shaders
as they indirectly require a 2D version.
So this commit removes the 2D versions of the builtin sahders used in
Python , renames the string enums but keeps the old enums working for
backward compatibility.
(This brings parts of the changes reviewed in D15836).
With the new `attrs_info_get` method, we can get information about
the attributes used in a `GPUShader` and thus have more freedom in the
automatic creation of `GPUVertFormat`s
Reviewed By: fclem, campbellbarton
Differential Revision: https://developer.blender.org/D15764
This patch moves material indices from the mesh `MPoly` struct to a
generic integer attribute. The builtin material index was already
exposed in geometry nodes, but this makes it a "proper" attribute
accessible with Python and visible in the "Attributes" panel.
The goals of the refactor are code simplification and memory and
performance improvements, mainly because the attribute doesn't have
to be stored and processed if there are no materials. However, until
4.0, material indices will still be read and written in the old
format, meaning there may be a temporary increase in memory usage.
Further notes:
* Completely removing the `MPoly.mat_nr` after 4.0 may require
changes to DNA or introducing a new `MPoly` type.
* Geometry nodes regression tests didn't look at material indices,
so the change reveals a bug in the realize instances node that I fixed.
* Access to material indices from the RNA `MeshPolygon` type is slower
with this patch. The `material_index` attribute can be used instead.
* Cycles is changed to read from the attribute instead.
* BMesh isn't changed in this patch. Theoretically it could be though,
to save 2 bytes per face when less than two materials are used.
* Eventually we could use a 16 bit integer attribute type instead.
Ref T95967
Differential Revision: https://developer.blender.org/D15675
This patch is a response to T92588 and is implemented
as a Function/Shader node.
This node has support for Float, Vector and Color data types.
For Vector it supports uniform and non-uniform mixing.
For Color it now has the option to remove factor clamping.
It replaces the Mix RGB for Shader and Geometry node trees.
As discussed in T96219, this patch converts existing nodes
in .blend files. The old node is still available in the
Python API but hidden from the menus.
Reviewed By: HooglyBoogly, JacquesLucke, simonthommes, brecht
Maniphest Tasks: T92588
Differential Revision: https://developer.blender.org/D13749
When allocating new `CustomData` layers, often we do redundant
initialization of arrays. For example, it's common that values are
allocated, set to their default value, and then set to some other
value. This is wasteful, and it negates the benefits of optimizations
to the allocator like D15082. There are two reasons for this. The
first is array-of-structs storage that makes it annoying to initialize
values manually, and the second is confusing options in the Custom Data
API. This patch addresses the latter.
The `CustomData` "alloc type" options are rearranged. Now, besides
the options that use existing layers, there are two remaining:
* `CD_SET_DEFAULT` sets the default value.
* Usually zeroes, but for colors this is white (how it was before).
* Should be used when you add the layer but don't set all values.
* `CD_CONSTRUCT` refers to the "default construct" C++ term.
* Only necessary or defined for non-trivial types like vertex groups.
* Doesn't do anything for trivial types like `int` or `float3`.
* Should be used every other time, when all values will be set.
The attribute API's `AttributeInit` types are updated as well.
To update code, replace `CD_CALLOC` with `CD_SET_DEFAULT` and
`CD_DEFAULT` with `CD_CONSTRUCT`. This doesn't cause any functional
changes yet. Follow-up commits will change to avoid initializing
new layers where the correctness is clear.
Differential Revision: https://developer.blender.org/D15617
- PALETTE_OT_color_add: crashed without a brush.
- SCREEN_OT_actionzone: crashed without a window.
- PREFERENCES_OT_studiolight_show: exception when opening prefs failed.
Those strings were at least partly disambiguated:
- Area
- Zone
- Measurement
- Ease
- BBone Ease In / Out
- Back
- Camera BG image depth
- GP interpolate sequence
- Edge Crease
- Theme
- Jitter
- Brush
- GPencil
- Lens distorsion compositing node
- Cineon color management
- Black
- Gamma
- White
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15791
Translate:
- new group socket names
- default names Input and Output
- on connecting a link from another node
- new geometry nodes input and output socket names
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D15763