Automatic camera and screenshot

Automatic camera and screenshot

bzowski_n
Community Visitor Community Visitor
461 Views
2 Replies
Message 1 of 3

Automatic camera and screenshot

bzowski_n
Community Visitor
Community Visitor

Hi, I'm just starting my journey of learning 3d max.
Here's the task:
It is necessary that a camera is automatically created (ctrl+C) then a screenshot is automatically saved (ViewportGrab) from this camera to the desired folder in jpg format.

 

To study the functions I use Scripting Listener, but it does not show all the buttons that I use, how can I find out in more detail which buttons I press in the 3d max interface?
For example, the same "macros.run "Tools" "ViewportGrab"", after opening the window it is suggested to set the name of the screenshot and then the grab button, how can I find out the code of the grab button?

0 Likes
462 Views
2 Replies
Replies (2)
Message 2 of 3

istan
Advisor
Advisor
0 Likes
Message 3 of 3

3dtasarimokulu
Advocate
Advocate

 here is the litle script,

-- Create a camera
cam = freeCamera()
viewport.setCamera cam

-- Capture viewport and save the file
filePath = "C:\\Users\\YourUsername\\Desktop\\capture.jpg" -- Specify the save path
grabView = gw.getViewportDib()
grabView.filename = filePath
grabView.save()

0 Likes