mgear.rigbits.sdk_io

Rigbits, SDK i/o

exportSDKs([“drivenNodeA”, “drivenNodeB”], “path/to/desired/output.json”) importSDKs(path/to/desired/output.json)

# MIRRORING ——- # copy from source, say left, to target, right copySDKsToNode(“jacketFlap_L1_fk0_sdk”,

“neck_C0_0_jnt”, “jacketFlap_R1_fk0_sdk”)

# invert/mirror the attributes necessary for the other side, # in this case it is the following attributes mirrorSDKkeys(“jacketFlap_R1_fk0_sdk”,

attributes=[“rotateZ”], invertDriver=True, invertDriven=False)
mirrorSDKkeys(“jacketFlap_R1_fk0_sdk”,
attributes=[“translateX”, “translateY”], invertDriver=True, invertDriven=True)

# in this other instance, it was the same copySDKsToNode(“jacketFlap_L0_fk0_sdk”,

“neck_C0_0_jnt”, “jacketFlap_R0_fk0_sdk”)
mgear.rigbits.sdk_io.SDK_ANIMCURVES_TYPE

list – sdk anim curves to support

Functions

copySDKsToNode(sourceDriven, targetDriver, …) Duplicates sdk nodes from the source drive, to any designated target driver/driven
createSDKFromDict(sdkInfo_dict) Create a sdk node from the provided info dict
exportSDKs(nodes, filePath) exports the sdk information based on the provided nodes to a json file
getAllSDKInfoFromNode(node) returns a dict for all of the connected sdk/animCurve on the provided node
getBlendNodes(attrPlug) Check the attrPlug (node.attr) provided for any existing connections if blendWeighted exists, return the appropriate input[#], if sdk, create a blendweighted and connect sdk, return input[#]
getConnectedSDKs(driven[, curvesOfType, …]) get all the sdk, animcurve, nodes/plugs connected to the provided node.
getMultiDriverSDKs(driven[, sourceDriverFilter]) get the sdk nodes that are added through a blendweighted node
getPynodes(nodes) Conevenience function to allow uses to pass in strings, but convert to pynodes if not already.
getSDKDestination(animNodeOutputPlug) Get the final destination of the sdk node, skips blendweighted and conversion node to get the transform node.
getSDKInfo(animNode) get all the information from an sdk/animCurve in a dictioanry for exporting.
importSDKs(*args, **kwargs) create sdk nodes from json file, connected to drivers and driven
invertKeyValues(newKeyNode[, invertDriver, …]) Mirror keyframe node procedure, in case you need to flip your SDK’s.
mirrorSDKkeys(node[, attributes, …]) mirror/invert the values on the specified node and attrs, get the sdks and invert those values
removeSDKs(node[, attributes, …]) Convenience function to remove, delete, all sdk nodes associated with the provided node
stripKeys(animNode) remove animation keys from the provided sdk node