Esempio n. 1
0
    def on_defaultColor(self):
        """
        Command launched when 'Default' QPushButton is clicked

        Restore selected objects color
        """
        #--- Get Data ---#
        wire, shader = self.overrideMode
        sceneSel = pScene.getSceneSelection()
        #--- Override ---#
        if wire:
            pUtil.defaultDisplayColor()
        if shader:
            pShading.defaultShader()
        #--- Reselect ---#
        if sceneSel:
            pScene.selectObjects(sceneSel)
Esempio n. 2
0
    def on_overrideColor(self):
        """
        Command launched when 'Override' QPushButton is clicked

        Override selected objects color
        """
        #--- Get Data ---#
        cIndex = self.tw_tree.selectedColorIndex
        wire, shader = self.overrideMode
        sceneSel = pScene.getSceneSelection()
        #--- Override ---#
        if wire:
            pUtil.overrideDisplayColor(cIndex)
        if shader:
            pShading.overrideShader(cIndex, useExisting=False)
        #--- Reselect ---#
        if sceneSel:
            pScene.selectObjects(sceneSel)