[Sidefx-houdini-list] COPs sequencing, interleaved rather than end-to-end?

Andy Nicholas andy at andynicholas.com
Sun Jan 20 16:12:39 EST 2008


Hi Darren,

Assuming that your images are in "C:/Images/", that your frame count starts
at 1, and your files are numbered also starting at 1, then this expression
should do it:

C:/Images/img`padzero(3,($F+1)/3)+substr("abc",($F-1)%3,1)`.jpg

But you have to make sure that you enable "Override Frame Range" on your
file COP and set "File Range Length" to something sensible. Otherwise it'll
try to auto detect, apparently without much success.

Cheers

Andy

 

-----Original Message-----
From: sidefx-houdini-list-bounces at sidefx.com
[mailto:sidefx-houdini-list-bounces at sidefx.com] On Behalf Of Darran
Edmundson
Sent: 20 January 2008 19:54
To: sidefx-houdini-list at sidefx.com
Subject: [Sidefx-houdini-list] COPs sequencing,interleaved rather than
end-to-end?


I have an ordered sequence of images on disk with the following naming
scheme:

img001a.png
img001b.png
img001c.png
img002a.png
img002b.png
img002c.png
[...]

What clever expression in a File COP would load these files in order? 
At the moment I have 3 File COPs, one each for the 'a', 'b' and 'c' 
sequences.  Merged together, I was then looking at the Shuffle COP for
in-place (non-cached) reordering.

Of course I could just rename these files with a bit of python
(untested) and be done with it ... but I'd prefer a houdini solution.

import os
from glob import glob
files = glob("img*.png")
files.sort()
for i,f in enumerate(files):
     os.system("mv %s newimage%4d.png" % (f,i))

Cheers,
Darran

--
Darran Edmundson [darran at edmstudio.com]
http://www.edmstudio.com
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list





More information about the Sidefx-houdini-list mailing list