has been shut down on the 6th of March 2021. You can read a bit more about it here.

You are currently reading an archived copy of the latest content, with all the usernames deleted.

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

by user82 posted 25-11-2017 | 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 user3 posted 27-11-2017

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

ctx = mc.currentCtx()
print mc.artAttrSkinPaintCtx(ctx, q=1, inf=1)


by user82 posted 28-11-2017

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 user3 posted 30-11-2017

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 user66 posted 26-11-2017

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


by user82 posted 26-11-2017

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