<?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 resize a script toolbar in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10039308#M5862</link>
    <description>&lt;LI-CODE lang="general"&gt;rollout testRollout "" width:50 height:25
(
	button btnEmpty "Empty" align:#center

	on testRollout open do
	(
		cui.RegisterDialogBar testRollout style:#(#cui_dock_top, #cui_max_sized, #cui_floatable, #cui_handles) maxSize:[50,25] minSize:[50,25]
		cui.DockDialogBar testRollout #cui_dock_top

		local pySide2 = python.import "PySide2"
		local toolbarWidget = pySide2.QtWidgets.QWidget.find (UIAccessor.GetParentWindow (UIAccessor.GetParentWindow testRollout.hwnd))
		toolbarWidget.setFixedHeight 25
	)
)
createDialog testRollout&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 28 Jan 2021 17:30:12 GMT</pubDate>
    <dc:creator>Swordslayer</dc:creator>
    <dc:date>2021-01-28T17:30:12Z</dc:date>
    <item>
      <title>How to resize a script toolbar</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10014788#M5861</link>
      <description>&lt;P&gt;I created my toolbar using script and use cui to register it.&amp;nbsp;&amp;nbsp;CUI.REGISTERDIALOGBAR&lt;/P&gt;&lt;P&gt;I set the height as 36 before registering it with cui. But cui changes its size and makes it as 74. I tried to manually change it. But cui refused it. It says:&lt;/P&gt;&lt;P&gt;-- Runtime error: Cannot set property while registered as dialogBar: height&lt;/P&gt;&lt;P&gt;How can I set my toolbar with expected height?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2021 02:39:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10014788#M5861</guid>
      <dc:creator>e_juma</dc:creator>
      <dc:date>2021-01-20T02:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to resize a script toolbar</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10039308#M5862</link>
      <description>&lt;LI-CODE lang="general"&gt;rollout testRollout "" width:50 height:25
(
	button btnEmpty "Empty" align:#center

	on testRollout open do
	(
		cui.RegisterDialogBar testRollout style:#(#cui_dock_top, #cui_max_sized, #cui_floatable, #cui_handles) maxSize:[50,25] minSize:[50,25]
		cui.DockDialogBar testRollout #cui_dock_top

		local pySide2 = python.import "PySide2"
		local toolbarWidget = pySide2.QtWidgets.QWidget.find (UIAccessor.GetParentWindow (UIAccessor.GetParentWindow testRollout.hwnd))
		toolbarWidget.setFixedHeight 25
	)
)
createDialog testRollout&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 28 Jan 2021 17:30:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10039308#M5862</guid>
      <dc:creator>Swordslayer</dc:creator>
      <dc:date>2021-01-28T17:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to resize a script toolbar</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10045123#M5863</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1275790"&gt;@Swordslayer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;LI-CODE lang="general"&gt;local pySide2 = python.import "PySide2"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm so happy to see that! Is there any documentation? ... but anyway, I'm glad to just know that it exists, everything else is at least "SAPIENTI SAT".&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 02:58:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10045123#M5863</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2021-01-31T02:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to resize a script toolbar</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10046116#M5864</link>
      <description>&lt;P&gt;Looks like on 2021 accessing QtWidgets this way won't work so&amp;nbsp;&lt;FONT face="courier new,courier"&gt;python.import "PySide2.QtWidgets"&lt;/FONT&gt; has to be used instead.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&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;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1275790"&gt;@Swordslayer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;LI-CODE lang="general"&gt;local pySide2 = python.import "PySide2"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm so happy to see that! Is there any documentation? ... but anyway, I'm glad to just know that it exists, everything else is at least "SAPIENTI SAT".&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Which part? The python.import to get python modules exposed to mxs directly was already documented five years ago when pymxs was introduced, so you can do fun stuff like this for quite a while:&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;builtin = python.import "builtins" #"__builtin__" for python 2.6
itertools = python.import "itertools"

builtin.list(itertools.repeat 10 5) as array
builtin.all #{1..5,7}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I usually only use the Qt portions (for new parts of UI) and ctypes (since I'm too lazy to write verbose C# only to get some user32 methods and they're pretty conveniently exposed via&amp;nbsp;ctypes.windll.user32).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;ctypes = python.import "ctypes"
ctypes.windll.user32.SendMessageW ...&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for&amp;nbsp;PySide2 usage from MAXScript, querying/modifying existing parts of the UI is pretty straightforward but I don't think you could for example use it to create a Qt dialog from mxs that would do something - but I would certainly like to be proven wrong &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 31 Jan 2021 19:44:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10046116#M5864</guid>
      <dc:creator>Swordslayer</dc:creator>
      <dc:date>2021-01-31T19:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to resize a script toolbar</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10048757#M5865</link>
      <description>&lt;P&gt;At least I can already load UI files using QtUiLoader &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 19:50:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-resize-a-script-toolbar/m-p/10048757#M5865</guid>
      <dc:creator>denist.dts</dc:creator>
      <dc:date>2021-02-01T19:50:06Z</dc:date>
    </item>
  </channel>
</rss>

