

Tries to select influence (provided as string) in current maya's paint weights context and UI

""" What if we want a left and a right arm? For now we will setĪ temporary variable to override the name, but later we will buildĭef selectPaintWeightsInfluence(self,infl): """ Instead of the else:, we could just return a message that the selectionĭoes not meet requirements for an arm. Positions.append(cmds.xform(s, q=True, ws=True, t=True)) If len(cmds.ls(sl=True, type='joint')) = numjnts : # Here we will see if we have a selection to get new positions from.

# Make a new dictionary to store information about the arm rig. In the scene, we could overwrite self.module_info""" """ NOTE: If we wanted to build our arm from some set of joints Log.warning("No reference audio track selected for reference")ĭata_path = os.environ + 'data/rig/arm.json' Label='frame %s = %s' % (cmds.currentTime(q=True), relativeTC)) Self._cached_tc_offset = actualframe - self.pro_audio.timecode_to_frame(relativeTC) RelativeTC = self.pro_audio.Timecode(selectedNode).getTimecode_from_node() Raise IOError("selected Audio node is NOT a Bwav so can't be used as reference")

Label='frame %s = %s' % (reference.startFrame,reference.bwav_timecodeFormatted())) Log.warning("Please only select 1 piece of Audio to use for reference") SelectedAudio=cmds.ls(sl=True, type='audio') If you pass it a node, and that node has the timecode attrs, then it caches the offset itself. If you pass this a bwav then it caches that bwav for use as the offset. : PRO_PACK : set the internal reference offset used to offset the audionode. R_bc = cmds.createNode('blendColors', name='%s_rotate_bc' % driven)Ĭmds.connectAttr('%s.rotate' % targ2, '%s.color1' % r_bc)Ĭmds.connectAttr('%s.rotate' % targ1, '%s.color2' % r_bc)Ĭmds.connectAttr(blendAttr, '%s.blender' % r_bc)Ĭmds.connectAttr('%s.output' % r_bc, '%s.rotate' % driven)ĭef _uicb_setReferenceBwavNode(self, *args): T_bc = cmds.createNode('blendColors', name='%s_translate_bc' % driven)Ĭmds.connectAttr('%s.t' % targ2, '%s.color1' % t_bc)Ĭmds.connectAttr('%s.t' % targ1, '%s.color2' % t_bc)Ĭmds.connectAttr(blendAttr, '%s.blender' % t_bc)Ĭmds.connectAttr('%s.output' % t_bc, '%s.t' % driven) Return showDialog( 'Argument Error', 'Please supply or select targ1, targ2 and driven nodes' ) If not targ1 and not targ2 and not driven: If a blendAttr is supplied, this is connected to the blender value Sets up blending of translation / rotation values from targs 1 & 2 on the driven node. Def blendAttrs(targ1=None, targ2=None, driven=None, blendAttr=None, translate=1, rotate=1):
