Skip to content

Instantly share code, notes, and snippets.

@Swordslayer
Created April 11, 2022 13:41
Show Gist options
  • Save Swordslayer/ecce7e2d7793edc96a2c12d05011d094 to your computer and use it in GitHub Desktop.
Save Swordslayer/ecce7e2d7793edc96a2c12d05011d094 to your computer and use it in GitHub Desktop.
Open the Scale Curve Editor window of the new Path Deform modifier.
(
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