Page MenuHome

Added framework for Simulate modifier tests
Needs ReviewPublic

Authored by Himanshi Kalra (calra) on Mar 4 2020, 3:12 AM.



A class called PhysicsSpec is made for Simulate modifiers.
The tests are added for:
Soft Body
Note for future: The Physics calculations are done on world coordinates as told by Luca Rood in T74036, so for these tests, duplicate the objects in position otherwise the tests will fail because of threshold.

The blend files should be added in lib/tests/modeling

Diff Detail

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Mar 4 2020, 10:12 AM

Thanks! Seems generally fine, though I haven't tried running the test.

Can this be made into a separate test with own .blend for every physics type? They're all modifiers, but it's specific enough that you'd want to be able to run them individually.

244 ↗(On Diff #22354)

Code style: here and in other places, always add a space after , and :.


frame_number -> frame_end


Code style: no empty line right after def line.


Avoid using operators when possible, this can probably be scene.frame_set or similar?

It's not even clear to me what this line does, which frame is it supposed to jump to?


Code style: use only one empty line as separator inside functions.


Easier to just pass the physics_spec entirely to this function.

This revision now requires changes to proceed.Mar 4 2020, 10:12 AM

Incorporating inline comments.

Himanshi Kalra (calra) marked 5 inline comments as done.Fri, Mar 13, 9:05 AM
Himanshi Kalra (calra) added inline comments.

Accessing using physics_spec feels unnecessarily long.

Himanshi Kalra (calra) updated this revision to Diff 23069.EditedTue, Mar 24, 6:11 PM

Added Individual files for testing for Cloth and SoftBody.

Himanshi Kalra (calra) edited the summary of this revision. (Show Details)Tue, Mar 24, 7:07 PM
Himanshi Kalra (calra) edited the summary of this revision. (Show Details)