Ejemplo n.º 1
0
 def _addAssetButton(self, fileID, sceneName, versionID):
     thumbnailPath = _Database.getThumbnailPath(fileID, versionID)
     if not _os.path.exists(thumbnailPath):
         thumbnailPath = "cube.png"
     buttonName = self._assetBtnName(fileID)
     button = _pmCore.iconTextButton(buttonName, style='iconAndTextVertical', image1=thumbnailPath, label=sceneName, command=_pmCore.Callback(self._assetSelected, fileID))
     self._uiWidget.setdefault(_UiWidgetEnum.assetBtnList, {})[buttonName] = button
     _pmCore.popupMenu()  
     _pmCore.menuItem(label='Open', command=_pmCore.Callback(_functools.partial(_MayaFunctions.openScene, _Database.getFilePath(fileID))))
     _pmCore.menuItem(label='Import', command=_pmCore.Callback(_functools.partial(_MayaFunctions.importScene, _Database.getFilePath(fileID))))
     _pmCore.menuItem(label='Reference', command=_pmCore.Callback(_functools.partial(_MayaFunctions.referenceScene, _Database.getFilePath(fileID))))
     _pmCore.menuItem(label='Versions/Comments', command=_pmCore.Callback(_functools.partial(_AssetVersionDialog, fileID)))