| 137 | _graph->_bucketInitializerList.Add(initializer) |
| 138 | |
| 139 | bool AnimGraphBase::onNodeLoaded(Node* n) |
| 140 | { |
| 141 | ((AnimGraphNode*)n)->Graph = _graph; |
| 142 | switch (n->GroupID) |
| 143 | { |
| 144 | // Tools |
| 145 | case 7: |
| 146 | switch (n->TypeID) |
| 147 | { |
| 148 | // Time |
| 149 | case 5: |
| 150 | ADD_BUCKET(AnimationBucketInit); |
| 151 | break; |
| 152 | } |
| 153 | break; |
| 154 | // Animation |
| 155 | case 9: |
| 156 | switch (n->TypeID) |
| 157 | { |
| 158 | // Output |
| 159 | case 1: |
| 160 | _rootNode = n; |
| 161 | if (_rootNode->Values.Count() < 1) |
| 162 | { |
| 163 | _rootNode->Values.Resize(1); |
| 164 | _rootNode->Values[0] = (int32)RootMotionExtraction::NoExtraction; |
| 165 | } |
| 166 | break; |
| 167 | // Animation |
| 168 | case 2: |
| 169 | ADD_BUCKET(AnimationBucketInit); |
| 170 | n->Assets.Resize(1); |
| 171 | n->Assets[0] = (Asset*)Content::LoadAsync<Animation>((Guid)n->Values[0]); |
| 172 | break; |
| 173 | // Blend with Mask |
| 174 | case 11: |
| 175 | n->Assets.Resize(1); |
| 176 | n->Assets[0] = (Asset*)Content::LoadAsync<SkeletonMask>((Guid)n->Values[1]); |
| 177 | break; |
| 178 | // Multi Blend 1D |
| 179 | case 12: |
| 180 | ADD_BUCKET(MultiBlendBucketInit); |
| 181 | n->Data.MultiBlend1D.Count = (ANIM_GRAPH_MULTI_BLEND_INDEX)((n->Values.Count() - 4) / 2); // 4 node values + 2 per blend point |
| 182 | n->Data.MultiBlend1D.Length = -1; |
| 183 | n->Data.MultiBlend1D.IndicesSorted = (ANIM_GRAPH_MULTI_BLEND_INDEX*)Allocator::Allocate(sizeof(ANIM_GRAPH_MULTI_BLEND_INDEX) * n->Data.MultiBlend1D.Count); |
| 184 | n->Assets.Resize(n->Data.MultiBlend1D.Count); |
| 185 | for (int32 i = 0; i < n->Data.MultiBlend1D.Count; i++) |
| 186 | { |
| 187 | n->Assets[i] = Content::LoadAsync<Animation>((Guid)n->Values[i * 2 + 5]); |
| 188 | n->Data.MultiBlend1D.IndicesSorted[i] = (ANIM_GRAPH_MULTI_BLEND_INDEX)(n->Assets[i] ? i : ANIM_GRAPH_MULTI_BLEND_INVALID); |
| 189 | } |
| 190 | Sorting::SortArray(n->Data.MultiBlend1D.IndicesSorted, n->Data.MultiBlend1D.Count, &SortMultiBlend1D, n); |
| 191 | break; |
| 192 | // Multi Blend 2D |
| 193 | case 13: |
| 194 | { |
| 195 | ADD_BUCKET(MultiBlendBucketInit); |
| 196 | n->Data.MultiBlend1D.Count = (ANIM_GRAPH_MULTI_BLEND_INDEX)((n->Values.Count() - 4) / 2); // 4 node values + 2 per blend point |
nothing calls this directly
no test coverage detected