Home Technical Talk
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

[3DSMAX] Maxscript Selecting Remove/Copy/Inst in Proboolean panel

interpolator
Offline / Send Message
OccultMonk interpolator
Remove/Copy/Inst radio buttons are not exposed in maxscript. In 3DSMax 2016 I had a working solution. The interface changed a bit in 3dsmax 2017 so that could be a possible cause. I have quite a lot of code that is now useless in 3DSMax 2017. Does anyone know a way to set the radio buttons for Remove/Copy/Inst and also for show end Result/Operands in Proboolean object panel? 

This was the previously working code:
http://www.scriptspot.com/forums/3ds-max/general-scripting/press-radio-button-with-maxscript-in-command-panel#comment-34374

Replies

  • monster
    Offline / Send Message
    monster polycounter
    Yeah the new UI is done in QT. So some of the panel names have changed. "Modify Task" changed to a generic "QWidget". I had to add "return OK" to because of the more generic panel name.
    1. (
    2. fn proboolean_Extract_pressRadioButton rbName state =
    3. (
    4. local properRb = false
    5. local BN_CLICKED = 0 -- clicky message ID
    6. local BM_SETCHECK = 241 -- checkbutton toggle message ID
    7. local WM_COMMAND = 273 -- windows command message
    8. max modify mode
    9.  
    10. for child in (windows.getChildrenHWND #max) where child[4] == "#32770" do
    11. (
    12. for classN in (windows.getChildrenHWND child[1]) where (classN[4] == "QWidget") do
    13. (
    14. for btn in (windows.getChildrenHWND classN[1]) do
    15. (
    16. if btn[5] == "Extract Selected" do properRb = true
    17. if properRb == true and (btn[5] == rbName) do
    18. (
    19. local parent = UIAccessor.getParentWindow btn[1]
    20. local id = UIAccessor.getWindowResourceID btn[1]
    21. windows.sendMessage btn[1] BM_SETCHECK (if state then 1 else 0) 0
    22. If state then windows.sendMessage parent WM_COMMAND ((bit.shift BN_CLICKED 16) + id) btn[1]
    23. return OK
    24. )
    25. )
    26. )
    27. )
    28. )
    29.  
    30. fn pressRadioButton rbName =
    31. (
    32. rbNamesArr = #("Remove", "Copy", "Inst")
    33. for rb in rbNamesArr do
    34. (
    35. proboolean_Extract_pressRadioButton rb false
    36. )
    37.  
    38. proboolean_Extract_pressRadioButton rbName true
    39. )
    40. pressRadioButton "Inst"
    41. )
  • OccultMonk
Sign In or Register to comment.