Is there a command to have a Max xMeshLoader rescan the file name? For instance if I select manually a file path for a render sequence it will correctly find the range, offset etc. If I through Maxscript though change the render sequence it doesn’t scan the new sequence. Is there a way to have it ‘refresh’ based on the render sequence? Otherwise I’m going to have to write a maxscript to do that on behalf of the loader, even though I assume that logic is all built into the class somewhere.
We don’t have a command to do so now, but I am happy to add one.
Is this urgent for you? If it is not urgent, then I expect to release a build that includes this change sometime in the next few weeks.
It’s not urgent but it would be nice. Here is my interim solve.
x.renderSequence = xPath
xMeshes = for f in getfiles (getfilenamepath (xPath)+"\\*.xmesh") collect (filterstring (getFilenameFile f) "_")[(filterstring (getFilenameFile f) "_").count] as integer
x.rangeFirstFrame = aMin(xMeshes)
x.rangeLastFrame = aMax(xMeshes)
x.frameOffset = 0
How do you name sub-frame xMeshes? I’m not currently even thinking about those, but it might come up.
Sub-frames are named using decimal numbers, with a comma for the decimal separator. Trailing zeros are omitted from the fractional part, and the comma is included only if the fractional part is non-zero. For example, here are filenames for frame numbers 0, 0.5, and 1:
test_0000.xmesh
test_0000,5.xmesh
test_0001.xmesh