Hi, I'm currently working on a rigging project and am having a bit of trouble with a script job. Currently I've got this basic code set up in a script node:
int $jobId = scriptJob -killWithScene -e "SelectionChanged" dis
;
proc dis(){
string $obj;
string $list[] = ls -sl
;
for ($obj in $list){
if($obj == "face_CTRL"){
undo;
select face_JNT;
}
}
}
Basically it sets up a trigger so when "face_CTRL" is selected "face_JNT" is selected. There are also other trigger selections made the same way which select other objects too. This is the functionality I want there's just a couple of bugs though.
The first is I can't shift select, or drag select multiple trigger objects. I can only select one at a time. The first object deselects when I shift or drag select another. Is there a way around this?
The second problem is with referencing. When I reference the scene the triggers break because of name spacing. To fix this I assume I have to somehow query the file name and then add the name spacing to "face_CTRL" and "face_JNT" and any other triggers I have set up. I'm fairly new to mel and having trouble putting this into code..
Thanks for your help.