On Thu, 22 Jun 2023, 10:19 pm Herbert Agudera, <[email protected]>
wrote:

> Hello everyone.
>
> I am fairly new at scripting in maya/python. A few days ago i watched some
> youtube videos about python scripting for maya artists. watched arvids
> video about making a script to convert maya shaders to arnold shaders.
>
> anyway, here is what i am having trouble with
>
> *aiRampHi_mask = pmc.duplicate("aiRamp_Hi", ic = True, ic = True, name =
> "aiRampHi_mask")*
> *aiRampHi_mask.outColorR >> aiLayer.mix4*
>
> *the error*
>
>
>
> *# Error: 'list' object has no attribute 'outColorR'# Traceback (most
> recent call last):#   File "<maya console>", line 1, in <module>#
> AttributeError: 'list' object has no attribute 'outColorR' #*
>

The return value of duplicate() is a list of the duplicated objects. So the
error is telling you that you are attempting to access a field that does
not exist on a list.
To access the first item of a list:
*    item = aiRampHi_mask[0] *


>
> I can connect the two manually but i cant using the script. what is
> missing here?
>
> Thanks!
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/8578ba87-a1ac-49ea-8e08-d214632b0a21n%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/8578ba87-a1ac-49ea-8e08-d214632b0a21n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1TA2u8nR7JWN_pwfbuk0u%3DbeKA3KhgQPpVkEgZLUdY%2Bw%40mail.gmail.com.

Reply via email to