VEXercise1 – Group Mirrored Prims

//put mirrored prims into a new group (name from string parameter)
string grpName = ch("../outGrpName");

int val;
if(grpName != "") {
    val = i@mirror - prim(1, "mirror", @primnum);
} else {
    //if not out name is given then use in name + mark all prims with mirror=1
    grpName = ch("../inGrpName");
    val = i@mirror;
}

setprimgroup(0, grpName, @primnum, val, "set");