Message 1 of 2
Syntax Error MEL listRelatives

Not applicable
12-29-2016
06:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I've got a MEL script that I'm trying to get to work, but it keeps dying on this line of code. I've isolated this line of code and it throws a syntax error:
string $objList[] = 'listRelatives -s -path "nexus"';
Below is the full code that I'm using. I'm trying to get the listRelatives function to work. I'm using it in another 1000+ lines of code and it throws an error, that's why I've isolated it in this manner. I'm using the example listed here to validate the function works:
http://help.autodesk.com/cloudhelp/2015/ENU/Maya-Tech-Docs/Commands/listRelatives.html
Win7/Maya2012
//
sphere -n "nexus";
instance -n "ball";
string $objList[] = 'listRelatives -s -path "nexus"';
listRelatives -allParents $objList[0];