Hi Adam,

Thank You so much,
Your code definitely helps me. Now I create a window for that. there we can
choose color and change.

Thanks
Sachendra

On Fri, Jun 26, 2020 at 8:55 AM <ajr...@gmail.com> wrote:

> Sachendra,
>
> You can set and turn on RGB overrides on any object. Please see below
>
> # Get selection
> curves = maya.cmds.ls(selection=True)
>
> # RGB Values
> R = 0.0
> G = 0.2
> B = 1.0
>
> for curve in curves:
>     # Trun on overrides
>     maya.cmds.setAttr(curve + ".overrideEnabled", 1)
>     # Enable RGB
>     maya.cmds.setAttr(curve + ".overrideRGBColors",1)
>     # Set RGB Value
>     maya.cmds.setAttr(curve + ".overrideColorRGB", R ,G ,B)
>
> Hope this helps,
>
> Adam B.
>
>
> On Wednesday, October 23, 2019 at 11:06:36 PM UTC-4, Sachendra Shukla
> wrote:
>>
>> Hi All,
>>
>> I am a Rigging Artist. a few months ago I start to learn the python
>> language. from youtube and then  i wite my first python script "Controller
>> Creator" here is link --
>> https://www.highend3d.com/maya/script/controller-creator-for-maya
>> in this script, you can create 16 different types of nurbs curve shapes
>> in on click.
>>
>> and now I move forward to add a new option in the script to change curve
>> color. so I write code for that but it's hard for me and I can't change
>> curve color. can anyone tell me how to command execute and it will change
>> the curve color
>> I send you my script in the attachment you can download and fix the
>> problem.
>>
>> Thank you
>> Sachendra
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/6d56ea38-23c7-4c94-a202-566d6363cf51o%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/6d56ea38-23c7-4c94-a202-566d6363cf51o%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 python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFuekOsc65SakW0qBr8z3dW9mO31dYO%3DmnCJy7h3g%3DBUaFSsZw%40mail.gmail.com.

Reply via email to