Skip to content

Instantly share code, notes, and snippets.

@RodGreen
Last active April 23, 2019 01:13
Show Gist options
  • Save RodGreen/07186edc9fb02d18d32a97def33aec8b to your computer and use it in GitHub Desktop.
Save RodGreen/07186edc9fb02d18d32a97def33aec8b to your computer and use it in GitHub Desktop.
Export All Dag Children Maya Mel Script
proc ExportAllDagChildren()
{
$savedSel = ls("-selection", "-l");
select(ls("-l","-fl", "-type", "transform", "-dag", listRelatives("-ad", "-f")));
for( $eachMesh in `ls -selection -l` )
{
$overrided = getAttr ($eachMesh + ".overrideEnabled");
if($overrided != 1)
{
continue;
}
//$overrideSetting = getAttr ($eachMesh + ".overrideDisplayType");
//print($eachMesh + "\n");
select -d $eachMesh;
}
ExportSelection;
select $savedSel;
}
ExportAllDagChildren();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment