Hi everybody,
I wish to create several checkbox in an automatic way according to a variable's attributes.
For each of these checkbox, the command returned is : "select the corresponding attribute element of my variable".
But to do this, how to change the checkbox's flag ("-onCommand"); according to the variable $i of my condition "for" ?
My goal is simple : every turn of my variable $i (due to my condition "for"), my flag "-onCommand " targets a new object contained in my variable's list of attributes (BldName []).
Here is my script:
// I get my list of blendshapes
string $BldName[] = listAttr -m ($CharacterName + "\_face\_bld.w") ;
// Asked for the size of my list
int $Bldsize = size ($BldName) ;
global string $BldAttr;
// Starting to build my checkbox according to my list
for ($i = 0; $i < $Bldsize; $i++) {
// I defined the name of my blendshape's attribute
$BldAttr = ($CharacterName + "_face_bld." + $BldName[$i]) ;
// I defined the name of my checkboxUI
string $BldUICheck = ("BlendUICheck_" + $BldName[$i]) ;
// I build my checkbox with my command targeting my blendshape
checkBox -ann $BldAttr -label "Select" -align "center" -onc "select -r $BldAttr ;" $BldUICheck ;
}
Actually, my result always match the same selection ("($CharacterName + "_face_bld." + $BldName[0])) for each checkbox's command.
Thanks !! (sorry for my english !!)