| 394 | //----------------------------------------------------------------------------- |
| 395 | |
| 396 | void TSShapeConstructor::_onLoad(TSShape* shape) |
| 397 | { |
| 398 | // Check if we should unload first |
| 399 | if ( mShape ) |
| 400 | _onUnload(); |
| 401 | |
| 402 | #ifdef DEBUG_SPEW |
| 403 | Con::printf( "[TSShapeConstructor] attaching to shape '%s'", mShapePath.c_str() ); |
| 404 | #endif |
| 405 | |
| 406 | mShape = shape; |
| 407 | mChangeSet.clear(); |
| 408 | mLoadingShape = true; |
| 409 | |
| 410 | // Add sequences defined using field syntax |
| 411 | for ( S32 i = 0; i < mSequences.size(); i++ ) |
| 412 | { |
| 413 | if ( mSequences[i].isEmpty() ) |
| 414 | continue; |
| 415 | |
| 416 | // Split the sequence path from the target sequence name |
| 417 | String destName; |
| 418 | String srcPath( mSequences[i] ); |
| 419 | SplitSequencePathAndName( srcPath, destName ); |
| 420 | |
| 421 | addSequence( srcPath, destName ); |
| 422 | } |
| 423 | |
| 424 | // Call script function |
| 425 | onLoad_callback(); |
| 426 | mLoadingShape = false; |
| 427 | } |
| 428 | |
| 429 | //----------------------------------------------------------------------------- |
| 430 |
no test coverage detected