Home Coding, Scripting, Shaders

[3DSMAX] Help with maxscript to select radio buttons in the Proboolean Command Panel

interpolator
Offline / Send Message
OccultMonk interpolator

I had this code that worked untill 3dsmax 2020, but I can't get it to work now in 3dsmax 2021 (and probablty 2022):



fn priv_proboolean_Extract_pressRadioButton_2018 rbName state = (

local properRb = false

local BN_CLICKED = 0 -- clicky message ID

local BM_SETCHECK = 241 -- checkbutton toggle message ID

local WM_COMMAND = 273 -- windows command message

local panelName = if((maxVersion())[1] >= 19000) then "MaxSDK::QMaxTabWidgetClassWindow" else "ModifyTask" --QWidget instead of "ModifyTask"

max modify mode

for child in (windows.getChildrenHWND #max) where child[5] == "CommandPanelWindow" do (

for classN in (windows.getChildrenHWND child[1]) where (classN[5] == panelName) do (

for btn in (windows.getChildrenHWND classN[1]) do

(

if btn[5] == "Extract Selected" do properRb = true

if properRb == true and (btn[5] == rbName) do

(

local parent = UIAccessor.getParentWindow btn[1]

local id = UIAccessor.getWindowResourceID btn[1]

windows.sendMessage btn[1] BM_SETCHECK (if state then 1 else 0) 0

If state then windows.sendMessage parent WM_COMMAND ((bit.shift BN_CLICKED 16) + id) btn[1]

if((maxVersion())[1] >= 19000) then return OK ))))),

Replies

Sign In or Register to comment.