It seems to be complex to fully resolve this, e.g. if different colors or materials are used on single faces. Nevertheless, the following approach works for single-color parts.
As written in the posts above, changing the color manually (to another color and then back to the desired color) resolves the problem. However, doing this manually after each change is annoying.
Hence, the following macro automates the process. Just select all (top-level) objects that have been modified and then run the macro. It will first invert the color and transparency values and then set the original values again.
Code: Select all
# -*- coding: utf-8 -*- import FreeCAD selection = FreeCADGui.Selection.getSelection() for item in selection: tempColor = item.ViewObject.ShapeColor transparency = item.ViewObject.Transparency # Invert the color of all selected shapes. item.ViewObject.ShapeColor = (1 - tempColor, 1 - tempColor, 1 - tempColor) item.ViewObject.Transparency = 100 - item.ViewObject.Transparency # Reset the original color. item.ViewObject.ShapeColor = tempColor item.ViewObject.Transparency = transparency