pfalkingham / MayaToLiggghts

My scripts for converting a (fairly specific) maya scene to input files for LIGGGHTS
1 stars 0 forks source link

If script uses shape node, it crashes ungracefully #1

Open pfalkingham opened 5 years ago

pfalkingham commented 5 years ago

Sometimes the script will try to use the shape node rather than the object itself, and this will cause the loop to crash, leaving the file open. Only way to recover at the moment is to save the maya scene, close it, delete all partially generated liggghts files, re-open and try again.

I need to add an error check at some point.

pfalkingham commented 5 years ago

There is a 'fix' already in the script, at lines 172-174:

string $buffer[];
tokenize $item ":" $buffer;
string $cleanName = $buffer[size($buffer)-1];

I need users to note what it's failing on when it fails, and I can change the token it's parsing on. I haven't been able to reproduce the error just yet, so can't fix.

pfalkingham commented 5 years ago

Example error message when this happens:

// Error: file: C:/Users/pfalk/OneDrive/WORK/Scripts and Code/ActiveMaya/Scripts/plfmaya_liggghts_part2.mel line 182: No object matches name: roboFootShape.f[0:395].translateX