Based on patch from @lazydodo. Reviewers: sergey Differential Revision: https://developer.blender.org/D2661