Added helper for setting material to an object, and for creating a simple dialog with a "Run" button. Clicking the button runs a given callback.