Blender Git Commits

Blender Git "soc-2021-porting-modifiers-to-nodes-decimate" branch commits.

Page: 16 / 18

July 30, 2021, 14:51 (GMT)
Animation: new pose library based on Asset Browser

Introduce new pose library, based on the Asset Browser. Contrary to the
old pose library (in `editors/armature/pose_lib.c`), which stored an
entire library of poses in an `Action`, in the new library each pose is
its own `Action` datablock. This is done for compatibility with the
asset browser, and also to make it easier to attach preview images,
share datablocks, etc. Furthermore, it opens the door to having
animation snippets in the pose library as well.

This commit contains the C code for the pose library; in order to fully
use it, an addon is required as well (which will be committed shortly).
July 30, 2021, 14:51 (GMT)
Assets: Initial Asset List as part of the Asset System design

Implements a basic, WIP version of the asset list. This is needed to
give the asset view UI template asset reading and displaying
functionality.

See:
* Asset System: Data Storage, Reading & UI Access - https://developer.blender.org/T88184

Especially the asset list internals should change. It uses the
File/Asset Browser's `FileList` API, which isn't really meant for access
from outside the File Browser. But as explained in T88184, it does a lot
of the stuff we currently need, so we (Sybren St�vel and I) decided to
go this route for now. Work on a file-list rewrite which integrates well
with the asset system started in the `asset-system-filelist` branch.

Further includes:
* Operator to reload the asset list.
* New `bpy.types.AssetHandle.get_full_library_path()` function, which
gets the full path of the asset via the asset-list.
* Changes to preview loading to prevent the preview loading job to run
eternally for asset views. File Browsers have this issue too, but
should be fixed separately.
July 30, 2021, 14:51 (GMT)
UI: UI list refactor & preparations for asset view template

This is more of a first-pass refactor for the UI list template. More
improvements could be done, but that's better done separately. Main
purpose of this is to make the UI list code more manageable and ready
for the asset view template.

No functional changes for users.

* Split the huge template function into more manageable functions, with
clear names and a few structs with high coherency.
* Move runtime data management to the template code, with a free
callback called from BKE. This is UI data and should be managed at
that level.
* Replace boolean arguments with bit-flags (easily extendable and more
readable from the caller).
* Allow passing custom-data to the UI list for callbacks to access.
* Make list grip button for resizing optional.
* Put logic for generating the internal UI list identifier (stored in
.blends) into function. This is a quite important bit and a later
commit adds a related function. Good to have a clear API for this.
* Improve naming, comments, etc.

As part of further cleanups I'd like to move this to an own file.
July 30, 2021, 14:51 (GMT)
File/Asset Browser: Extend file-entry and asset handle Python API

Adds the following to `bpy.types.FileSelectEntry`:
* `id_type`: The data-block type the file represenets, if any.
* `local_id`: The local data-block it represents, if any (assets only).

And the following to `bpy.types.AssetHandle`:
* `local_id`: The local data-block the asset represents, if any.

This kind of information and the references are important for asset related
operators and UIs. They will be used by upcoming Pose Library features.
July 30, 2021, 14:51 (GMT)
UI: Internal support for custom UI list item drag & activate operators

For pose libraries, we need to be able to apply a pose whenever
activating (clicking) an item in the Pose Library asset view and blend
it by dragging (press & move). And since we want to allow Python scripts
to define what happens at least when activating an asset (so they can
define for example a custom "Apply" operator for preset assets), it
makes sense to just let them pass an operator name to the asset view
template. The template will be introduced in a following commit.
July 30, 2021, 14:51 (GMT)
Cleanup: Use const for UI icon getter function
July 30, 2021, 14:51 (GMT)
Animation: apply pose to all or selected bones of armature

New function `BKE_pose_apply_action_all_bones()`, which will be
necessary for the upcoming pose library v2.0.

This renames the function `BKE_pose_apply_action` to
`BKE_pose_apply_action_selected_bones`, to reflect that it only works on
selected bones, to contrast it to the new function.
July 30, 2021, 14:51 (GMT)
UI: Support left-right arrow key walk navigation in UI lists

Add improved arrow key walk navigation in grid layout UI List templates.
Pressing up or down walks the active item to the adjacent row in that
direction, while left and right walk through the items along the columns
wrapping at the rows.

Note from Julian:
In combination with the following commit, this has the important
limitation that the list's custom activate operator won't be called when
"walking over" an item that is scrolled out of the list. That is because
we don't actually create any buttons for those that could be used for
the handling logic. For our purposes of the pose libraries that should
be fine since the asset view list is always made big enough to display
all items. Solving this might be difficult, we don't properly support
nesting boxes with proper scrolling in regular layouts. It's all just
hacked a bit for UI-lists to work. Overlaps quite a bit with T86149.

Differential Revision: https://developer.blender.org/D11063
July 30, 2021, 14:51 (GMT)
Fix T89870: Vertex groups lost when opening 3.0 files in 2.93

The original refactor for vertex groups (3b6ee8cee708)
forgot to bump the minimum file requirement.

I'm also bumping the subversion to 12 so everyone can switch to a
working subversion number.

Differential Revision: https://developer.blender.org/D11931
July 30, 2021, 14:51 (GMT)
Cleanup: use raw strings, quiet clang-tidy warnings
July 30, 2021, 14:51 (GMT)
Cleanup: improve comments, remove debug printf
July 30, 2021, 14:51 (GMT)
Fix: missing null check

This was a regression in rB3b6ee8cee7080af200e25e944fe30d310240e138.
July 30, 2021, 14:51 (GMT)
Cleanup: clang-format
July 30, 2021, 14:51 (GMT)
Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")

This shows the text as part of the assertion message.
July 30, 2021, 14:51 (GMT)
Keymap: use Shift-Tab to toggle snap in the sequencer

Match the same shortcut for the 3D view & UV editor.
July 30, 2021, 14:51 (GMT)
Cleanup: LayerCollection resync: Proper `r_` prefix for return function parameter.
July 30, 2021, 14:51 (GMT)
Keymap: use Alt-Q instead of D for transfer mode operator

This now works in all modes (not just sculpt) and activates on press
instead of release. See design task T89757.
July 30, 2021, 14:51 (GMT)
macOS/glog: Silence syscall deprecation warning

Upstream will release the fix in 0.6 which will take time.
Silence two warnings.

Differential Revision: https://developer.blender.org/D11246
July 30, 2021, 14:51 (GMT)
Add support for RISC-V architecture

* On RISC-V GCC 10.3 does not define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_n.
* Avoid a build error
"Please add support for your platform in build_config.h"
Cf: https://github.com/sergeyvfx/libNumaAPI/pull/3

Differential Revision: https://developer.blender.org/D11910
July 30, 2021, 14:51 (GMT)
Fix T88188: Allow keyframing vertex mass in cloth sim

Update vertex weights between simulation steps if they have changed.
This allows for animated vertex weights in the cloth sim.

Reviewed By: Sebastian Parborg

Differential Revision: https://developer.blender.org/D11640
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021