Ejemplo n.º 1
0
def resetDrivenNodes(node):
    """use mgear convenience function to reset all available transform nodes

    Args:
        node (str): node to reset
    """
    children = mc.listRelatives(node, type="transform")
    controlNode = node.replace(DRIVEN_SUFFIX, CTL_SUFFIX)
    if mc.objExists(controlNode) and controlNode in children:
        transform.resetTransform(pm.PyNode(controlNode))
    transform.resetTransform(pm.PyNode(node))
Ejemplo n.º 2
0
    def drawFromUI(self, parent):
        """Draw the guide in the scene from the UI command.

        Args:
            parent (dagNode): the parent of the component.

        """
        if not self.modalPositions():
            mgear.log("aborded", mgear.sev_warning)
            return False

        self.draw(parent)
        transform.resetTransform(self.root, r=False, s=False)

        gui.Guide_UI.inspectSettings()

        return True
Ejemplo n.º 3
0
def resetDrivenNodes(node):
    """use mgear convenience function to reset all available transform nodes

    Args:
        node (str): node to reset
    """
    children = mc.listRelatives(node, type="transform")
    controlNode = node.replace(DRIVEN_SUFFIX, CTL_SUFFIX)
    otherNode = node.replace(DRIVEN_SUFFIX, "")
    if mc.objExists(controlNode) and children and controlNode in children:
        transform.resetTransform(pm.PyNode(controlNode))
    elif mc.objExists("{}{}".format(node, RBF_LOCATOR_SUFFIX)):
        compoensateLoc = pm.PyNode("{}{}".format(node, RBF_LOCATOR_SUFFIX))
        transform.resetTransform(compoensateLoc)
    elif mc.objExists(otherNode):
        otherNode = pm.PyNode(otherNode)
        transform.resetTransform(otherNode)
    transform.resetTransform(pm.PyNode(node))
Ejemplo n.º 4
0
def resetSelTrans():
    with pm.UndoChunk():
        for obj in pm.selected():
            tra.resetTransform(obj)
Ejemplo n.º 5
0
def resetSelTrans():
    """Reset the transfom values (SRT) for the selected objects"""
    with pm.UndoChunk():
        for obj in pm.selected():
            transform.resetTransform(obj)