It's safer to pass a type so that it can be checked if delete should be
used instead. Also changes a few void pointer casts to const_cast so that
if the data becomes typed it's an error.
Pull Request: https://projects.blender.org/blender/blender/pulls/137404
The operator "Interactive Light Track to Cursor" did not auto-key
rotation values previously, this fix makes sure that rotation property
is keyed after the operator has finished transforming the object. The
rotation property that's keyed depends on the rotation mode of the
object.
Pull Request: https://projects.blender.org/blender/blender/pulls/137796
This patch turns the options of the Chroma Key node into inputs.
In the process, the minimum and maximum angles were renamed to Minimum
and Maximum for consistency with other matte nodes.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/137812
This patch changes the default macOS x64 linker from the slower legacy
"classic" linker, to the much faster default modern macOS linker. A new
CMake option `WITH_LEGACY_MACOS_X64_LINKER` was also introduced to use
the old linker, set to OFF by default.
As an example from testing on an Intel Macbook, this makes linking time
go from 3min25s to 10s after this change. The reason why the legacy
linker was enforced on x64 in the first place was to silence "platform
load command not found" warnings during linking. Since this behavior is
still desired on the BuildBot, the `WITH_LEGACY_MACOS_X64_LINKER` option
is enforced in the BuildBot macOS configs.
Pull Request: https://projects.blender.org/blender/blender/pulls/134639
As of dde0765de2, jemalloc is enabled by default when found.
As of dde0765de2, jemalloc is enabled by default when found.
There is also no active plan to use it on all platforms, i.e.
on Windows tbbmalloc is used.
When it doesn't exist, there is simply a warning:
```
-- Could NOT find JeMalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
-- JeMalloc not found, disabling WITH_MEM_JEMALLOC
```
Pull Request: https://projects.blender.org/blender/blender/pulls/137743
Reduce the usage of raw `char *` and `std::string` in a variety of
places where they weren't needed.
General notes:
- Anything used for output or reporting needs to be `StringRefNull`
- No additional strlen calls should be incurred beyond what was already
present
- Memory lifetime is still valid according to ASAN
Pull Request: https://projects.blender.org/blender/blender/pulls/137747
The arrays for CustomData layers aren't necessarily allocated with the guarded
allocator. Their ownership is managed by the implicit sharing system which is
required for CustomData layer data.
This allows writing e.g. `ptr.data_as<bNode>()` as an alternative to
`static_cast<bNode *>(ptr.data)`. There are a couple of benefits to this approach:
* It's less verbose.
* Reduces the amount of "forced" usages of `static_cast`.
* Allows us to add run-time type checks in that method.
The run-time type checks are not implemented in this patch, I'm still trying
to find a good way to do that. However, even without that, this patch improves
the situation already.
Pull Request: https://projects.blender.org/blender/blender/pulls/137720
Mistake in 1f680c3859
Fix that by moving the grease pencil processing into the existing
`modify_geometry_sets` loops instead. And then make a few small
changes to reduce the amount of boilerplate lines that introduces.
Pull Request: https://projects.blender.org/blender/blender/pulls/137732
This adds two new python properties to `GreasePencilStrokePoint`
* `select_handle_left`: The selection of the left handle of this point
* `select_handle_right`: The selection of the right handle of this point
These could already be written to using `drawing.attributes[".selection_handle_left"]`
and `drawing.attributes[".selection_handle_right"]`, but this makes it
easier to work on individual points from the higher-level
python API.
Resolves#137639.
Pull Request: https://projects.blender.org/blender/blender/pulls/137730
Allows to log human-readable list of recalc bits that are set.
The usage is pretty simple:
```
printf("%s: %s %s\n", __func__, id->name, DEG_stringify_recalc_flags(id->recalc).c_str());
```
Pull Request: https://projects.blender.org/blender/blender/pulls/137715
Rather than trying to change the order of layers to match the evaluated
Grease Pencil geometry, keep the original layer order for now.
Generally, it's less common to change the layer order of original
layers inside a modifier. It's much more common to have the
evaluated layers and original layers in the same order, so for now,
keep the original order instead.
To correctly support this, we probably need to propagate layer groups
inside of geometry nodes. Currently, layer groups are mostly
ignored inside of evaluated data.
Part of #136300.
Pull Request: https://projects.blender.org/blender/blender/pulls/137727
This patch turns the options of the Vector Blur node into inputs.
In the process, the factor input was renamed to Shutter and was remapped
to match the shutter in Cycles/EEVEE.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/137725
This patch turns the options of the Anti-Alias node into inputs.
In the process, the [0, 1] limit of the Contrast Limit input was lifted
to allow normalized arbitrary positive limits.
Reference #137223.
Pull Request: https://projects.blender.org/blender/blender/pulls/137717
This makes it possible to search layer names in the
`Named Layer Selection` node as well as boolean
modifier inputs that are marked as a `Layer Selection`.
The layer selection UI is slightly updated:
* Use a slightly larger default width for the
`Named Layer Selection` node.
* Use the layer icon in the field that search for layer names.
* Use `Layer` placeholder string
Pull Request: https://projects.blender.org/blender/blender/pulls/137273
Deleting all points creates an empty CurvesGeometry object, all previous
attributes are lost that way. Use resize(0, 0) instead, this preserves the attributes list.
Pull Request: https://projects.blender.org/blender/blender/pulls/137511
While working on #136907, I noticed issues with how we position and size
elements in the File/Asset Browser:
- A padding meant for outside the list "tiles" was applied inside, resulting
in unnecessary/unintended extra space between previews and their label, and
too small vertical paddings between tiles (see screenshots in PR).
- The height of text was measured based on the font size (not the actual line
height) and scaled up by some arbitrary amount. Made it hard to draw
multi-line text well, as done in #136907.
- Icons in list views were not centered vertically.
- The vertical list offset the entire list by the padding meant for tiles. Not
quite sure if intentional, I think it looks better with it. But code was
confusing since suddenly this extra tile padding was thrown in. Should be a
separate padding.
All these changes are a bit intertwined, so submitting them together.
Basically this makes paddings be applied more consistently and fixes related
issues, so the code makes much more sense.
Pull Request: https://projects.blender.org/blender/blender/pulls/137675
The interactive compositor crashes if the scene resolution is changed
after rendering. That's because the compositor queries its render size
from the scene directly, which might be different from the size that was
already rendered.
To fix this, the compositor should use the size of the existing render
result if available, while it should fallback to the scene resolution.
Pull Request: https://projects.blender.org/blender/blender/pulls/137674
Color picker supports palette color picking by clicking during the modal
operator, but it will set initial color on the color property when
exiting from palette color picking, but it didn't send out a notifier
which means interface would kept showing last hovering color.
This fix also included a more obvious visual notification on the bottom
bar so the mode change gets more attention and would be harder to miss.
-------
This PR makes it so that if you clicked while holding `Shift + X`, this info would prompt on the bottom bar, this may need interface to look & decide whether that's needed because previously the string change wasn't eye-catchy enough:
<img width="194" alt="图片" src="attachments/5185f05a-54c2-45b9-acf9-3a0da8d686bb">
Pull Request: https://projects.blender.org/blender/blender/pulls/128842
As reported in blender/blender#137517, a regression was introduced
where certain features (Normals, tangents, window) would not render
properly when using adaptive subdivision. Presumably this issue slipped
through testing, so this commit adds a test to test this.
Ref: blender/blender-test-data!85
Instead of skipping `update_sculpt_normal` entirely, we should avoid
doing the extra sampled calculation when we know we have a valid plane
normal.
This better aligns with future refactors to avoid both caclulating and
setting values inside `calc_brush_plane`.
Pull Request: https://projects.blender.org/blender/blender/pulls/137689
When creating the `axismtx` in `SeqToTransData`, the strip's rotation
needs to be multiplied by the mirror values.
This adjustment effectively multiplies the rotation by -1 when a mirror
is active, resulting in the `axismtx` being correct. This process is
essentially the same as in #136004.
The `axismtx` is utilized in various transform modes, such as
`transform_mode_translate`.
Pull Request: https://projects.blender.org/blender/blender/pulls/137489
Using the same sized grids as the brush tests, this commit uses the
`sculpt.optimize` operator to approximate the cost of rebuilding the BVH
for a given base mesh grid, multires grid, and dyntopo grid.
Pull Request: https://projects.blender.org/blender/blender/pulls/137690
In new asset browser popover "Import Settings" there are new options
for instancing. Naming of properties wasn't clear enough at a glance, and
it reuses terms "Link" and "Append" which are used way too frequently and
can be mistaken for something else. This commit clarifies what parameters
do in labels.
See Images attached in PR description.
Pull Request: https://projects.blender.org/blender/blender/pulls/137295
This adds a small feature to the script that generates a list of
bug reports per release to help users of the script sort reverted fix
commits.
This comes in the form of the script presenting you with the commit
message for each revert commit and asking you what commit hash was
reverted (The hash should hopefully be in the commit message.)
Pull Request: https://projects.blender.org/blender/blender/pulls/137582
The `initial_normal` and `initial_normal_symm` values used for the "Area
Normal" automasking functionality are not set inside
`update_sculpt_normal`, therefore this check and subsequent processing
can be removed.
Pull Request: https://projects.blender.org/blender/blender/pulls/137693