"in the demo version I can not set the ".animFilename" property of the modifier through maxscript as it is a "read-only" property"
Right, I forgot about that limitation in the demo version. But anyway, if something works in the demo version, it doesn't make sense that it wouldn't work in the commercial one, as the demo is only more limited.
What might cause some difference in the behavior is the version number, that is if the two machines have different versions installed (usually the demo version matches the stable version number, but the commercial version also has nightly builds).
One detail about the script: it must set the Command Panel to the Modify tab, recording may not work otherwise. Our test script uses the "max modify mode" command to do that.
Here's our full test script:
function Test_Recording =
(
local distributionObject = Plane lengthsegs:1 widthsegs:1 isSelected:on
local alembicFilePath = TestUtilities.GetTestFilePath "Test_Recording.abc"
-- Delete the test file from any previous runs
if (doesFileExist alembicFilePath) then deleteFile alembicFilePath
max modify mode
local bendInstance = AddAnimatedBendToSelection()
TestUtilities.AddDefaultGuidesFromSurfaceModifierToSelection()
local verticesOverTimeOnOriginalGuides = TestUtilities.GetHairVerticesOverTime distributionObject 0 5
-- Add strand animation modifier on top and load the saved .abc file
local strandAnimationModifierInstance = Ox_Animation_Cache animFilename: alembicFilePath endframe: 5
modPanel.addModToSelection strandAnimationModifierInstance
strandAnimationModifierInstance.Record 0f 5f
-- Turn off Bend modifier and check results again
bendInstance.enabled = off
local verticesOverTimeOnAnimatedGuides = TestUtilities.GetHairVerticesOverTime distributionObject 0 5
-- Check that points were loaded properly
for i = 1 to (verticesOverTimeOnOriginalGuides.count) do
(
EAssert.ArePointsAllNearEqual verticesOverTimeOnOriginalGuides[i] verticesOverTimeOnAnimatedGuides[i]
)
-- Cleanup
deleteFile alembicFilePath
)
<code> </code>
Ivan Kolev (Software Developer, EPHERE Inc.)
E-mail: ivan.kolev at ephere dot com
Discord: ikolev