syntax to select an object

66 views
Skip to first unread message

jettam

unread,
Sep 1, 2017, 7:26:26 PM9/1/17
to Python Programming for Autodesk Maya
I am trying to select an object in my scene called 'r_leftWingA'   
I made another object named leftWingA and assigned it to 'L_WingA
Now I am trying to figure out the syntax to select it. 

I've tried 
mc.select('r_'+ (L_WingA))
mc.select('r_'+ L_WingA)
mc.select('r_'+ str (L_WingA))



L_WingA = mc.polySphere(n='leftWingA')
mc.select('r_'+ str (L_WingA))



Thank you in advance.. 

jettam

unread,
Sep 1, 2017, 7:42:16 PM9/1/17
to Python Programming for Autodesk Maya
I figured it out.  I needed to select the first item in the list with [0]   

mc.select('r_'+ (L_WingA[0]))


Since I figured it out, and it's a simple QA, should I delete this post, or leave it here for someone else?

Justin Israel

unread,
Sep 1, 2017, 7:47:55 PM9/1/17
to Python Programming for Autodesk Maya


On Sat, Sep 2, 2017, 11:42 AM jettam <justin...@gmail.com> wrote:
I figured it out.  I needed to select the first item in the list with [0]   

mc.select('r_'+ (L_WingA[0]))


Since I figured it out, and it's a simple QA, should I delete this post, or leave it here for someone else?

No need for deleting posts just because you figured it out before someone was able to reply :) 

We only delete spam or inappropriate content. 




On Friday, September 1, 2017 at 4:26:26 PM UTC-7, jettam wrote:
I am trying to select an object in my scene called 'r_leftWingA'   
I made another object named leftWingA and assigned it to 'L_WingA
Now I am trying to figure out the syntax to select it. 

I've tried 
mc.select('r_'+ (L_WingA))
mc.select('r_'+ L_WingA)
mc.select('r_'+ str (L_WingA))



L_WingA = mc.polySphere(n='leftWingA')
mc.select('r_'+ str (L_WingA))



Thank you in advance.. 

--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/0e01ff3c-58a2-4da2-803b-cd1886c695e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages