Created
December 23, 2022 20:30
-
-
Save redglasses67/2334893cf037d9cb22282ec66272a378 to your computer and use it in GitHub Desktop.
アトリビュートの一覧を取得
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.api.OpenMaya as om2 | |
selList = om2.MGlobal.getActiveSelectionList() | |
mObject = selList.getDependNode(0) | |
depNode = om2.MFnDependencyNode(mObject) | |
for i in range(depNode.attributeCount()): | |
attribute = depNode.attribute(i) | |
mPlug = depNode.findPlug(attribute, 0) | |
print("name = {} : type = {}".format(mPlug.partialName(useLongNames=True), attribute.apiTypeStr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment