Page MenuHome

Depsgraph: skip parentbone relation if bone prop is empty
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Sep 3 2021, 12:18 PM.

Details

Summary

Clearing the Parent Bone field in relations would result in something
like this:

add_relation(Bone Parent) - Could not find op_from
(ComponentKey(OBArmature, BONE))
add_relation(Bone Parent) - Failed, but op_to (ComponentKey(OBEmpty,
TRANSFORM)) was ok
ERROR (bke.object): /source/blender/blenkernel/intern\object.c:3330
ob_parbone: Object Empty with Bone parent: bone  doesn't exist

Now skip creation of a depsgraph relation if the Parent Bone field is
empty (since this would be invalid anyways).

Also improve message in ob_parbone() about the missing Parent Bone:

  • lower to warning (might be debatable, but this is not really

malfunctioning and e.g. constraints/modifiers dont spit out errors if
targets are not specified)

  • clarify _what_ of the two actualy does not exist

ref. T91101

Diff Detail

Repository
rB Blender