The ShapeAppearance is a list of materials and thus assigning a color with 'obj.ViewObject.ShapeAppearance.DiffuseColor = color' is incorrect. But doing it with 'obj.ViewObject.ShapeAppearance[0].DiffuseColor = color' doesn't work as expected because the internal notification doesn't work with a list. So, the only viable way is to revert the changes and do it by assigning the color to the 'ShapeColor' attribute.