def redoIt(self):
        # clear out the modifier so it doesn't store old object names
        self.__dgModify = OM.MDGModifier()

        # create a new node if the command is in create mode
        if not self.__isEditUsed:
            self.__shoulderConstraintNodeArg = OM.MObject(
                self.__dgModify.createNode(AM_ShoulderConstraintNode.kPluginNodeId))
            self.__shoulderConstraintNodeFn.setObject(self.__shoulderConstraintNodeArg)
            fn = OM.MFnDagNode(self.__constrainedObjectArg)
            self.__dgModify.renameNode(self.__shoulderConstraintNodeArg, '%s_shoulderConstraint' % fn.name())
        # assign the -name argument if provided
        if len(self.__shoulderConstraintNodeName) > 0:
            self.__dgModify.renameNode(self.__shoulderConstraintNodeArg, self.__shoulderConstraintNodeName)
        # WARNING: must tell the DGModifier to doIt() now in order to let Maya's auto-rename kick in and ensure the name is unique
        # otherwise attempts to use commandToExecute below may end up using some other object
        self.__dgModify.doIt()

        # set the attributes on the node
        plug = OM.MPlug()
        if self.__constrainedObjectArg.isValid():
            self.__dgModify.commandToExecute('connectAttr -f %s.%s %s.rotate' % (
                self.__shoulderConstraintNodeFn.name(), AM_ShoulderConstraintNode.kRotateAttrName,
                self.__constrainedObjectArg.partialPathName()))
            self.__dgModify.commandToExecute('connectAttr -f %s.rotateOrder %s.%s' % (
                self.__constrainedObjectArg.partialPathName(),
                self.__shoulderConstraintNodeFn.name(), AM_ShoulderConstraintNode.kRotateOrderAttrName))
            self.__dgModify.commandToExecute('connectAttr -f %s.parentInverseMatrix %s.%s' % (
                self.__constrainedObjectArg.partialPathName(),
                self.__shoulderConstraintNodeFn.name(), AM_ShoulderConstraintNode.kParentInvMatrixAttrName))
        if self.__shoulderObjectArg.isValid():
            self.__dgModify.commandToExecute('connectAttr -f %s.worldMatrix %s.%s' % (
                self.__shoulderObjectArg.partialPathName(),
                self.__shoulderConstraintNodeFn.name(), AM_ShoulderConstraintNode.kShoulderObjectAttrName))
            if not self.__shoulderObjectArg.hasFn(OM.MFn.kJoint):
                self.__dgModify.commandToExecute('connectAttr -f %s.rotatePivot %s.%s' % (
                    self.__shoulderObjectArg.partialPathName(),
                    self.__shoulderConstraintNodeFn.name(), AM_ShoulderConstraintNode.kShoulderRotatePivotAttrName))
        if self.__spineObjectArg.isValid():
            self.__dgModify.commandToExecute('connectAttr -f %s.worldMatrix %s.%s' % (
                self.__spineObjectArg.partialPathName(),
                self.__shoulderConstraintNodeFn.name(), AM_ShoulderConstraintNode.kSpineObjectAttrName))
            if not self.__spineObjectArg.hasFn(OM.MFn.kJoint):
                self.__dgModify.commandToExecute('connectAttr -f %s.rotatePivot %s.%s' % (
                    self.__spineObjectArg.partialPathName(),
                    self.__shoulderConstraintNodeFn.name(), AM_ShoulderConstraintNode.kSpineRotatePivotAttrName))
        if self.__raisedAngleArg is not None:
            # set the raisedAngleOffset attribute if it is not connected
            plug = self.__shoulderConstraintNodeFn.findPlug(AM_ShoulderConstraintNode.kRaisedAngleAttrName, True)
            if not plug.isConnected():
                self.__dgModify.commandToExecute('setAttr %s.%s %s' % (
                    self.__shoulderConstraintNodeFn.name(), AM_ShoulderConstraintNode.kRaisedAngleAttrName,
                    self.__raisedAngleArg))
        # set vector attribute values
        vectorArgs = {
            self.__shoulderAimAxisArg: AM_ShoulderConstraintNode.kShoulderAimAttrName,
            self.__shoulderFrontAxisArg: AM_ShoulderConstraintNode.kShoulderFrontAttrName,
            self.__spineAimAxisArg: AM_ShoulderConstraintNode.kSpineAimAttrName,
            self.__spineFrontAxisArg: AM_ShoulderConstraintNode.kSpineFrontAttrName
        }
        for vArg in vectorArgs:
            if not vArg:
                continue
            # set the vector attribute if it is not connected
            plug = self.__shoulderConstraintNodeFn.findPlug(vectorArgs[vArg], True)
            if not plug.isConnected():
                self.__dgModify.commandToExecute('setAttr %s.%s %s %s %s' % (
                    self.__shoulderConstraintNodeFn.name(),
                    vectorArgs[vArg], vArg.x, vArg.y, vArg.z))

        # following Maya convention, select the newly created node if the command is in create mode
        if not self.__isEditUsed:
            self.__dgModify.commandToExecute('select %s' - self.__shoulderConstraintNodeFn.name())
        self.__dgModify.doIt()
        self.setResult(self.__shoulderConstraintNodeFn.name())
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/maya/plugins/2014/win64/AM_ShoulderConstraint.py/AM_ShoulderConstraintCmd.redoIt/operator `%` -> `-`