I am trying to make a script centered around changing the material via a drop-down menu and the texture via a slider. I am having some difficulty applying to a model. How can I change my script to fit this requirement?
import maya.cmds as mc
if mc.window("ram", exists =True):
mc.deleteUI(ram)
ram = mc.window("Material and Texture",t = "Material and Texture v0.9",
w=300, h=300)
mc.columnLayout(adj = True)
imagePath = mc.internalVar(upd = True)+"icons/scriptlogo.jpg"
mc.image(w=300,h=200,image = imagePath)
# A dropdown menu deisnged to change material/color of octopus (the colors
below are used as a test)
mc.optionMenu(label = "Material",)
mc.menuItem (label="Red")
mc.menuItem (label="Blue")
mc.menuItem (label="Yellow")
mc.menuItem (label="Green")
mc.menuItem (label="Orange")
mc.menuItem (label="Purple")
# A slider designed to alter the intensity of the octopus' texture
mc.intSliderGrp (label="Texture", min=0, max=10, field=True)
mc.showWindow(ram)