[Sidefx-houdini-list] munging IFD files

Van Aarde nanocell at gmail.com
Thu Oct 22 02:37:18 EDT 2009


Hi Drew,

Yes, the ray_ commands are documented in the Houdini help under
/rendering/ifd (titled "Rendering the IFD Format"). If you just do search in
the help with "ray_property" you should the page there in the results ;).

CheerZ,
Van Aarde.

On Thu, Oct 22, 2009 at 3:21 AM, Drew Whitehouse
<drew.whitehouse at gmail.com>wrote:

> I guess my original approach will have to suffice, as I also need to know
> which files are written during the render as well as read. The general idea
> is to use something like rsync to get from, and put back, the files from
> their original file system. The following bit of python script sort of
> works
> to extract the file names, but how many of the  ray_*  commands have file
> like parameters ? Are they documented anywhere ?
>
> The idea is that all of the files start off on one machine under fprefix
> and
> migrate to other machines with the same path, then are sync'd back again
> post render.
>
> ifdfile = 'test.ifd'
> fprefix='"/short/z03'
>
> refs = set()
>
> with open('test.ifd','r') as f:
>    for line in f:
>        if 'ray_property' in line:
>            line = line.split()[2:]
>            for p in line:
>                if fprefix in p:
>                    refs.add(p)
>        elif 'ray_loadotl' in line:
>            ref = line.split()[1]
>            if fprefix in ref:
>                refs.add(ref)
>        elif 'ray_image' in line:
>            ref = line.split()[1]
>            if fprefix in ref:
>                refs.add(ref)
>
> refs = [r.strip('"') for r in refs]
>
> print 'File like references ...'
> for r in refs:
>    print r
>
> -Drew
>
> On Wed, Oct 21, 2009 at 10:21 PM, Mark Elendt <mark at sidefx.com> wrote:
>
> > On Wednesday Oct 21 at 07:07, Mark Elendt wrote:
> > > On Wednesday Oct 21 at 15:00, Drew Whitehouse wrote:
> > > > Hi people,
> > > > Is there any "robust" way to extract/modify every filename-like
> > attribute in
> > > > an IFD file ? Can it be done with mantra filters ? Can it be done
> > quickly in
> > > > a way that doesn't involve parsing / loading the (possibly huge)
> binary
> > > > chunks in the IFD file ?
> > > >
> > > > I'm looking for a way to make IFD files transportable from one render
> > farm
> > > > to another. We've been doing it heuristically with python scripts,
> but
> > with
> > > > the new SOHO drivers they're now broken and I'd like to do it again,
> > and
> > > > more correctly this time. Any ideas ?
> > >
> > > You might want to check out Python filtering:
> > >
> > >     http://www.sidefx.com/docs/houdini9.5/rendering/python
> >
> > D'oh.  I didn't read "filename like" attribute.  Python filtering will
> > most likely involve some parsing.
> >
> > Aside from Andrew's suggestion, you can also rely on Houdini search
> > paths (i.e. don't specify full paths in the source).
> >
> > --
> > Mark Elendt
> >
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
>
>
>
> --
> Drew Whitehouse
> ANU Supercomputer Facility Vizlab
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>



-- 
Van Aarde Krynauw
http://www.crazycoder.co.za

Programmer, BlackGinger, South Africa.
www.blackginger.tv



More information about the Sidefx-houdini-list mailing list