Forward port !623: Access to shared_ptr for material
This MR includes the changes from !623 (merged) introduced to the v0.9.X
line into the master line.
This MR includes the changes from !623 (merged) introduced to the v0.9.X
line into the master line.