Instantly share code, notes, and snippets.

Embed
What would you like to do?
#選択しているノードのうち、KeyableなものをLock・Hideする
import pymel.core as pm
def LockAndHideNodeAttr(node):
attrList = node.listAttr(k=True)
for attr in attrList:
attr.set(l=True,k=False)
def LockAndHideNodeAttrSelection():
select = pm.ls(sl=True,fl=True)
for sel in select:
LockAndHideNodeAttr(sel)
LockAndHideNodeAttrSelection()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment