Viewport Backgrounds Images - Loading and Clearing

Viewport Backgrounds Images - Loading and Clearing

Anonymous
Not applicable
277 Views
2 Replies
Message 1 of 3

Viewport Backgrounds Images - Loading and Clearing

Anonymous
Not applicable
Hello there. I am on a mission to figure out why this is not working for me.
What I am attempting to do is have the ability to assign an image to a viewport background as well as remove any image from a specific viewport.

I am having difficulty finding a direct reference to the map assigned to the viewport after it's assigned.

So far I understand that while i have a specific viewport active, i can query its background image like so:

viewport.activeviewport = 1
myBGImage = backgroundImageFilename


The problem is that if i want to map a single viewport's background image using the same syntax, it makes the changes on all 4 viewports.

viewport.activeviewport = 1
backgroundImageFilename = "D:\Dummy_Texture.png"


Which is the same issue if I want to clear a single viewport's image, and not all 4:

viewport.activeviewport = 1
backgroundImageFilename = ""


I have attempted other things like:

myBitmap = bitMapTexture()
myBitmap.fileName = "D:\Dummy_Texture.png"
setAsBackground myBitmap.bitmap


...and I get the same result.

Any ideas? is there any way to reference a specific viewport's background image and replace it in any other way than modifying a global variable?

Thanks!
0 Likes
278 Views
2 Replies
Replies (2)
Message 2 of 3

Steve_Curley
Mentor
Mentor
Darned if I can get it to work "as expected" either. Must be possible because the normal dialog (Alt+B) manages it.
May be possible by opening that dialog and using the UIAccessor calls, but it will be messy.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes
Message 3 of 3

Anonymous
Not applicable
Hum.. well that is another possibility. I was trying to just bypass that window all together but it is an option until I find the answer. Thanks for taking the time to read and reply 😄
0 Likes