How can I query selected in tool settings/paint similar to how its done with the channel box

by IrisHeart posted 17 days ago | 5 comments

I been trying to find info about this, I want to be able to query the influences I have selected so I can make a script to help with skinning

by vshotarov posted 15 days ago

I've been using this for some quick post-smooth scripts.

ctx = mc.currentCtx()
print mc.artAttrSkinPaintCtx(ctx, q=1, inf=1)
by IrisHeart posted 14 days ago

oh cool this is almost it!, it prints the last influence I have selected. but is there a way to query multiple influences you have selected in the box like the way it works with the channelbox? it would help speed up locking and unlocking multiple influences or running a script through them

by vshotarov posted 12 days ago

riight, i've never done that to be honest, and from a quick glance I couldn't find an easy way of doing that. That being said, have a look at the context commands and check if they have any flags that could help.

Additionally, the name of the UI where the influences are is "theSkinClusterInflList" and it is of type treeView, so you can reference it by mc.treeView("theSkinClusterInflList"). Have a look through the docs and see if anything could be helpful.

by C_A_Thornhill posted 16 days ago

Do you mean query the influences on a selected skinned object? I use "findRelatedSkinCluster" then "listConnections" of type joint.

by IrisHeart posted 16 days ago

No I mean the influences you have selected, like the way you can select multiple things in the channel box and query it this is the code for the channel box channelBox -query -selectedMainAttributes; cant figure out how to get the same results for the paint tool in the tool settings window