当前位置: 首页>>代码示例>>Python>>正文


Python Utils.displayError方法代码示例

本文整理汇总了Python中ngSkinTools.utils.Utils.displayError方法的典型用法代码示例。如果您正苦于以下问题:Python Utils.displayError方法的具体用法?Python Utils.displayError怎么用?Python Utils.displayError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ngSkinTools.utils.Utils的用法示例。


在下文中一共展示了Utils.displayError方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: selectPaintWeightsInfluence

# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import displayError [as 别名]
    def selectPaintWeightsInfluence(self,infl):
        '''
        tries to select influence (provided as string) in current maya's paint weights context and UI
        if skin paint context is not available, nothing happens
        '''
        if not Utils.isCurrentlyPaintingWeights():
            return
        
        # influence name can come in any form ('joint3', 'joint2|joint3', 'joint1|joint2|joint3')
        # get the absolute shortest possible (but still unique) and longest
        try:
            longName = cmds.ls(infl,l=True)[0]
            shortName = cmds.ls(longName,l=False)[0]

            log.info("selecting in paint weights: influence %s" % str(infl))
        
            # try to work around with the mess in the earlier versions of 
            # maya's paint weights UI:
            if Utils.getMayaVersion()<Utils.MAYA2011:
                itemName = Utils.mel('artAttrSkinShortName("%s")'%shortName)
                Utils.mel('artSkinSelectInfluence("artAttrSkinPaintCtx","%s","%s");' % (shortName,itemName));
            else:
                Utils.mel('artSkinSelectInfluence("artAttrSkinPaintCtx","%s");' % shortName);
                
            # show paint weights interface
            cmds.toolPropertyWindow()
        except:
            # problems listing given influence.. just die here
            Utils.displayError('problem selecting influence %s' % infl)
开发者ID:seokkwan,项目名称:Tapp,代码行数:31,代码来源:tabInfluenceList.py

示例2: closeNextDialogWithResult

# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import displayError [as 别名]
def closeNextDialogWithResult(result):
    '''
    close next modal dialog with given result
    '''
    if Utils.getMayaVersion()>=Utils.MAYA2011:
        mUtils.executeDeferred(lambda:BaseDialog.currentDialog.closeDialogWithResult(result))
    else:
        Utils.displayError("hurray for maya 2009, close dialog manually with result "+result)
开发者ID:BigMacchia,项目名称:ngSkinTools,代码行数:10,代码来源:testUtils.py

示例3: execute

# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import displayError [as 别名]
 def execute(self):
     ldm = LayerDataModel.getInstance()
     for layerId in ldm.layerListsUI.getSelectedLayers():
         if ldm.mll.getLayerIndex(layerId)==0:
             Utils.displayError("Cannot merge lowest layer")
             return
         
         ldm.mll.layerMergeDown(layerId)
         
         
     
         
     LayerEvents.layerListModified.emit()
     self.onExecuted.emit()
开发者ID:leandropim,项目名称:Tapp,代码行数:16,代码来源:actions.py

示例4: open

# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import displayError [as 别名]
    def open():
        '''
        just a shortcut method to construct and display main window
        '''

        window = MainWindow.getInstance()
        window.showWindow()
        
        # don't know where to fit this in, it's just an utility warning for those trying to run
        # this on a different maya version
        if Utils.getMayaVersion()==Utils.MAYAUNSUPPORTEDVERSION:
            Utils.displayError('unsupported Maya version detected.')
            
        Utils.silentCheckForUpdates()
        
        return window
开发者ID:BigMacchia,项目名称:ngSkinTools,代码行数:18,代码来源:mainwindow.py

示例5: openLink

# 需要导入模块: from ngSkinTools.utils import Utils [as 别名]
# 或者: from ngSkinTools.utils.Utils import displayError [as 别名]
 def openLink(self,link):
     '''
     open given documentation link (should be an instance of DocLink)
     if documentation root is local, checks for link validity
     on success, opens a web browser 
     '''
     if self.documentationRoot is None:
         return
     
     uri = self.getURL(link)
     
     # if possible, check for link availability
     if not self.linkExists(uri):
         Utils.displayError('documentation path does not exist: '+uri)
         return
     
     if self.isLocal(uri):
         uri = uri.replace("\\", "/");
         if not uri.lower().startswith("file:///"):
             uri = "file:///"+uri
         
     webbrowser.open_new(uri)
开发者ID:BigMacchia,项目名称:ngSkinTools,代码行数:24,代码来源:doclink.py


注:本文中的ngSkinTools.utils.Utils.displayError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。