| 579 | // Storage |
| 580 | |
| 581 | bool TSShapeConstructor::writeField(StringTableEntry fieldname, const char* value) |
| 582 | { |
| 583 | // Ignore the sequence fields (these are written as 'addSequence' commands instead) |
| 584 | if (dStrnicmp(fieldname, "sequence", 8) == 0) |
| 585 | return false; |
| 586 | else if (dStrnicmp(fieldname, "baseShape", 9) == 0) |
| 587 | { |
| 588 | // Small hack to only write the base filename (no path) since the |
| 589 | // TSShapeConstructor script must be in the same folder as the model, and |
| 590 | // then we can easily copy both around without having to change the field |
| 591 | const char* filename = dStrrchr(value, '/'); |
| 592 | if (filename > value) |
| 593 | { |
| 594 | S32 len = dStrlen(filename); |
| 595 | dMemmove((void*)(value + 1), filename, len); |
| 596 | ((char*)value)[0] = '.'; |
| 597 | ((char*)value)[len + 1] = '\0'; |
| 598 | } |
| 599 | return true; |
| 600 | } |
| 601 | |
| 602 | return Parent::writeField(fieldname, value); |
| 603 | } |
| 604 | |
| 605 | //----------------------------------------------------------------------------- |
| 606 | // Console utility methods |