Hi Damon,

Thanks again for the help. I was trying what you've suggest earlier
but get an error:
# RuntimeError: (kFailure): Object does not exist //
Though when I actually do a print of the object it does in fact exist,
I get:
<maya.OpenMaya.MPlug; proxy of <Swig Object of type 'MPlug *' at
0x2e5c1260> >

when I try to get its value rPlug.asFloat() I get the error.


Originally, I had the values being changed in the compute function. I
figure that non of these is done there now?

Cheers and thank a bunch for the direction. Much appreciated
Shawn

On Feb 22, 9:52 am, damon shelton <[email protected]> wrote:
> hey Shawn
>
> '''
>   #set the color and alpha, rgba
>                glFT.glColor4f(rPlug, self.green, self.blue, self.alpha)
> #Change color and add alpha
> '''
>
> you don't appear to actually be setting the r,g,b,alpha values from the
> attributes on the node
>
> you get the MPlug to them but don't set variables to be those plug values
>
> either :
>
> self.red = rPlug.asFloat()
> self.green = rPlug.asFloat()
> self.blue = rPlug.asFloat()
> self.alpha = rPlug.asFloat()
>
> glFT.glColor4f(self.red, self.green, self.blue, self.alpha)
>
> or :
>
> glFT.glColor4f(rPlug.asFloat(), gPlug.asFloat(), bPlug.asFloat(),
> aPlug.asFloat())
>
> hope that helps
> -cheers
>
> Damon Shelton

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to