This is an increment of the proposed changes in D4507. Differential Revision: https://developer.blender.org/D5303
D4507 by @LazyDodo w/ edits & moved into own module.