<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to restore viewport size with maxscript command? in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12916392#M689</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="denisTMaxDoctor_0-1721805521991.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1390366i00DC4AC8F5552FFE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="denisTMaxDoctor_0-1721805521991.png" alt="denisTMaxDoctor_0-1721805521991.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the main panel as I see it... something needs to be done to screw it like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jul 2024 07:23:17 GMT</pubDate>
    <dc:creator>denisT.MaxDoctor</dc:creator>
    <dc:date>2024-07-24T07:23:17Z</dc:date>
    <item>
      <title>How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12914310#M686</link>
      <description>&lt;P&gt;How to restore viewport size with maxscript command?&lt;BR /&gt;I can hide-show Time Slider or hide-show Ribbon and this will restore the viewports, but this is bad option. Is there a command that restores viewports?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 11:40:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12914310#M686</guid>
      <dc:creator>maxyweb</dc:creator>
      <dc:date>2024-07-23T11:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12915615#M687</link>
      <description>&lt;P&gt;How did this happen? What did you do to shift (scale) it like that?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 22:09:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12915615#M687</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-07-23T22:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12916237#M688</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1634609"&gt;@denisT.MaxDoctor&lt;/a&gt;&amp;nbsp; schrieb:&lt;BR /&gt;
&lt;P&gt;How did this happen? What did you do to shift (scale) it like that?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Probably related to&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/3ds-max-programming/how-to-create-floating-viewport-with-specific-size/td-p/12902236" target="_blank"&gt;https://forums.autodesk.com/t5/3ds-max-programming/how-to-create-floating-viewport-with-specific-size/td-p/12902236&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 06:31:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12916237#M688</guid>
      <dc:creator>MartinBeh</dc:creator>
      <dc:date>2024-07-24T06:31:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12916392#M689</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="denisTMaxDoctor_0-1721805521991.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1390366i00DC4AC8F5552FFE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="denisTMaxDoctor_0-1721805521991.png" alt="denisTMaxDoctor_0-1721805521991.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the main panel as I see it... something needs to be done to screw it like that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 07:23:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12916392#M689</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-07-24T07:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917217#M690</link>
      <description>&lt;P&gt;Yes, I reduce the base viewport to the required size of 800x600, take a screenshot and it works fine, there is a problem that the viewport does not always return to the original size. The question was: is there a maxscript command that updates the size of viewports as does changing the UI configuration. For example, turning on or off the Time Slider restores the viewport size, but writing macros.run "Customize User Interface" "UI_TimeSlider_Toggle" into the script is a clumsy solution&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 14:03:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917217#M690</guid>
      <dc:creator>maxyweb</dc:creator>
      <dc:date>2024-07-24T14:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917388#M691</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2827509"&gt;@maxyweb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Yes, I reduce the base viewport to the required size of 800x600, take a screenshot and it works fine, there is a problem that the viewport does not always return to the original size.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yeah, I was expecting something like that...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- How do you fix a TV?&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- What's wrong with it?&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- The sound's gone.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- What do you mean, it's gone?&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- I was watching TV, picking at my ear with a screwdriver, and the sound's gone...&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;"&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 15:38:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917388#M691</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-07-24T15:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917495#M692</link>
      <description>&lt;P&gt;ok, let's chalk it up to translation difficulties&lt;BR /&gt;I suspect the joke is funny)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 16:24:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917495#M692</guid>
      <dc:creator>maxyweb</dc:creator>
      <dc:date>2024-07-24T16:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917557#M693</link>
      <description>&lt;P&gt;I still don't understand why you try to scale the viewport to take a snapshot of a given size... take a DIB with the current or larger size and scale the image.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;src=gw.getViewportDib()
trg = bitmap 800 600
copy src trg
display trg&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 16:47:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917557#M693</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-07-24T16:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917626#M694</link>
      <description>&lt;P&gt;Because if the viewport does not have a 4x3 aspect ratio, and most often this is the case, then the screenshot turns out to be stretched vertically.&lt;BR /&gt;like in this example:&lt;BR /&gt;src=gw.getViewportDib()&lt;BR /&gt;trg = bitmap 800 600&lt;BR /&gt;copy src trg&lt;BR /&gt;display trg&lt;/P&gt;&lt;P&gt;In order to get the correct screenshot, I first need to make the viewport aspect ratio 4x3 (800x600)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 17:21:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917626#M694</guid>
      <dc:creator>maxyweb</dc:creator>
      <dc:date>2024-07-24T17:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917693#M695</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2827509"&gt;@maxyweb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In order to get the correct screenshot, I first need to make the viewport aspect ratio 4x3 (800x600)&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;so what? just do it:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(
	
	size = [800, 600]
	ratio = size.x / size.y

	src=gw.getViewportDib()
	
	if (1.0 * src.width / src.height) != ratio do
	(
		if (src.width &amp;gt; src.height) then
		(
			h = src.height
			w = int (h * ratio)
			bb = box2 ((src.width - w)/2) 0 w h
		)
		else
		(
			w = src.width
			h = int (w / ratio)
			bb = box2 0 ((src.height - h)/2) 0 w h
		)

		tmp = bitmap w h
		pastebitmap src tmp bb [0,0]
		
		src=tmp
	)

	trg = bitmap size.x size.y
	copy src trg
	display trg
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 18:03:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917693#M695</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-07-24T18:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917807#M696</link>
      <description>&lt;P&gt;In this case, some of the information is cut off and it is not clear from which camera the screenshot was taken&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VoPqXMEhIz.png" style="width: 839px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1390649i1CB80CF4D9166646/image-size/large?v=v2&amp;amp;px=999" role="button" title="VoPqXMEhIz.png" alt="VoPqXMEhIz.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 19:03:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917807#M696</guid>
      <dc:creator>maxyweb</dc:creator>
      <dc:date>2024-07-24T19:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917864#M697</link>
      <description>&lt;P&gt;That's it! You're too picky! You're on your own from here...&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 19:30:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917864#M697</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-07-24T19:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917891#M698</link>
      <description>&lt;P&gt;Yes, there is such a thing)&lt;BR /&gt;That's why I didn't ask a complex question, I asked a simple one.&lt;BR /&gt;I'm sure there is a simple solution to restore the viewport size, but I haven't found it, and since not everyone needs it, not everyone knows.&lt;BR /&gt;There was hope)&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 19:40:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917891#M698</guid>
      <dc:creator>maxyweb</dc:creator>
      <dc:date>2024-07-24T19:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917935#M699</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2827509"&gt;@maxyweb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Yes, there is such a thing)&lt;BR /&gt;That's why I didn't ask a complex question, I asked a simple one.&lt;BR /&gt;I'm sure there is a simple solution to restore the viewport size, but I haven't found it, and since not everyone needs it, not everyone knows.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I wrote dozens of tools similar to that in my practice...&lt;/P&gt;&lt;P&gt;your&amp;nbsp;problem is that you went in the wrong direction from the beginning, but I couldn't convince you. So ... you're on your own now.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 20:00:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917935#M699</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-07-24T20:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917951#M700</link>
      <description>&lt;P&gt;I have been watching you for a long time, starting with CGtalk, and I admit that you are the most experienced expert on this topic, I especially appreciate your desire to share your knowledge. But no one can know absolutely everything. Perhaps I chose the wrong path, but it works, although not exactly as I would like. In any case, thank you for being there, respect! )&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 20:10:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12917951#M700</guid>
      <dc:creator>maxyweb</dc:creator>
      <dc:date>2024-07-24T20:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12918016#M701</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2827509"&gt;@maxyweb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;But no one can know absolutely everything.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;at least how to update the view panel with a single command, I know for sure....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="denisTMaxDoctor_0-1721855043926.gif" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1390692iC0AA1761B43645E6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="denisTMaxDoctor_0-1721855043926.gif" alt="denisTMaxDoctor_0-1721855043926.gif" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 21:04:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12918016#M701</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-07-24T21:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to restore viewport size with maxscript command?</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12918022#M702</link>
      <description>&lt;P&gt;Let it remain a secret, otherwise it will be boring )&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jul 2024 20:47:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-restore-viewport-size-with-maxscript-command/m-p/12918022#M702</guid>
      <dc:creator>maxyweb</dc:creator>
      <dc:date>2024-07-24T20:47:57Z</dc:date>
    </item>
  </channel>
</rss>

