Starting with MSVC 17.7 preview 3, /jumptablerdata is available and
allows to ensure switch tables don't get mixed with the code, helping on
performance when there is contention in a large switch statement, such
as in svm.h.
Pull Request: https://projects.blender.org/blender/blender/pulls/110470
The current face index can always be retrieved from the "loop_to_face"
map, so passing it around and updating it manually just adds more
state to track.
Utility functions make accessing the next and previous corner of a face
more obvious, and range based for loops make iterating over corners
or vertices in a face simpler too.
Bones with overlapping IK constraints would jump about unpredictably
when at least one of those constraints was either zero-influence or
disabled.
The underlying issue appears to be that depsgraph construction assumes
all IK constraints are enabled (which is necessary for e.g. animating
influence), but the IK solver code excludes disabled and zero-influence
constraints from the solve. This in turn leads to
`BKE_pose_where_is_bone` not getting called when needed in some cases.
This commit addresses the issue by always including all IK targets in
the solve even when disabled or zero-influence, and simply excluding
them from being applied.
See the discussion in #88752 for more details.
This patch was primarily authored by Brecht, but with a minor fix
by me after testing.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/110417
The cleanup of blenkernel last weeks , caused the house of cards to
collapse on top of bf_gpu's shader_builder, which is off by default
but used on a daily basis by the rendering team.
Given the fixes forward in #110394 ran into a ODR violation in OSL that
was hiding there for years, I don't see another way forward without
impeding the rendering teams productivity for "quite a while" as there
is no guarantee the OSL issue would be the end of it.
the only way forward appears to be back.
this reverts :
19422044edbd8e8d524db3d02768c4a52f5274be
a670b53abe82f7a36d2caa0d8ae2c67c2bc8c39a
0f541db97c47e5fcd1c71160d71642235d9ea743
be516e8c814dbf7bc43ea91c6913be9f7f96e006
3e88a2f44c413fa7f671f638409a975d59f8c1fb
4e64b772f5ed8f352c2744baece802f70e2430e7
9547e7a317d6f86ab8fbfb3d440f127c2ab75df2
07fe6c5a57d7bcf89318204c0319db1f4a2f5cbd
The problematic commit was 07fe6c5a57d7bcf89318204c0319db1f4a2f5cbd
as blenkernel links most of blender, it's a bit of a link order issue
magnet. Given all these commits stack, it's near impossible to revert
just that one without spending a significant amount of time resolving
merge conflicts. 99% of that work was automated, so easier to just
revert all of them, and re-do the work, than it is to deal with the
merge conflicts.
Pull Request: https://projects.blender.org/blender/blender/pulls/110438
No user visible changes expected. Used in the asset shelf branch,
see #104831.
These tooltips only show a label string and appear after a shorter timeout
than the regular tooltips. After the regular tooltip timeout they expand to
the full tooltip. The toolbar and properties editor navigation tabs make use
of this already.
The changes here enable more control over quick label tooltips, making them
usable in more cases, and less ad-hoc. Main changes:
- Refactors internal logic so a single `UI_BUT_HAS_TOOLTIP_LABEL` button flag
can be used to enable quick label tooltips. This decentralizes logic in a
way that's more consistent and extensible.
- Custom callback to return a quick label. This is useful when a label tooltip
should be displayed even when there is no button string set. E.g. in the
asset shelf with "Show Names" disabled.
Pull Request: https://projects.blender.org/blender/blender/pulls/110200
Move shared transform operations out of the 3D viewport key-map into a
template function which each modes key-map uses.
This allows sculpt mode to key-bindings which where bound to transform
actions that don't make sense in sculpt mode.
Note that this enables `alt_navigation` for some 2D viewport actions
where it's not yet used.
Based on design task: #105298.
PR !110019.
Co-authored-by: Julien Kaspar <JulienKaspar>
Tests should never depend on the users startup.blend which can have
settings that interfere with tests.
Failure to load the user startup.blend for e.g. prevented
bl_alembic_io_test from passing.
Blender allows animating the active camera selection (i.e. scene.camera)
by binding cameras to markers in the timeline. The dependency graph was
completely ignoring this by not building nodes for these cameras (it is
possible to reference a camera not directly included in the scene), and
not taking this into account in driver relations.
This change ensures that all cameras are included in the dependency
graph, and any drivers referencing scene.camera get dependencies on
all cameras of the timeline, and also time itself to ensure switches
are processed.
Pull Request #110139
The cause of that bug is any dependency on Scene COW, because that is
triggered by selection. Context properties merely are the most reasonable
way for that to happen. Therefore, the special rule should really apply
to any Scene references.
The real motivation is this removes dependency on dvar for when this
code is extracted as a new method in the next commit.
Pull Request #110139
Since markers are used to animate scene.camera, changing their camera
links carries the same consequences as changing scene.camera directly.
This means relations need rebuilding in case a new camera was added.
Pull Request #110139
Dependency building assumes scene.camera is fixed due to #107081.
Thus it is necessary to do a relations update when it does change.
Pull Request #110139
The Adjust Last Operation panel would attempt to use the main region,
even when the operator was initially executed in a different region.
This becomes an issue when the operator relies on context of the region.
For example the pose library gets the active asset from context, which
is only available in the region (e.g. asset shelf) displaying the
assets. In general it seems like redo should restore the region of
invocation.
This uses the region type from the initial operator call context to
lookup a region to restore on redo. While not completely bullet proof
(multiple regions of the same type may be present), this should mitigate
the issue quite a bit.
Required for #104831.
Pull Request: https://projects.blender.org/blender/blender/pulls/108892
Regions that change their size in the layout phase (something that is
supported for a while now) might affect the size of following regions.
For example the asset shelf design forsees that it takes space away from
the tool- and sidebar. When its size changes, tool- and sidebar need to
redraw.
Without this there is a crash in the `asset-shelf` branch:
- Open sidebar
- In the asset shelf Display Settings popover, toggle "Names" twice.
At first the sidebar will be empty, when toggling the second time a
null-dereference will cause a crash. This is because the layout phase of
the sidebar does not run, but after that the region size is updated,
it's tagged for redraw and the draw phase runs (without any layout).
Pull Request: https://projects.blender.org/blender/blender/pulls/110212
<algorithm> header include is missing from some sycl headers, this will
be fixed upstream with https://github.com/intel/llvm/pull/10424,
meanwhile, we work around it by including it directly.
- Avoid calling `.finish()` twice, only pass span
- Fix "opcities" typo
- Remove unnecessary "is_empty()" check
- Group creation of "src_data" in one block
- Remove periods after doxygen titles
- Remove unnecessary "curves" argument
- Order mutable argument last
Pull Request: https://projects.blender.org/blender/blender/pulls/110428
Regression in [0] changed the order of execution for the load_post
handler which previously (in 3.5x) ran before driver evaluation.
Calling either load_post/load_post_fail handlers after loading was
changed intentionally to simplify the code-path for calling handlers
however it meant the handler couldn't be used to setup drivers,
so restore the original logic.
[0]: 46be42f6b16314f59a37ebb430d77d12e7a88461
Each edit-generate now declares if it's generally considered safe
(isn't likely to make changes that break on other platforms for e.g.)
Default edits are now used when --edits is omitted.
The match argument now defaults to files with c/cc/cpp extensions when
omitted.
It's now possible to run:
./tools/utils_maintenance/code_clean.py {BUILD_DIR}
Which gives results that can be used with a very low risk of causing
functional changes or breaking other platforms.
source/blender/freestyle wasn't fillowing Blender's own
conventions for integer types.
This had the down-side of making the code_clean.py utility attempt to
replace `unsigned int` types which always failed.
While this edit could have been manually ignored for all files in
freestyle, add the typedef's to `FreestyleConfig.h` and follow Blender's
convention instead.
Implements part of #101689.
The "poly" name was chosen to distinguish the `MLoop` + `MPoly`
combination from the `MFace` struct it replaced. Those two structures
persisted together for a long time, but nowadays `MPoly` is gone, and
`MFace` is only used in some legacy code like the particle system.
To avoid unnecessarily using a different term, increase consistency
with the UI and with BMesh, and generally make code a bit easier to
read, this commit replaces the `poly` term with `poly`. Most variables
that use the term are renamed too. `Mesh.totface` and `Mesh.fdata` now
have a `_legacy` suffix to reduce confusion. In a next step, `pdata`
can be renamed to `face_data` as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/109819
- "Rename Channels": only one channel can be renamed at a time, use
singular.
- "Copy Markers to Scene": rephrase erroneous operator description.
- "Axis tag names with": grammar.
- "Close or open the selected stroke adding an edge from last to first
point": "segment" is preferred to "edge" elsewhere in the context of
curves or Grease Pencil.
- "Number of subdivisions [points] by edge[s]": replace "by edge" with
"per segment" for the same reason.
- "Compatibility mode for SL, OpenSim...": expand to explain that SL
and OpenSim are respectively Second Life and OpenSimulator.
- "W/m^2" -> "W/m²". This symbol is widely supported and should be
preferred for exponentiation outside of code.
- "Effect on tracks which are tracked less than specified amount of frames",
"Effect on tracks which have a larger reprojection error":
Use "Affect" and "number" instead of "amount".
- "Hull curve" -> "Envelope". This is a calque from German Hüllkurve
meaning envelope.
- "Frquency Cutoff" -> "Frequency Cutoff" (typo)
- "Check if Select Left or Right": rephrase to "Based on Mouse
Position" as it better explains the action of the operator.
- "Make cut event if strip is not selected ..." -> even (typo)
- "Shear selected items along the horizontal screen axis":
Rephrase as this transform operator can act in many different axes.
- Tonemapping compositing node: the two algorithms "R/D Photoreceptor"
and "Rh Simple" only had names, but no description. Add ones
explaining at least the basic principle and where the names come
from.
- In the "Matte dilate/erode side" description for the Keying node's
Dilate/Erode socket, "side" was likely a typo for "size".
Reformulate the description to make it clearer, inspired by similar
ones.
- "Width of the blur edge" -> "Width of the blur for the transition";
"Edge angle" -> "Angle of the transition";
"Wipe direction" -> "Whether to fade in or out":
Better explains the sequencer wipe transition (inspired by the manual).
- OSL shaders now supported on some GPU backends.
- "Add a new repeat input and output nodes " -> "Add new" (typo).
Pull Request: https://projects.blender.org/blender/blender/pulls/110321
Implementation of the stroke mode of the eraser tool for grease pencil.
In this mode, the eraser removes each stroke that it touches, meaning each stroke that either intersects the eraser or that has all points inside of it.
Pull Request: https://projects.blender.org/blender/blender/pulls/110304
The units defined in blenkernel/intern/unit.c were extracted using a
regex which contained `NULL`. Commit 129f78eee7 converted this file to
c++, and these `NULL` were replaced with `nullptr`, breaking the
regex.
This commit changes the regex to `nullptr` as well to restore the
translations.
Pull Request: https://projects.blender.org/blender/blender/pulls/110420
This is only used as temporary state while evaluating SVM nodes,
there's no point in storing it in the ShaderData for later.
Since ShaderData size is relevant for GPU performance, we should
save the space and only keep it where needed.
Pull Request: https://projects.blender.org/blender/blender/pulls/110366
Reduce indentation in two armature drawing functions, by flipping
conditions and using `continue` (instead of having the entire `for`-body
inside two nested conditions).
No functional changes.
In order to avoid navigation hotkey conflicts during transform
operations, this commit implements the "Transform Navigation with Alt"
option.
This option is enabled by default and makes navigation hotkeys require
the `Alt` key during a transforming in the 3D View.
Pull Request: https://projects.blender.org/blender/blender/pulls/109754