Exemplo n.º 1
0
Arquivo: gui.py Projeto: xtoof/Tapp
    def on_getObjectRegion_pressed(self):

        sel = cmds.ls(selection=True)

        #checking selection for meshes
        check = False
        for node in sel:

            shape = cmds.listRelatives(node, shapes=True)
            if shape:

                if cmds.nodeType(shape) == 'mesh':

                    check = True

        if check:

            regions = utils.getMeshAnimation()

            regionNode = self.getSelectedRegionNode()

            for r in regions:

                utils.setRegionNode(regionNode, r)

        else:

            cmds.warning('Nothing selected. Please select one or more meshes!')
Exemplo n.º 2
0
Arquivo: gui.py Projeto: mkolar/Tapp
 def on_getObjectRegion_pressed(self):
     
     sel=cmds.ls(selection=True)
     
     #checking selection for meshes
     check=False
     for node in sel:
         
         shape=cmds.listRelatives(node,shapes=True)
         if shape:
             
             if cmds.nodeType(shape)=='mesh':
                 
                 check=True
     
     if check:
     
         regions=utils.getMeshAnimation()
         
         regionNode=self.getSelectedRegionNode()
         
         for r in regions:
             
             utils.setRegionNode(regionNode, r)
     
     else:
         
         cmds.warning('Nothing selected. Please select one or more meshes!')
Exemplo n.º 3
0
Arquivo: gui.py Projeto: xtoof/Tapp
    def on_getPreviewRegion_pressed(self):

        r = utils.getRegionDraw()

        regionNode = self.getSelectedRegionNode()

        if regionNode:

            utils.setRegionNode(regionNode, r)

        else:

            cmds.warning('No renderlayer selected in region window!')
Exemplo n.º 4
0
Arquivo: gui.py Projeto: mkolar/Tapp
 def on_getPreviewRegion_pressed(self):
     
     r=utils.getRegionDraw()
     
     regionNode=self.getSelectedRegionNode()
     
     if regionNode:
     
         utils.setRegionNode(regionNode, r)
     
     else:
         
         cmds.warning('No renderlayer selected in region window!')