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
-
mgear.rigbits.sdk_io.
copySDKsToNode
(sourceDriven, targetDriver, targetDriven, sourceAttributes=[], sourceDriverFilter=None)¶ Duplicates sdk nodes from the source drive, to any designated target driver/driven
Parameters: - sourceDriven (pynode) – source to copy from
- targetDriver (pynode) – to drive the new sdk node
- targetDriven (pynode) – node to be driven
- sourceAttributes (list, optional) – of attrs to copy, if none provided
- all (assume) –
- sourceDriverFilter (list, pynode) – Driver transforms to filter by,
- the connected SDK is not driven by this node it will not be returned. (if) –
Returns: n/a
Return type: TYPE
-
mgear.rigbits.sdk_io.
createSDKFromDict
(sdkInfo_dict)¶ Create a sdk node from the provided info dict
Parameters: sdkInfo_dict (dict) – dict of node information to create Returns: created sdk node Return type: PyNode
-
mgear.rigbits.sdk_io.
exportSDKs
(nodes, filePath)¶ exports the sdk information based on the provided nodes to a json file
Parameters: - nodes (list) – of nodes to export
- filePath (string) – full filepath to export jsons to
-
mgear.rigbits.sdk_io.
getAllSDKInfoFromNode
(node)¶ returns a dict for all of the connected sdk/animCurve on the provided node
Parameters: node (pynode) – name of node to the be searched Returns: of all of the sdk nodes Return type: dict
-
mgear.rigbits.sdk_io.
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[#]
Parameters: attrPlug (string) – node.attr Returns: node.attr of the blendweighted node that was just created or existing Return type: string
-
mgear.rigbits.sdk_io.
getConnectedSDKs
(driven, curvesOfType=[], sourceDriverFilter=None)¶ get all the sdk, animcurve, nodes/plugs connected to the provided node.
Parameters: - node (str, pynode) – name of node, or pynode
- curvesOfType (list, optional) – animCurve nodes of type if none provided
- fall back on module defined supported set. (will) –
- sourceDriverFilter (list, pynode) – Driver transforms to filter by,
- the connected SDK is not driven by this node it will not be returned. (if) –
Returns: of sdk nodes, paired with the node/attr they effect
Return type: list
-
mgear.rigbits.sdk_io.
getMultiDriverSDKs
(driven, sourceDriverFilter=None)¶ get the sdk nodes that are added through a blendweighted node
Parameters: - driven (string) – name of the driven node
- sourceDriverFilter (list, pynode) – Driver transforms to filter by,
- the connected SDK is not driven by this node it will not be returned. (if) –
Returns: of sdk nodes
Return type: list
-
mgear.rigbits.sdk_io.
getPynodes
(nodes)¶ Conevenience function to allow uses to pass in strings, but convert to pynodes if not already.
Parameters: nodes (list) – string names Returns: of pynodes Return type: list
-
mgear.rigbits.sdk_io.
getSDKDestination
(animNodeOutputPlug)¶ Get the final destination of the sdk node, skips blendweighted and conversion node to get the transform node. TODO: Open this up to provided type destination
Parameters: animNodeOutputPlug (string) – animationNode.output Returns: name of the node, and attr Return type: list
-
mgear.rigbits.sdk_io.
getSDKInfo
(animNode)¶ get all the information from an sdk/animCurve in a dictioanry for exporting.
Parameters: animNode (pynode) – name of node, pynode Returns: dictionary of all the attrs to be exported Return type: dict
-
mgear.rigbits.sdk_io.
importSDKs
(*args, **kwargs)¶ create sdk nodes from json file, connected to drivers and driven
Parameters: filePath (string) – path to json file
-
mgear.rigbits.sdk_io.
invertKeyValues
(newKeyNode, invertDriver=True, invertDriven=True)¶ Mirror keyframe node procedure, in case you need to flip your SDK’s.
Parameters: - newKeyNode (PyNode) – sdk node to invert values on
- invertDriver (bool, optional) – should the drivers values be inverted
- invertDriven (bool, optional) – should the drivens values be inverted
-
mgear.rigbits.sdk_io.
mirrorSDKkeys
(node, attributes=[], invertDriver=True, invertDriven=True)¶ mirror/invert the values on the specified node and attrs, get the sdks and invert those values
Parameters: - node (pynode) – node being driven to have its sdk values inverted
- attributes (list, optional) – attrs to be inverted
- invertDriver (bool, optional) – should the driver, “time” values
- inverted (be) –
- invertDriven (bool, optional) – should the driven, “value” values
- inverted –
-
mgear.rigbits.sdk_io.
removeSDKs
(node, attributes=[], sourceDriverFilter=None)¶ Convenience function to remove, delete, all sdk nodes associated with the provided node
Parameters: - node (pynode) – name of the node
- attributes (list, optional) – list of attributes to remove sdks from
- none provided, assume all (if) –
- sourceDriverFilter (list, pynode) – Driver transforms to filter by,
- the connected SDK is not driven by this node it will not be returned. (if) –
-
mgear.rigbits.sdk_io.
stripKeys
(animNode)¶ remove animation keys from the provided sdk node
Parameters: animNode (pynode) – sdk/anim node