Grease pencil tint modifier in gradient mode did not do alpha mix with
the original stroke color, making original color completely black even
when gradient color has alpha. Now fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/130575
Add-ons can still use the legacy API that only works on OpenGL. Vulkan
however was crashing as there is no shader create info available.
Adding a pre-check when finalizing shaders on availability of shader
create info.
Pull Request: https://projects.blender.org/blender/blender/pulls/130660
If a modifier gets renamed elsewhere (through the UI in the Properties
Editor, python, ...) this ends up calling `rna_Modifier_name_update` --
which went fine because it does the neccessary depsgraph relations
update.
Doing the same from the Outliner missed that which then lead to crashes
in depsgraph modifier evaluation.
To resolve, add a case for `TSE_MODIFIER` in the Outliners
`namebutton_fn` that adds the required depsgraph relations update.
Also adds an appropriate notifier, so the name changes appear
immediately elsewhere in the UI.
Fixes#130536
Pull Request: https://projects.blender.org/blender/blender/pulls/130587
We can't use the `threshold` uniform name in Metal because it is used as
a local variable in one of the library files, because uniforms are
defines in Metal, so it causes an error. Change the name to
`color_threshold` as a fix.
When EEVEE next removed the Alpha Threshold option a node graph setup
was used instead. Based on a USD test asset[1] the original code was
designed around only using the Image A channel during import to wire
up the nodes. However, the other channels (R, G, or B) are just as
valid.
We now handle this by wiring up the Separate RGB node, that is already
inserted for the scenario in general, to the shader nodes handling the
threshold calculation. Also adds additional test coverage for both
export and import as well.
The Round and LessThan+OneMinus networks remain the only shapes that
will be recognized for the processing.
[1] https://github.com/usd-wg/assets/tree/main/test_assets/AlphaBlendModeTest
Pull Request: https://projects.blender.org/blender/blender/pulls/130346
The existing point instancer reader is slightly refactored to allow for
animated setups. The primary change is simply to inherit from
`USDGeomReader` rather than `USDXformReader`. This allows access to the
`read_geometry` API used by the cache modifier.
The existing `read_object_data` method is split into two parts with
`read_geometry` loading per-frame USD data and `read_object_data`
coordinating the initial loading process, including creating the GN node
tree just once.
A new test has been added (a variation of the nested point instancer
file) with time samples on various attributes and on both point
instancers. This also fixes#129502 and the file provided in that issue.
----
The already added test file is `tests/data/usd/usd_point_instancer_anim.usda`
Pull Request: https://projects.blender.org/blender/blender/pulls/129881
This PR changes the default theme color for TH_FACE_FRONT, used by the
Face Orientation overlay, to have zero alpha. That way, by default, it
can be used always and not interfere with the display of (normal) front
faces.
Pull Request: https://projects.blender.org/blender/blender/pulls/130618
This commit adds extra filtering when applying versioning code to older
files to support the Image Editor paint brushes with brush assets.
Previously, the versioning code updated all of the View3D space tools
that used a paint context to have a specific hardcoded tool name - this
unfortunately misses the default startup.blend Texture Paint brush.
Pull Request: https://projects.blender.org/blender/blender/pulls/130560
This shows a "2 object(s) hidden" notification on the status bar when
hiding objects, the same as we do when deleting objects. Pressing "H"
can be done accidentally so this is at least some indication of what
happened, both on the status bar in Info Editor. Obviously does nothing
if nothing is selected when you press "H"
Pull Request: https://projects.blender.org/blender/blender/pulls/130617
When dragging an area to a new location, current code limits the size
of the target area to AREAMINX and HEADERY, which is the minimum sizes
that an area can occupy. This is too small and results in frustration
for some users. When moving an existing area you are unlikely to want
it to be an unusable size. This PR makes the minimum target size 3X
wider. If an area is not large enough to be bisected into two such
areas then it won't be offered as a docking target in that orientation.
Pull Request: https://projects.blender.org/blender/blender/pulls/130546
Changes to the text descriptions shown when dragging an area to a new
location. "Split Area" -> "Move area here", "Replace Area" -> "Replace
this area". Removes some confusion regarding "split" since we normally
use that word for a different operation. The "this" and "here" help to
remove ambiguation with the word "area" (source or target).
Pull Request: https://projects.blender.org/blender/blender/pulls/130554
This was caused by the fresnel effect darkening the selection
color when there was no normal attribute available.
Now default to no darkening when no attribute is available.
The depth test was not set correctly for the front pass.
The shader was writting to the antialiasing buffer. Using
a dedicated shader avoid breaking the renderpass to bind
another framebuffer.
Now that another ID can be renamed (again), it also needs to be properly
tagged as needing resync in the depsgraph too.
This commit:
* Moves/add depsgraph tagging to `BKE_id_rename`.
* Moves the WM notifier creation to `ED_id_rename`.
Pull Request: https://projects.blender.org/blender/blender/pulls/130596
Regression from 9e0b673467.
Not sure why the extra undo step is required after changing active object
(maybe because the mode switching to Sculpt mode of the new object
generates a 'Sculpt' undo step and not a 'Global' one?).
Pull Request: https://projects.blender.org/blender/blender/pulls/130472
The `fmt::format` can process the format string at compile time. Currently, we
don't seem to be using that as we don't use `FMT_STRING`. Starting with C++20,
that will be the default though, and one has to explicitly opt out in places
where the string is not known at compile time using `fmt::runtime(...)`.
Currently, our code does not compile as C++20 because of that. Unfortunately, we
have many places with runtime format strings, because of i18n.
Pull Request: https://projects.blender.org/blender/blender/pulls/130392
This adds a `write_bhead` utility function and also reduces the scope of
some `BHead` variables. The separate `write_bhead` function was quite
useful for #129751 and will likely be useful in a potential separate
implementation too.
Pull Request: https://projects.blender.org/blender/blender/pulls/130457
This is to make sure duplicate libomp/libiomp5 runtime conflicts are
detected as soon as a second runtime is initialized. Otherwise, it may
not crash until Blender's OpenMP runtime is initialized by a feature
that uses it, making such issues possibly go unnoticed. Such a conflict
can happen when an add-on has a native module that uses OpenMP and links
to a different libomp runtime, as was the case in #125255.
Currently Blender only ships with libomp on MacOS.
---
When libomp detects such an issue it should abort and print the following message:
```
OMP: Error #15: Initializing libomp.a, but found libomp.dylib already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://openmp.llvm.org/
```
Pull Request: https://projects.blender.org/blender/blender/pulls/130407
The bug occurred when the user changed the camera of the scene.
The lineart modifier was not updating when changing the camera, but only
when changing other elements in the scene or moving the camera.
This is resolved by adding a depsgraph update for scene parameters, such
as when changing the camera.
Testing:
Add two cameras, add a Grease Pencil Collection Line Art, go into camera
perspective view and then switch to the other camera.
The Grease Pencil Line Art now updates automatically.
Co-authored-by: YimingWu <chengdulittlea@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/129935
CMake 3.31+ have begun emitting warnings when you feed install()
paths that are not normalized (ie have, '.' or '..' in them) easiest
fix is just not use them.
This cleans up the windows sections of the build system, the other
platform devs will have to take a look on their respective platforms.
Adds the option `merge_parent_xform` to the USD export operator and
panels so the transform and shapes are merged into a single USD Prim.
Without the option (existing default), a top-level mesh would be
exported as a top-level `Xform` that has a `Mesh` child:
```
def Xform "MyBlenderMeshObject"
{
matrix4d xformOp:transform = ...
def Mesh "MyBlenderMeshData"
{
}
}
```
This matches the Blender data model, where a transformable object
contains a geometric shape (like a mesh). This structure is also very
valid in USD, where we don't want to directly instantiate geometric
primitives[1]
However, "since number of prims on a stage is one of the primary factors
that governs how USD scale"[2], to reduce the number of prims in a
stage, geometric primitives *are transformable* themselves (see the
inheritence diagram[3]).
As such, the new export option allows to export geometric primitives
without the parent transform:
```
def Mesh "MyBlenderMeshObject"
{
matrix4d xformOp:transform = ...
}
```
This MR adds a the `is_object_data_context` flag to the
`HierarchyContext` context structure. The point of this change is to
make unambiguous in `USDHierarchyIterator::create_usd_export_context`
the fact that an `object` or a `data` is currently being exported: the
new `merge_parent_xform` option is meaningless for `object`. Only `data`
can be exported with a parent `Xform` or as a child of said `Xform`.
Ideally this flag would not be needed at all: the final USD prim path
*could* be computed in an override of the virtual
`AbstractHierarchyIterator::get_object_data_path` method. However, this
would mean that an `object` and a `data` would have the same export path.
This does not currently play well with
`AbstractHierarchyIterator::ensure_writer`, where `writers` are cached
*by their export path*: it would cache a transform writer, but will skip
the subsequent data writer.
Additionally, another new `is_parent` flag is added to handle the case
where merging the Xform is invalid: objects that are parents to other
objects should remain unmerged as otherwise that would yield invalid USD
files.
[1] https://openusd.org/release/glossary.html#usdglossary-gprim
[2] https://openusd.org/release/glossary.html#usdglossary-instancing
[3] https://openusd.org/release/api/class_usd_geom_xformable.html
Co-authored-by: Odréanne Breton <odreanne.breton@ubisoft.com>
Co-authored-by: Sttevan Carnali Joga <sttevan.carnali-joga@ubisoft.com>
Co-authored-by: Charles Flèche <charles.fleche@ubisoft.com>
The selection framebuffer can be very small which leads
to different pixel density than the regular viewport.
Under this circumstance, gl_PointSize is a multiplier
of the viewport size in terms of selection radius.
Make sure `gl_PointSize` is set to 1 for selection.