Select Children & Deselect Parent?

What's the best way of selecting all the children of your selection, then deselect the original selection/parent?

One more step beyond:

 select -hi ;

TIA!

Best as a thing thats not defined in most cases! Define what you mean by children transforms only or shapes, intermediate objects or what? Anyway read the entry for list relatives

listRelatives -ad ls -sl; //return all descendants.

listRelatives -ad -type transform ls -sl; // transforms only (most people dont know or care that shapes exist)

Anyway you could prettymuch filter this list after the fact.

The collision system for the game engine is determined by directly childing mesh/shape cubes to the game mesh.

For example, you have a table mesh. You then bind a cube that surrounds that mesh to act as the collision area, instead of the more complicated table mesh. These bounding boxes are stack down the tree.

Currently, there's a script that toggles some game options. It's hard to quickly tell what's been modified in the whole scene, however.

A solution would be to have the children change color in the hypergraph. This can be done by changing the state (making it non-interactive, similiar to a layer toggle).

To make it more automated, I was attempting to run the game option script, then have it only select the children (collision bounding) and toggle their state for a template color change.

Debugging the scene is quicker when you can immediately spot which collision boundings have been modified by the color change.

Looks like I've got something here:

global proc ToggleColor ()

{
string $selected[] = ls -sl;
string $current = "";
string $object = "";
if ($selected[0] != "")
{
for ($current in $selected)
{
// Test current selection for transform objects
string $list[] = listRelatives -c -pa -typ transform $current;
if ($list[0] != "")
{
for ($object in $list)
toggle -te ($object); // Send current tranform object to setRenderAttr proc
}
else
{
toggle -te ($current); // Send current tranform object to setRenderAttr proc
}
}
}
else
{
error "Nothing selected.";
}
}

Ha! I've got it!

I want to Delete all the children of selected objects:

string $shapes[] = listRelatives -ad;
delete $shapes; 

Done!