------------------------------
| 1121 | |
| 1122 | //------------------------------ |
| 1123 | void AnimationImporter::importPlaybackOptions () |
| 1124 | { |
| 1125 | // Get the minimum and the maximum time values of the animations to get the start |
| 1126 | // time and the end time of the animation. This times we have to set as the |
| 1127 | // "playbackOptions" in the "sceneConfigurationScriptNode". |
| 1128 | |
| 1129 | // Get the maya file. |
| 1130 | FILE* file = getDocumentImporter ()->getFile (); |
| 1131 | |
| 1132 | // createNode script -n "sceneConfigurationScriptNode"; |
| 1133 | // setAttr ".b" -type "string" "playbackOptions -min 1 -max 50 -ast 1 -aet 50 "; |
| 1134 | // setAttr ".st" 6; |
| 1135 | if ( mPlaybackOptions.getMaxEndTime () > 0 ) |
| 1136 | { |
| 1137 | MayaDM::Script scriptNode ( file, SCRIPT_NODE_SCENE_CONFIG ); |
| 1138 | std::ostringstream scriptValue; |
| 1139 | scriptValue << "playbackOptions -min " << mPlaybackOptions.getMinStartTime () |
| 1140 | << " -max " << mPlaybackOptions.getMaxEndTime () << " -ast " |
| 1141 | << mPlaybackOptions.getMinStartTime () << " -aet " << mPlaybackOptions.getMaxEndTime (); |
| 1142 | |
| 1143 | scriptNode.setBefore ( scriptValue.str () ); |
| 1144 | scriptNode.setScriptType ( 2 ); |
| 1145 | } |
| 1146 | } |
| 1147 | |
| 1148 | //------------------------------ |
| 1149 | const bool AnimationImporter::findAnimation ( const COLLADAFW::UniqueId& animationId ) |
nothing calls this directly
no test coverage detected