diff options
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -78,17 +78,21 @@ MainFunction(main_sdl *Main, memory *Memory, Bitmap_Clear(CompBuffer->UnpackedBuffer, CompBuffer->Width, CompBuffer->Height, CompBuffer->BytesPerPixel); for (int i = 0; i < File->NumberOfLayers; i++) { project_layer *Layer = File->Layer[i]; - if (State->UpdateKeyframes) { - for (int p = 0; p < Layer->NumberOfEffects; p++) { - for (int o = 0; o < Layer->Effect[p]->NumberOfProperties; o++) { - CalculateKeyframesLinearly(File->CurrentFrame, &Layer->Effect[p]->Property[o]); - } - } - for (int r = 0; r < AmountOf(Layer->Property); r++) { - CalculateKeyframesLinearly(File->CurrentFrame, &Layer->Property[r]); + if (Layer->StartFrame <= File->CurrentFrame && + Layer->EndFrame >= File->CurrentFrame) + { + if (State->UpdateKeyframes) { + for (int p = 0; p < Layer->NumberOfEffects; p++) { + for (int o = 0; o < Layer->Effect[p]->NumberOfProperties; o++) { + CalculateKeyframesLinearly(File->CurrentFrame, &Layer->Effect[p]->Property[o]); + } + } + for (int r = 0; r < AmountOf(Layer->Property); r++) { + CalculateKeyframesLinearly(File->CurrentFrame, &Layer->Property[r]); + } } + Layer_UpdateBitmap(Layer, Memory, File->CurrentFrame); } - Layer_UpdateBitmap(Layer, Memory, File->CurrentFrame); } State->UpdateKeyframes = false; QueueCurrentFrame(File, CompBuffer, State); |