Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Viewport Backgrounds Images - Loading and Clearing
  RSS 2.0 ATOM  

Viewport Backgrounds Images - Loading and Clearing
Rate this thread
 
36282
 
Permlink of this thread  
avatar
  • Total Posts: 8
  • Joined: 07 November 2008 04:25 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!



Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

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 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 1
/img/forum/dark/default_avatar.png

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 :D

Author: hairball3d

Replied: 03 November 2009 10:10 AM