This initialization function was massive with lots of local variables, quite hard to follow. Splitting up doesn't make it perfectly clear, but a bit better. The changes are mostly quite mechanical splitting apart code, plus a few new temporary structs for passing data without too many confusing args. No intentional changes to functionality. Reviewed By: psy-fi Differential Revision: https://developer.blender.org/D1035