Fix T50216
ClosedPublic

Authored by Luca Rood (LucaRood) on Dec 11 2016, 11:16 PM.

Details

Summary

Weight transfer was not checking the source mesh for edges and faces, even when using edge and face mappings. This caused a segfault when selecting one of those mappings with a source mesh with zero faces or edges. This diff adds checks to see if the mesh has the required geometry, and reports an error if it doesn't.

Diff Detail

Repository
rB Blender
Bastien Montagne (mont29) added inline comments.
source/blender/blenkernel/intern/data_transfer.c
1216–1217

Let’s stick to the word 'polygon', as in the other error messages here.

1268–1273

Not needed, number of edges in src and dst is checked below anyway.

1276–1277

Let’s stick to the word 'polygon', as in the other error messages here.

1345–1350

Not needed, number of polys in src and dst is checked below anyway.

1415–1420

Not needed, number of polys in src and dst is checked below anyway.

This revision is now accepted and ready to land.Dec 16 2016, 10:40 AM

Regarding the redundant checks, I added those to provide better error messages in those circumstances, however, looking at it again, they don't really seem better at all, so I'll remove them.

Regarding the use of "faces" instead of "polygons", I was aiming for consistency with the UI, where they are referred to as "faces" in the mappings and whatnot. I think it would be strange for the user to be warned he can't use one of the "face" mappings because the mesh doesn't have any "polygons". So perhaps it would be better to instead change the existing error messages to say "faces" too, what do you think?

Regarding the use of "faces" instead of "polygons", I was aiming for consistency with the UI, where they are referred to as "faces" in the mappings and whatnot. I think it would be strange for the user to be warned he can't use one of the "face" mappings because the mesh doesn't have any "polygons". So perhaps it would be better to instead change the existing error messages to say "faces" too, what do you think?

Eh, yes, good point, then rename ’em all to “face” ;)

This revision was automatically updated to reflect the committed changes.