def createLayer(self, layer, useExisting =True): """ Creates a display layer with the specified name. """ if useExisting and cmds.objExists(layer): return priorSelection = MayaUtils.getSelectedTransforms() cmds.select(clear=True) cmds.createDisplayLayer(name=layer) MayaUtils.setSelection(priorSelection)
def _addButton(self): type = self._checkType() print type cmds.select(created + '1', type + '1Handle') cmds.createDisplayLayer(nr=True, name='layer1') cmds.setAttr('layer1.visibility', 0)
def _addButton(self): type = self._checkType() print type cmds.select(created+'1', type+'1Handle') cmds.createDisplayLayer(nr=True, name='layer1') cmds.setAttr('layer1.visibility', 0 )