It says error reading element number 1 ie. the value attribute of setAttr
command, its not able to get the right type.
I think it needs float value and you giving int(but that should work).

don't know from where you getting the value attribute.
probably, if you getting your value from UI, then it will return a
string(most of the cases), you need to type cast it to float or int.
eg. value = float(value)


On Tue, Apr 23, 2013 at 5:33 PM, Daz <[email protected]> wrote:

> Heya
>
> Thanks MarkJ for help ! Now this is piece of code I will scratch my head
> for a while... But I still cant figure out when I run this command
>
> cmds.setAttr('%s.%s'%(materials,'diffuseColorAmount'),value)
>
> Why I get this error
>
> # RuntimeError: setAttr: Error reading data element number 1: 0 #
>
> I put the txt content in to the value and then I tell it to be used when
> changing attr but it errors :(
>
> Thanks, bye.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to