Question

Is it possible to programatically set Petrel's Window3D's background color?

I saw that you can use the ISettingsInfo to get/set the color, but I am wanting to know how to make the window's background update.

Was it helpful?

Solution

Beginning in 2012.1 you can get (or set) the background color for a Window3D by querying for the appropriate IColorInfoFactory and getting the ColorInfo instance for the window in question. However, this only applies when the window is toggled to its non-black state.

The Petrel 3D Window's "Change background color" function toggles between black and the color specified in the window's Settings tab. Unfortunately, the ColorInfo API only exposes that color from the Settings tab, so as of 2012, there is no way to know whether the window is currently toggled to a black background or to the specified color.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top