Added commands to copy material tables if they are defined, and the action has been requested.