[Closed] Maxscript access to Sub-Object in motion panel
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(
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
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
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(
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
tmp = Point name:“pn01” isSelected:true
tmp.controller = CATHDPivotTrans ()
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
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()