As pointed out by @pablovazquez the selection behavior
of the face loop selection in paint modes was missing the toggle feature.
The logic goes like this:
If any of the 2 adjacent faces to the selected edge are selected,
deselect instead of select.
There is still an inconsistency which I left in for this patch,
but is up to discussion.
CTRL+ALT+SHIFT click does an actual deselect in paint mode.
In edit mode it does toggle as well, just as ALT+SHIFT click
I can remove that feature if it isn't wanted
Pull Request: https://projects.blender.org/blender/blender/pulls/108753
The graph editor has the function to hide the display of FCurves and to only draw keyframes on selected curves.
Both options were not respected when executing the frame jump operator,
meaning it would jump to potentially hidden keyframes.
This patch adds a new operator that is specific to the Graph Editor and that respects those features.
The only possible issue that could arise from this is a slight confusion for the user
why they behave differently between editors.
Especially with only the Graph Editor and the 3D view open.
In general I think it's an improvement and follows the "you can only modify what you see" mantra in blender
Also
Resolves#97701
Pull Request: https://projects.blender.org/blender/blender/pulls/108549
Issue here was that Quick Favorites use a property's **identifier** when
adding [which is the bare name without brackets etc. from id properties]
but when spawning the actual menu, `RNA_struct_find_property` expects
the identifier to already include the brackets to know these are id
properties (later on in `screen_user_menu_draw`).
So to solve this, now include the needed syntax when storing the
`bUserMenuItem_Prop` identfier.
Seems the quickest way to append the needed characters is using
`RNA_path_property_py` (not sure if there are better ways to do this).
Also note that we (need to) ignore the actual array index constructing
the string [always pass -1 here] since the index is handled separately [I
tested boolean arrays and these work].
Pull Request: https://projects.blender.org/blender/blender/pulls/108713
This implements the `VIEW3D_OT_select_box` for the new grease pencil data-block.
Note that this also adds a `get_evaluated_grease_pencil_drawing_deformation` function, but there are TODOs left.
This will have to be updated once the modifier logic is in place.
Pull Request: https://projects.blender.org/blender/blender/pulls/108661
Asset data can now be copied in Python via assignment to
`id.asset_data`, so for example `dest.asset_data = source.asset_data`.
This copies the description, license, author, etc. fields, as well as
the tags and the asset catalog assignment.
This is intended to be used in the pose library, when updating a pose by
simply creating a new asset and having that replace the old one.
This is intentionally taking a copy, even though the above use case
could have sufficed with a higher-level 'move' function. By exposing
this as a copy, it can be used in a wider range of situations, from
whatever Python code wants to use it. This could include copying the
asset data from the active asset to all the other selected ones.
Any pre-existing asset data is freed before the copy is assigned. The
target ID MUST be marked as asset already for the assignment to work.
Assigning `None` to clear the asset status is not allowed. Instead
`.asset_mark()` resp. `.asset_clear()` should be used. This limitation
is in place to simplify the API, and to ensure that there is only one
way in which assets are marked/cleared, making it easier to change the
internals of the asset system without API changes.
Example code:
```python
src = bpy.data.objects['Suzanne']
dst = bpy.data.objects['Cube']
dst.asset_mark()
dst.asset_data = src.asset_data
```
Pull Request: https://projects.blender.org/blender/blender/pulls/108547
This makes tracking shaders easier across the pipeline. Durring logging
and debugging the vulkan driver now remembers the shader associate to
the descriptor and provides this information in its messages.
Pull Request: https://projects.blender.org/blender/blender/pulls/108743
Adds support to create SRGBA8 textures using UBYTE as input data.
It is assumed that the UBYTE are already converted to SRGB and no
conversion actually needs to happen.
Pull Request: https://projects.blender.org/blender/blender/pulls/108741
Some vulkan platforms don't support 24bit depth components. In this
case we will allocate float depth component. During readback the data
should be converted back to what is expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/108698
During uv unwrapping and uv packing, certain floating point algorithms
have extreme sensitivity to round-off errors. These can produce very
different layouts even when given inputs which are only slightly different.
The root cause is that the two main types of CPUs used to run Blender,
namely x86 and Apple Silicon, produce slightly different results on some
math functions, including `sinf()`, `cosf()` and `atan2f()`.
* sinf(0.8960554599761962890625) = 0.780868828296661376953125 (Intel i7)
* sinf(0.8960554599761962890625) = 0.78086888790130615234375 (Apple M1)
This fix, and others that came before it [0], improve accuracy by using
double-precision to hide the differences between the CPUs.
[0] e.g. 0eba9e41bf
[1] See also #107829
In `transdata_get_time_shuffle_offset_side`, the tolerance for
terminating the loop is too tight, sometimes it will lead to a infinite
loop due to non-integral start/end values. Now fixed.
Pull Request: https://projects.blender.org/blender/blender/pulls/108257
When opening 'homefile' (i.e. startup or factory startup) at Blender
start (i.e. when there is no existing WM yet), the size of the windows
in the newly read WM is reset to zero, which will then cause `WM_check`
to re-size them the the maximum possible size on current monitor.
Regression from ebb5643e59.
Caused by 98bfa8d458
Occlusion must consider several factors:
- The `Viewport Display` > `Display As` setting of the object.
- The X-Ray mode of the scene.
- Whether only Snap to Face is being used.
- Whether Snap is set to Cage (always transparent) in edit mode.
- Whether the object is hidden.
In the case of Cage, the final geometry should be utilized for occlusion.
However, to prevent excessive and risky modifications, it was followed
the same approach as before and verified the `Display As` setting of
the object.
This includes square root and reciprocal, and their safe versions.
For the reciprocal use name rcp, which matches Cycles and allows
to implement the same function for per-element operation on matrices.
Pull Request: https://projects.blender.org/blender/blender/pulls/108705
In particular, the root was not sticking to mesh with hair dynamics.
Reason for this is missing HairKey weight upon conversion (everything
had zero weight). This then can not be corrected (since weight tool does
not allow to paint on roots).
So now, give the hair a default 1.0 to 0.0 weight gradient upon
conversion [which is in line with the default weight distribution for a
hair particle system].
Pull Request: https://projects.blender.org/blender/blender/pulls/108651
This patch implements the Movie Distortion node for the realtime
compositor. The distorted coordinates are computed and cached for a
particular tracking camera distortion parameters. So for expensive
distortion models, the first run will take some time to compute, but
subsequent runs will be fast.
An alternative implementation would be to implement each of the
distortion modes in the shader, but that was decided against for a few
reasons:
1. We want to hide the implementation details of the distortion models,
since it is provided through an external library (Libmv).
2. Some distortion models are expensive to solve accurately, and can be
quite slow to solve each time the shader runs.
3. The typical usage of the node does not involve interactive editing of
the distortion parameters, rather, the parameters are computed during
camera calibration, so caching seems most fitting in that case.
Pull Request: https://projects.blender.org/blender/blender/pulls/108230