Created
April 11, 2022 13:41
-
-
Save Swordslayer/ecce7e2d7793edc96a2c12d05011d094 to your computer and use it in GitHub Desktop.
Open the Scale Curve Editor window of the new Path Deform modifier.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
fn collectButtons widget &buttons = | |
( | |
local children = widget.children() | |
for i = 0 to children.count - 1 do | |
( | |
if children[i].__class__.__name__ == "QPushButton" do append buttons children[i] | |
collectButtons children[i] &buttons | |
) | |
) | |
local pathDef = modPanel.getCurrentObject() | |
if isKindOf pathDef Path_Deform2 do | |
( | |
local QtWidgets = python.import "PySide2.QtWidgets" | |
local iGlobal = (dotNetClass "Autodesk.Max.GlobalInterface").Instance | |
local hWnd = (iGlobal.UtilGetCoreInterface16()).CommandPanelRollup.Hwnd | |
local pushButtons = #() | |
pathDef.scaleEnable = on | |
windows.processPostedMessages() | |
collectButtons (QtWidgets.QWidget.find (hWnd as IntegerPtr)) &pushButtons | |
for button in pushButtons where button.text() == "Open Scale Curve Editor" do button.click() | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment