PDA

View Full Version : Viewport Backgrounds - Loading and Clearing


Hairball
11-03-2009, 08:34 PM
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!

CGTalk Moderation
11-03-2009, 08:34 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.