I may not totally understand what you are asking for but I'll try,
string $selectedObjs[0] = `ls -g`; // select only geometry //
for ($x=0; $x {
string $selParents[0] = `listRelatives -p $selectedObjs[0]`; // get the name of dag nodes parent names //
// now you can getAttr and setAttr on the parent to affect the object itself for each object that gets selected //
} // end of for loop //
Hope this helps,
Morris