| 414 | } |
| 415 | |
| 416 | static pag::TextAnimator* GetTextAnimator(const AEGP_StreamRefH& streamHandle) { |
| 417 | auto animator = new pag::TextAnimator(); |
| 418 | const auto& Suites = GetSuites(); |
| 419 | const auto& PluginID = GetPluginID(); |
| 420 | |
| 421 | A_long numStreams = 0; |
| 422 | Suites->DynamicStreamSuite4()->AEGP_GetNumStreamsInGroup(streamHandle, &numStreams); |
| 423 | for (long index = 0; index < numStreams; index++) { |
| 424 | AEGP_StreamRefH childStreamHandle = nullptr; |
| 425 | Suites->DynamicStreamSuite4()->AEGP_GetNewStreamRefByIndex(PluginID, streamHandle, index, |
| 426 | &childStreamHandle); |
| 427 | if (childStreamHandle == nullptr) { |
| 428 | continue; |
| 429 | } |
| 430 | if (!IsStreamHidden(childStreamHandle) && IsStreamActive(childStreamHandle)) { |
| 431 | auto type = GetTextAnimatorType(childStreamHandle); |
| 432 | if (type == TextAnimatorType::Selectors) { |
| 433 | auto selectors = GetTextSelectors(childStreamHandle); |
| 434 | animator->selectors.insert(animator->selectors.end(), selectors.begin(), selectors.end()); |
| 435 | } else if (type == TextAnimatorType::AnimatorProperties) { |
| 436 | animator->colorProperties = GetTextAnimatorColorProperties(childStreamHandle); |
| 437 | animator->typographyProperties = GetTextAnimatorTypographyProperties(childStreamHandle); |
| 438 | } |
| 439 | } |
| 440 | Suites->StreamSuite4()->AEGP_DisposeStream(childStreamHandle); |
| 441 | } |
| 442 | if (!animator->verify()) { |
| 443 | delete animator; |
| 444 | return nullptr; |
| 445 | } |
| 446 | return animator; |
| 447 | } |
| 448 | |
| 449 | static std::vector<pag::TextAnimator*> GetTextAnimators(const AEGP_StreamRefH& streamHandle) { |
| 450 | const auto& Suites = GetSuites(); |
no test coverage detected