Hi, I'm a little stuck on a program that im currently making. I'm fairly new to using MEL and want to create an custom object using a Polygon Primitive Sphere. I have managed to code the object so that it has the shape that I want but I am having trouble with setting the colour to the object. I'd really appreciate it if someone could give me a solution. All I want is a Lambert Material with RGB: 0.5 0.431883 0.232
you know about the usual "basic guide to MEL scripting"?:
open Script Editor, Press "Edit" > Clear History, Press "Script" > Echo All Commands, execute your operation you want to melify, read the output and take the first operation that looks useful.:
This should lead you to:
CODE shadingNode -asShader lambert; for creating the shader. and:
CODE setAttr "lambert2.color" -type double3 0.64102 0.64102 0.64102; for changing the color at the shader.
I recognize you even don't need to echo all commands for this. But you need to set it if you want to obtain: CODE hyperShade -assign lambert2; wich assigns the shader to the current selection.
humm... this definetely belongs there ... but I got no time now :[ But don't you think its going to be boring here if the mel-newbies already know everything? ;] But ok seems that even you get bored telling the same shit over and over again.