I was looking at some of the changes to the SU Ruby API; SketchUp API Blog: What's New in SketchUp 7
One thing which caught my attention:
New “model level” callbacks in ModelObserver
def onActivePathChanged(model) { # Detect edit mode }
def onPlaceComponent(instance) { # Detect placements }
def onExplode(model) { # Detect group/component explode }
def onBeforeComponentSaveAs(instance) { # Add data on save
Would it be possible with onBeforeComponentSaveAs to save components which store the V-Ray materials along with them?