In order to define a contextual action for 3D Windows, you need to put your Python script in your Python directory under a directory called Contextual_3D_Window.
Go to Tools->Options->Environment->Python Scripts (or Tools->Options->Python->Scripts in INTViewer 5.2) and click "Refresh from Disk". Your script should be listed automatically.
You will now be able to execute this script from the contextual menu of the 3D Window:
This script take a 3D Window, adds color bar to the bottom of the window and then creates an export image for every possible layer selection.
This script is attached to the bottom of this article.
The script was executed against the below 3D Window and the following three images were produced.
Export Image when Well 3D Layer is selected:
Export Image when Seismic Volume Layer is selected:
Export Image when Horizon 3D Layer is selected