Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 12-07-2016 , 04:35 PM
Registered User
Join Date: Jul 2016
Posts: 2

Bone Selection / Deselection Code Equivalent

Hi there,

I'm writing a script that automatically prevents bones from being selected when I'm trying to modify control vertices on a curve.

When I'm trying to select control vertices, Maya has a persistent problem of selecting bones and jumping out of component mode when any bones are in the selection. Very annoying!

I'm stuck on the implementation though, largely because I can't find out the coding equivalent for the "select joint objects" toggle button in the Maya UI. You'd think because it's in the UI that there'd be some semblance of how to do this by seeing script editor output, but alas nothing.

I have an alternate idea of looking for joints in the scene and then temporarily sticking all the joints in the scene in a displayLayer. But I come up short trying to set the layer to reference ("R")... the script editor does not show an explicit means of doing this either.

Also Google turns up nothing for coding guidance on either solution.

So I'm hoping the SimplyMaya community can help me out by pointing out any commands that can either set a displayLayer to reference, or to toggle the "select joint objects" button through code. user added image

Thank you kindly.

Attached Thumbnails
# 2 19-07-2016 , 10:14 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
setObjectPickMask "Joint" true/false;

For these types of things, you can turn on "echo all commands" inside of the script editor, and it will generally give you the command.


Imagination is more important than knowledge.
# 3 20-07-2016 , 12:59 AM
Registered User
Join Date: Jul 2016
Posts: 2
Hi NextDesign, thanks for all your help. I appreciate it user added image. I hope you have a great rest of your week!

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads