Attributes Primer, FKoverIK
We provide a quick primer on Maya attributes and how to form compound attributes, which will be very important for our guide clean up process, and then show how to do an FKoverIK set up which we’ll use to simplify the guide.
A very simple script is used during the stream. As usual it’s provided in this post, and I will eventually add it to the GitHub repository.
All new episode now free of low frequency hum in the audio!
Enjoy,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | from maya.api import OpenMaya as om2 sel = om2.MGlobal.getActiveSelectionList() mob = sel.getDependNode(0) fn_cAttr = om2.MFnCompoundAttribute() fn_mAttr = om2.MFnMessageAttribute() c_attr = fn_cAttr.create("toSwap", "toSwap") fn_cAttr.array = True m_attr1 = fn_mAttr.create("originalConnection", "originalConnection") m_attr2 = fn_mAttr.create("guidedConnection", "guidedConnection") fn_cAttr.addChild(m_attr1) fn_cAttr.addChild(m_attr2) fn_dep = om2.MFnDependencyNode(mob) fn_dep.addAttribute(c_attr) |