Maxscript access to Sub-Object in motion panel


#1

Hi everyone!
Maybe someone can help me. I need to activate sub-object level in motion panel by maxscript. In docs and forums i cant find any information about this(

photo_2022-09-23_18-56-56


#2

what’s Bip01 LIKTarget ?


#3

Its CAT IKTarget
In properties, methods and interfaces of IKTarget i can just get controller of this Pivot. But I need functionality just like click on Sub-Object button. but in interface i also cant find it


#4

You could find a command panel hwnd and then find the child control i.e. button to press it.
There certainly was another method to get the handle, but it is the only one I could find at the moment


#5

Thnx!! I’ll try it now)


#6

Something wrong. I use hwnd viewer to find hwnd of button. And after that try click on it. But nothing happens
If i do same things with modify pannel buttons - all work fine. but not with motion panel.
i use:

UIAccessor.PressButton 1317410P

working with hwnd little hard for me(

photo_2022-09-23_23-42-00


#7

Can you make a little script that would create this LIKTarget programmatically so I could try this myself in 2020 max?
Perhaps it shouldn’t be hard to make it manually, but I never touched rigs & animations so it is a problem


#8

tmp = Point name:“pn01” isSelected:true
tmp.controller = CATHDPivotTrans ()


#9

thahnks.
problem was that is just doesn’t exist in 2014 which is my default version
I use spy++ to check which messages are being sent to controls.
As you can see it works, but I have no idea how to find the control. It is qt controls and seems like we can’t easily access button title from maxscript. Maybe python could help here


#10

ok… here’s my noob attempt


qt    = python.import "PySide2.QtWidgets"
pymxs = python.import "pymxs"
app = qt.QWidget.find (pymxs.runtime.windows.getMAXHWND())
cp = (app.findChildren qt.QWidget "CommandPanel")[0]

buttons = cp.findChildren qt.QPushButton
-- buttons.count
buttons[1].click() -- click second button

If someone could show how to get the button title it would be very helpful
upd
solved

buttons[0].text()
buttons[1].text()
buttons[2].text()

#11

**

Unknown property: “QWIdget” in <module ‘PySide2.QtWidgets’

**
on this row ----> app = qt.QWIdget.find (pymxs.runtime.windows.getMAXHWND())
i dont know python((


#12

hwnd_get = GetCommandPanelHWND()
dialog = windows.getChildrenHWND hwnd_get
UIAccessor.PressButton dialog[n][1]; print dialog[n][1]

i was try to bruteforce try click all ui elements. one by one. but also no result(


#13

:+1:

qws = python.import "PySide2.QtWidgets"
app = qws.QWidget.find (getMaxHWND())
cp = (app.findChildren qwidgets.QWidget "CommandPanel")[0]
bts = cp.findChildren qws.QPushButton

--bts[1].text()
bts[1].click()

work for sure in MAX 2020


#14

thanks, it was lowercase i character in QWIdgets word


#15

Thnx so much!!! python method works perfect!!!


#16

it’s Qt now… the WinAPI (uiaccessor) methods don’t work anymore for this part of UI


#17

I have poor knowlege in UI at all. so for me that was totally mind blowing)


#18

This is bad… You have to! :stuck_out_tongue_winking_eye:


#19

Every tech artist needs to do three things in “life”:

  • Develop a geometry plugin
  • Design a rig
  • Write a shader

:sunglasses:

… and three things as 2D tech artist:

  • Make your own font
  • Create an icon pack
  • Design your own LOGO

:grinning:


#20

So much work to be done))