As stated by anyone who has worked on the transformation code, the current code situation is a mess.
It tries a generic solution using callbacks for each type of transformation: rotation, scaling, translating, to sphere, shear, shrink/fatten, bone size, edge/vert slide and others.
The initial idea is good, but with the constant addition of new features, some files have now more than 9000 lines of code, and it is not uncommon to find old workarounds.
- D5819: Split transform.c in multiple files
- Split each type of object in transform_conversions.c into files like: transform_convert_armature.c, transform_convert_nodes.c, transform_convert_textspace.c ... etc;
- Rearrange custom_data members according to type and mode of transformation;
- Rename functions to better indicate which ones are callbacks and which ones are static utilities;
- T69818: Transform: Rethink the flags used in 't->flag'
Other solutions can be added later as the refacor is in process.
Once one of the changes listed is done on a branch or patch it can be applied to the master. (It's a huge and dynamic project, so it doesn't seem practical to split attention on different branches).