Exemplo n.º 1
0
Arquivo: am_maya.py Projeto: pixo/hk
    def referenceVersion ( self ) :

        item = self.treeWidget_a.currentItem ()
        doc_id = item.parent().hkid
        ver = int ( item.text ( 0 ) )
        self.statusbar.showMessage ( "Reference %s %s" % ( doc_id, str ( ver ) ) )
     
        path = core.getAssetPath ( doc_id, ver )
        files = glob.glob(os.path.join(path,"*.ma"))
        files.extend(glob.glob(os.path.join(path,"*.mb")))
         
        referenceOrInstance ( files [0], doc_id )
        self.statusbar.showMessage("%s referenced" % files[0] )
Exemplo n.º 2
0
Arquivo: am_maya.py Projeto: pixo/hk
    def importVersion ( self ) :

        item = self.treeWidget_a.currentItem ()
        doc_id = item.parent().hkid
        ver = int ( item.text ( 0 ) )
        
        if checkScene ( doc_id ):
             
            self.statusbar.showMessage ( "Pulling %s %s" % ( doc_id, str ( ver ) ) )
         
            path = core.getAssetPath ( doc_id, ver )
            files = glob.glob(os.path.join(path,"*.ma"))
            files.extend(glob.glob(os.path.join(path,"*.mb")))
             
            importFile ( files [0] )
            
            normalizeScene ( doc_id )
            
            self.statusbar.showMessage ( "%s pulled" % files[0] )
Exemplo n.º 3
0
Arquivo: am_maya.py Projeto: pixo/hk
def pullMaya ( db = None, doc_id = "", ver = "latest" ):
    path = core.getAssetPath ( doc_id, ver )
    files = glob.glob ( os.path.join ( path, "*.ma" ) )
    files.extend ( glob.glob ( os.path.join ( path, "*.mb" ) ) )
    openFile ( files[0] )