fix to materialdef support for heirarchy. save and load from dialog editor