Hi,
I wanted to create a script that creates offset groups. It works on the single objects but not on multiple objects (which is the intended use).
You can see an illustration of the problem here:
https://www.dropbox.com/s/z7m768d2yneka3n/MYA071_offset_group_error.mp4?dl=0
You can check the script here:
$objList = `ls -sl`;
for ($obj in $objList){
$objParent = `pickWalk -d up`;
$objGrp = `group -em -n ($obj + "_grp")`;
parent $objGrp $obj;
setAttr ($objGrp + ".tx") 0;
setAttr ($objGrp + ".ty") 0;
setAttr ($objGrp + ".tz") 0;
setAttr ($objGrp + ".rx") 0;
setAttr ($objGrp + ".ry") 0;
setAttr ($objGrp + ".rz") 0;
setAttr ($objGrp + ".sx") 1;
setAttr ($objGrp + ".sy") 1;
setAttr ($objGrp + ".sz") 1;
parent -w $objGrp;
parent $objGrp $objParent;
parent $obj $objGrp;
}
Thank you for looking at the problem