[Closed] backgroundImageFileName and active viewport
it’s kinda tricky but… :
fn setBackgroundImage image view: =
(
if view == unsupplied do view = viewport.activeViewport
for k=1 to 4 where k != view do
(
viewport.activeViewport = k
backgroundImageFileName = ""
viewport.DispBkgImage = off
)
viewport.activeViewport = view
backgroundImageFileName = image
viewport.DispBkgImage = on
)
/*
setBackgroundImage (getDir #maxroot + "\\maps\\BIGLEAF3.TGA") view:1
*/
AFAIK, you can’t. You may be able to hack around using Windows Structure or UIAccessor to launch the dialog, set the desired settings, and close it.
-Eric
Thanks for your script but I do not want to loose background in other views (20 cameras and 20bg in one scene). So it does not solve my problem. Thanks and sorry for not describe my problem correctly on beginning. So it is not possible. It is kind a strange.
20 cameras and 20bg doesn’t make any sense. MAX has only four viewports. So we have to care about only four background images. It’s easy to keep them. Store the active view index, collect all images on first loop, replace the active one with new image, set the list of images back on second loop, and set the active viewport back.
Just use Martin Breidt’s Image Plane script. That way you can have a background plane linked to the cameras.
-Eric