| 261 | } |
| 262 | |
| 263 | static void CheckLayerNum(std::shared_ptr<PAGExportSession> session, |
| 264 | std::vector<pag::Composition*>& compositions) { |
| 265 | constexpr size_t maxLayerNum = 60; |
| 266 | |
| 267 | size_t layerNum = 0; |
| 268 | for (auto composition : compositions) { |
| 269 | if (composition->type() != pag::CompositionType::Vector) { |
| 270 | layerNum++; |
| 271 | continue; |
| 272 | } |
| 273 | for (auto layer : static_cast<pag::VectorComposition*>(composition)->layers) { |
| 274 | if (layer->type() == pag::LayerType::PreCompose) { |
| 275 | continue; |
| 276 | } |
| 277 | layerNum++; |
| 278 | } |
| 279 | } |
| 280 | |
| 281 | if (layerNum > maxLayerNum) { |
| 282 | session->pushWarning(AlertInfoType::LayerNum); |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | static void ZeroingTimeRemapOffset(pag::AnimatableProperty<pag::Frame>* timeRemap) { |
| 287 | auto keyFrames = timeRemap->keyframes; |
no test coverage detected