Page MenuHome

Fix T61051: crash with multi-object mixed mode snapping
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Thu, Jan 31, 1:04 PM.

Details

Summary

Fix T61051: crash with multi-object mixed mode snapping

rBec3357e03ab1 introduced multi-object snapping.
Seems like this was done without mixed-mode selections in mind.

So code assumes that all selected objects are actually armatures [which can fail].
In 2.7 this was not a problem, because code only took active object into account, 2.8 was iterating over all selected_editable_objects.

Now just iterate over objects in posemode instead

Diff Detail

Repository
rB Blender

Event Timeline

note: alternatively we could use BKE_view_layer_array_from_objects_in_mode instead of CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) to be a bit more precise from the start?

Dalai Felinto (dfelinto) requested changes to this revision.Thu, Jan 31, 10:11 PM

BKE_view_layer_array_from_objects_in_mode is better indeed.
Besides remember to make comments full sentences, with capital letter at the beginning and a full stop in the end.

This revision now requires changes to proceed.Thu, Jan 31, 10:11 PM

use BKE_view_layer_array_from_objects_in_mode

Philipp Oeser (lichtwerk) edited the summary of this revision. (Show Details)
This revision was not accepted when it landed; it landed in state Needs Review.Wed, Feb 6, 9:49 AM
This revision was automatically updated to reflect the committed changes.