With help from Michal aka ogre over on the 3delight forum I was able to get this technique up and running. I was looking for a way of offsetting the start frame for animation loops in each DRA (Delayed Rib Archive)and also to specify when a sequence would start in the parent timeline of maya. Here’s an example scene provided by Michal with the required scripts.
In the manual there is a mention of of how a mel command can be called as a file path expression. Michal advised that a little hacking is needed of the ‘DL_ribArchive’ mel script which is in maya folder in 3delight (you will find it in the download). Have a read of it and you can see where the changes are.
1 – Output a sequence of rib archives.
2 – Create as many DRAs as you want (3delight > add ribArchive)
3 – Attach a attribute called “ribFrameOffset” to the Shape Node of each Archive. With a mel script a random integer could be given to each one e.g 1-25
4. – In the ‘Rib FileName’ address box of each archive goes the address to where the rib archives are. e.g C:\RibArchives\RibSequence_
5. The ‘GET_FRAME’ is referring to the mel script called GET_FRAME which is in the download and should be put in your script folder. The script is based on a 1-25 frame sequence, so you can adapt the script or create further ones for different sequence lengths.
6. A positive integer in the ribFrameOffset will offset the start frame of the loop. A negative will delay the whole sequence for the attached archive in frames. In effect the archive won’t be visible in the maya timeline until the currentTime of Maya becomes equal to it. There is probably a way of tweaking the scripting further so the user could both offset the start frame of the loop and start frame in the maya parent timeline.
I’ve done some tests and there are some gotchas. When there are hundreds of archives then it gets slooooow – the way the pre-geo mel script works its making calls on every frame and so there’s a hit. I’m doing some tests by using a script that deletes Archives after a certain point. A more efficient way is to use a RunProgram which I’m looking into as well.