Exemple #1
0
	def removeShaderOverride(self):
		"""docstring for fname"""
		sel = mn.ls( sl = True )
		rlay = rlayer.current()
		if not sel:
			rlay.removeOverridedShader()
		else:
			with undo.Undo():
				for s in sel:
					childs = s.allchildren
					if childs:
						for c in childs:
							shap = c.shape
							if shap:
								mc.editRenderLayerAdjustment( shap.name + '.instObjGroups', remove = True )
					shap = s.shape
					if shap:
						mc.editRenderLayerAdjustment( shap.name + '.instObjGroups', remove = True )
Exemple #2
0
	def applyShaderToSel( self, shader, sels ):
		rlay = rlayer.current()
		if not sels:
			rlay.overridedShader = shader
		else:
			for s in sels:
				try:
					sha = s.shader.a.surfaceShader.input.node
					sha.a.aiEnableMatte.overrided = 1
					sha.a.aiEnableMatte.v = 1
					sha.a.aiMatteColor.overrided = 1
					if not sha.a.aiMatteColor.input:
						shader.a.outColor >> sha.a.aiMatteColor
					sha.a.aiMatteColorA.overrided = 1
					sha.a.aiMatteColorA.v = 1
				except:
					continue
			#sels.select()
			#mc.hyperShade( a = shader.name )
		self.applyShaderToHair( shader, sels )
Exemple #3
0
	def selectLightsInLayer(self):
		"""select lights in render layer"""
		lits = rlayer.current().lights
		if lits:
			lits.select()
Exemple #4
0
	def removeAllObjectsToLayer(self):
		"""docstring for remove"""
		rlay = rlayer.current()
		rlay.clean()
Exemple #5
0
	def removeObjectToLayer(self):
		"""docstring for removeObjectToLayer"""
		rlay = rlayer.current()
		rlay.remove( mn.ls( sl = True ) )
Exemple #6
0
	def addObjectToLayer(self):
		"""docstring for addObjectToLayer"""
		rlay = rlayer.current()
		rlay.add( mn.ls( sl = True ) )