Example #1
0
 def closeDialogWithResult(self, buttonID):
     if buttonID==self.BUTTON_OK:
         self.controls.name.setValue(self.controls.name.getValue().strip())
         
         
         # check if valid layer name was entered
         # new layer mode should allow empty value
         if not self.newLayerMode and self.layerNameValue.get().strip()=='':
             Utils.confirmDialog( title='Validation Error', message="layer name cannot be blank", button=['Ok'], defaultButton='Ok')
             return
     
     
     BaseDialog.closeDialogWithResult(self, buttonID)
Example #2
0
 def execCleanNodes(self,*args):
     if not LayerUtils.hasCustomNodes():
         Utils.confirmDialog(icon='information', title='Info', message='Scene does not contain any custom ngSkinTools nodes.', button=['Ok']);
         return
     
     message = 'This command deletes all custom nodes from ngSkinTools plugin. Skin weights will be preserved, but all layer data will be lost. Do you want to continue?'
     if Utils.confirmDialog(
             icon='warning',
             title='Warning', 
             message=message, 
             button=['Yes','No'], defaultButton='No')!='Yes':
         return
     
     LayerDataModel.getInstance().cleanCustomNodes()
Example #3
0
    def closeDialogWithResult(self, buttonID):
        if buttonID == self.BUTTON_OK:
            self.controls.name.setValue(self.controls.name.getValue().strip())

            # check if valid layer name was entered
            # new layer mode should allow empty value
            if not self.newLayerMode and self.layerNameValue.get().strip(
            ) == '':
                Utils.confirmDialog(title='Validation Error',
                                    message="layer name cannot be blank",
                                    button=['Ok'],
                                    defaultButton='Ok')
                return

        BaseDialog.closeDialogWithResult(self, buttonID)
    def execCleanNodes(self, *args):
        if not LayerUtils.hasCustomNodes():
            Utils.confirmDialog(
                icon='information',
                title='Info',
                message='Scene does not contain any custom ngSkinTools nodes.',
                button=['Ok'])
            return

        message = 'This command deletes all custom nodes from ngSkinTools plugin. Skin weights will be preserved, but all layer data will be lost. Do you want to continue?'
        if Utils.confirmDialog(icon='warning',
                               title='Warning',
                               message=message,
                               button=['Yes', 'No'],
                               defaultButton='No') != 'Yes':
            return

        LayerDataModel.getInstance().cleanCustomNodes()
Example #5
0
 def getImportOptions(self):
     options = ImportOptions()
     
     if self.getMll().getLayersAvailable():
         if Utils.confirmDialog(
                 icon='question',
                 title='Import', 
                 message='Do you want to keep existing layers?', 
                 button=['Yes','No'], defaultButton='Yes')=='No':
             options.keepExistingLayers = False
             
     return options
Example #6
0
    def getImportOptions(self):
        options = ImportOptions()

        if self.getMll().getLayersAvailable():
            if Utils.confirmDialog(
                    icon='question',
                    title='Import',
                    message='Do you want to keep existing layers?',
                    button=['Yes', 'No'],
                    defaultButton='Yes') == 'No':
                options.keepExistingLayers = False

        return options