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

François Duchesneau sidefx at trinix.ca
Sun Jan 20 15:35:30 EST 2008


Hi Darran, I was going to test it with a File Cop in Python mode but I 
cannot make it work. However in a Python textport you can do it like this.

print 'img'+str(int(math.ceil(ff/3.0)))+chr(((ff-1)%3)+97)+'.pic'

Let me know if you can make it work in the file parameter. I haven't 
used Python yet in Houdini.

François

Darran Edmundson wrote:
> 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
>
>   



More information about the Sidefx-houdini-list mailing list