Exemplo n.º 1
0
    def addNode(self, node):
        coral.Node.addNode(self, node)

        if "CoralMayaNode" in node.classNames():
            # we have to call updateCoralAttributeMap here because doing so in a CoralMayaNode contructor we would be wrong (the CoralMayaNode wouldn't be under its parent yet).
            cmds.coralMayaCmd("updateCoralAttributeMap", self._mayaNode)

            for attr in node.inputAttributes():
                if hasattr(attr, "mayaAttribute"):
                    # this will guarantee things are up to date from the start
                    cmds.dgdirty(attr.mayaNode() + "." + attr.mayaAttribute())
Exemplo n.º 2
0
 def addNode(self, node):
     coral.Node.addNode(self, node)
     
     if "CoralMayaNode" in node.classNames():
         # we have to call updateCoralAttributeMap here because doing so in a CoralMayaNode contructor we would be wrong (the CoralMayaNode wouldn't be under its parent yet). 
         cmds.coralMayaCmd("updateCoralAttributeMap", self._mayaNode)
         
         for attr in node.inputAttributes():
             if hasattr(attr, "mayaAttribute"):
                 # this will guarantee things are up to date from the start
                 cmds.dgdirty(attr.mayaNode() + "." + attr.mayaAttribute())
Exemplo n.º 3
0
 def deleteIt(self):
     mayaNode = self.parent().mayaNode()
     cmds.lockNode(mayaNode, lock = False)
     
     if self.isValid():
         for attr in self.attributes():
             if hasattr(attr, "mayaAttribute"):
                 cmds.deleteAttr(attr.mayaNode() + "." + attr.mayaAttribute())
     
         cmds.coralMayaCmd("updateCoralAttributeMap", self.parent().mayaNode())
     
     coral.Node.deleteIt(self)
     
     cmds.lockNode(mayaNode, lock = True)
Exemplo n.º 4
0
    def deleteIt(self):
        mayaNode = self.parent().mayaNode()
        cmds.lockNode(mayaNode, lock=False)

        if self.isValid():
            for attr in self.attributes():
                if hasattr(attr, "mayaAttribute"):
                    cmds.deleteAttr(attr.mayaNode() + "." +
                                    attr.mayaAttribute())

            cmds.coralMayaCmd("updateCoralAttributeMap",
                              self.parent().mayaNode())

        coral.Node.deleteIt(self)

        cmds.lockNode(mayaNode, lock=True)