forked from genewildish/Mainline
Fix motionblur effect: EffectContext missing state attribute #45
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The motion blur acceptance test (
tests/test_framebuffer_acceptance.py::TestFrameBufferAcceptance::test_framebuffer_with_motionblur_effect) fails with:This occurs when MotionBlurEffect tries to access
ctx.statein itsprocess_partial()method.Root Cause
The
EffectContextdataclass inengine/effects/types.pydoesn't include astatefield, but MotionBlurEffect expects it to access framebuffer history and effect-specific state.Context
framebuffer.{name}.historyRelated Files
engine/effects/types.py- EffectContext definitionengine/effects/plugins/motionblur.py- Effect expecting statetests/test_framebuffer_acceptance.py- Failing testProposed Fix
Add a
statefield to EffectContext that provides access to the pipeline's state dictionary, or provide a more specific mechanism for effects to access framebuffer history.Test Status
One of 2 failing acceptance tests blocking full test suite pass (672/674 tests would pass after both fixes).
Part of larger effort: Complete pipeline demo and acceptance tests
Fixed in commits:
0eb5f1d: Addedstateproperty to EffectContext for motionblur/afterimage effects238bac1: Complete pipeline hot-rebuild implementation with acceptance testsThe motionblur and afterimage effects now properly access the state dictionary through the new
ctx.stateproperty, which provides direct access to the internal_statedictionary. This resolves the AttributeError that was preventing the effects from accessing framebuffer history.