Blender Git Loki

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

Page: 12 / 26

July 30, 2021, 14:56 (GMT)
Fix T89982: Geometry Nodes: 'New' Button tries to create node_tree on active modifier, rather than button context

When done from the Properties Editor, the context's modifier should be
used (this is where the button is located), when done from elsewhere,
the active modifier is still the way to go (since the context modifier is
not available then)

Maniphest Tasks: T89982

Differential Revision: https://developer.blender.org/D11972
July 30, 2021, 14:56 (GMT)
Cleanup: Remove redundant forward declarations.
July 30, 2021, 14:56 (GMT)
Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")
July 30, 2021, 14:56 (GMT)
Pose Library: remove assumption about Action group names

Remove the assumption of the pose library that Action groups are named
after the bones in the armature. Even though this assumption is correct
when the keys are created by Blender, action groups can be renamed. Keys
created by Python scripts can also use arbitrary group names.

Since there is more code in Blender making this assumption, and looping
over selected bones is also a common occurrence, this commit contains
some generic functionality to aid in this:

- `BKE_armature_find_selected_bones`: function that iterates over all
bones in an armature and calls a callback for each selected one. It
returns a struct with info about the selection states (all or no bones
selected).
- `BKE_armature_find_selected_bone_names(armature)` uses the above
function to return a set of selected bone names.
- `BKE_pose_find_fcurves_with_bones()` calls a callback for each FCurve
in an Action that targets a bone, also passing it the bone name.
July 30, 2021, 14:56 (GMT)
Armature test: properly initialize bone hierarchy

Fix segfault in `BKE_armature_find_selected_bones_test` by property
initializing the bone hierarchy listbases.

No functional changes to Blender.
July 30, 2021, 14:56 (GMT)
Cleanup: reserve C++ comments for disabled code

Use C comments for plain text.
July 30, 2021, 14:56 (GMT)
Cleanup: Use const for internal file data of asset-handle

Note that the current asset-handle design is temporary, see
35affaa971cf. I still prefer this to be const, as code outside the
asset-list/file-list code should never mess with the file data of an
asset.
July 30, 2021, 14:56 (GMT)
Cleanup: Use asset utility function to get the asset .blend path

For this to work, the utility function needs to be callable without
context, which is only needed for a File Browser specific hack anyway
(doesn't apply to this usage of it).
July 30, 2021, 14:56 (GMT)
Cleanup: use single back-tick quoting in comments

While doxygen supports both, conform to our style guide.

Note that single back-tick's are already used in a majority of comments.
July 30, 2021, 14:56 (GMT)
Cleanup: Fix missing braces warning on Clang
July 30, 2021, 14:56 (GMT)
Cleanup: use '#if 0' for disabling multiple lines
July 30, 2021, 14:56 (GMT)
Asset: Clearly describe RNA property description as temporary

The asset handle design is only temporary (see 35affaa971cf) and this
RNA property is only needed for internal, technical reasons of the asset
view template. So although not nice, at least make it clear in the RNA
property description that this should not be used.
July 30, 2021, 14:56 (GMT)
Cleanup: fix clang-tidy warning modernize-use-nullptr

No functional changes.
July 30, 2021, 14:56 (GMT)
Cleanup: use named enum types.

Added ePreviewRenderMethod and ePreviewType.
July 30, 2021, 14:56 (GMT)
Cleanup: spelling
July 30, 2021, 14:56 (GMT)
Docs: Update RNA to user manual mappings
July 30, 2021, 14:56 (GMT)
Cleanup: Make function static, use const object argument

Also use `const Curve *` instead of `const Object *`, since the
function works at a lower level than objects anyway.

And also remove another unused function. Since this section of code
for converting curves to meshes will likely be replaced, it's nicer to
see which parts actually remain used at this point.
July 30, 2021, 14:56 (GMT)
Cleanup: quiet GCC maybe-uninitialized warning

Function signatures for snap callbacks used `const` incorrectly
which was hidden by casting function types.

This made it seem as if the input arguments wouldn't be change and
wouldn't be initialized.

Name return arguments with an `r_` prefix, order them last,
remove function casts and correct `const` usage.
July 30, 2021, 14:56 (GMT)
Fix T89827: Attribute transfer node crash on mesh with no faces

Just add a check for whether the mesh has faces when retrieving an
attribute on the corner domain. In the future there could be an info
message in the node in this case, since maybe it's not intuitive.
July 30, 2021, 14:56 (GMT)
Fix i18n utils_cli mistake.

Reported by James Monthea (@jmonteath), thanks.
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021