Implementation of User Preferences using Blender's built-in system.

Patch by Kopias (github.com/kopias), with a few tweaks from me.