I wrote a little thing a while back called "zbw_attributes" that should do most of what you want (http://www.williework.blogspot.com/p/downloads.html). I think the problem is the color change is happeing on the shape node, not the transform (shape node is typically a better way to do things). Feel free to either use the script or use some of the code from it.
Z -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To post to this group, send email to python_inside_maya@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.