Ok. Problem no. 2 If use this command:select pSphere1 pSphere2; It will select both objects (pSphere1 and pSphere2) If I store it as a value in a string and try to use it with the select command:string $ objects = "pSphere1 pSphere2" ;select $ objects; I will get this: // Error: line 1: No object matches name: pSphere1…
It's finally working :D You can get the script here: http://www.igorbazooka.com/createSelector.mel This is how you use it: - First select the control-object. - Then select any number of objects that you want it to select. - Run the script. - When the control-object is selected, it will select the other objects instead. -…
Realized I could also do it like this: string $objects = "pSphere1 pSphere2"; string $select = "select " + $objects; eval $select; Seems a bit easier :)
The script job could look at an attribute of the model you select to determine what it needs to select. You'd add a custom string attribute to your "selector" model, and encode the names of all the object you want it to select instead. The script job queries the selected object to see if it has that attrib, if so, gets the…
Hey. Does anyone know how to set up a control object, that when selected, selects other objects in my scene? I'm thinking script job, but I've never really used them before, and I can't seem to find the correct condition for it to work..... Any ideas? I first tried to just put all the selection handles in one place, but…
Slight bump with an easy scriptless method; add a group/node as a child of the object you want as control, and the other objects as children of the node. Has the downside of transform inherits, in case that's an issue. Arbitrary Mesh -Group --Obj1 --Obj2 --Obj3
Thanks. Yeah I guess I'll have to do something like that... This seems to work: string $objects = "pSphere1 pSphere2"; string $selArray[]; $selArray = stringToStringArray($objects, " "); select -cl; for ($i=0; $i < size($selArray); $i++) { select -add $selArray[$i]; }; Anyone knows how to check if a specific scriptnode…
I just wrote out some stuff about using selection handles then reread your first post and saw that you tried that already. It was the first thing that came to my mind too. Quick select sets is probably easiest, and what I have used in the past, but you don't end up with an object to select.
Seems like a Shelf button would be the best way ;) Whargoul's idea is a solid improvement though, a more generic scriptJob that queries a specific custom attribute is much more flexible than a hard-coded one, and allows multiple of these "master control" objects to be used without writing more than one script. You could…