PDA

View Full Version : making mesh unselectable..


underearth
09-06-2006, 11:20 AM
some tiem back isee one rig.. and i was going through it. i found that mesh was unselectable.. when i select the shape or trans Node from hypergraph .it just automatically deselect it.. i need something similar.. i know there is tempelate ,reference and lockNode.. for protection but can some one tell me how to achieve the above mentioned method or something similar to it..

i would also like to know what other guys do to make there object not selectable in scene...but still visible apart from tempelate or referencing the Shape Node..

i just made a tiny script which go through and change displayOverride of all shape nodes..
but sometimes with referencing it doesn't works well.. as sometimes stupid maya create defaultLayer. and it lock drawing overrides...

any suggestions
many thanks..

azshall
09-06-2006, 03:16 PM
Selection masks? ... Simply just turn off the ability to select geometry or whatever node you want. There is a tutorial at www.gnomononline.com that talks about setting up Marking Menu's for doing this type of thing..

I use them, they work great..

Seth

underearth
09-06-2006, 03:31 PM
i know selection mask.. but i am talking about not letting animators select that object.. with mask they can accedently or knowingly turn on the mask an object become selectable..

cpan
09-06-2006, 04:38 PM
you can create a script job with the SelectionChanged event to filter the new selections and unselect whatever you don't need.


//create the job and retain it's ID in the $myJob int variable so you can delete it after
//btw use this code to kill the job: scriptJob -kill $myJob -force;

int $myJob = `scriptJob -e "SelectionChanged" "myUnselect"`;


// now create the procedure that's called whenever the selectionchanged event is triggered

global proc myUnselect()
{
string $selection[] = `ls -sl`;
for ($item in $selection)
{
// now add code here to unselect whatever you don't want to be selectable
// in this example i make unselectable any object wich name starts with "a"

if (`gmatch $item "a*"`)
select -deselect $item;
}
}

wrote this from my memory so it might not work ok from the first try :)

CGTalk Moderation
09-06-2006, 04:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.