Re #8069. Moving implementation from header to source.
Re #8069. Changing log message.
Merge remote-tracking branch 'origin/feature/8069_setsamplematerial_log'