Help with setAttr

Help
Carlos
2006-11-21
2013-03-24
  • Carlos
    Carlos
    2006-11-21

    Hi Matthias,

    I have been trying to use this command in the Maya/Python package. The mel code is:

    setAttr "myRamp.colorEntryList[3].color" -type double3 1 0 0

    Can you help me to 'translate' it?

    By the way, in your tutorial you did:

    connectAttr(blinn+".outColor", sg+".surfaceShader")

    but this is not working for me, I had to do this:

    connectAttr('myColor.outColor', 'myColorSG.surfaceShader')

    Is this somehow related?

    Thanks in advance
    Carlos

     
    • Carlos
      Carlos
      2006-11-21

      Hello,

      I already found a way. It was rather simple : ) I didn't figure that you were using variables.

      Thanks

       
    • Matthias Baas
      Matthias Baas
      2006-11-22

      >I have been trying to use this command in the Maya/Python package. The mel code is:
      >
      > setAttr "myRamp.colorEntryList[3].color" -type double3 1 0 0

      In Python this can be written as:

      setAttr("myRamp.colorEntryList[3].color", (1,0,0), type="double3")

      - Matthias -