[Sidefx-houdini-list] Collect Files?

jason iversen jiversen at d2.com
Sun Mar 5 19:33:16 EST 2006


I've done this a couple of times; for different reason. I'll post some 
skeleton code here:

*- this embeds all custom otls into your hipfile.*

set ots = `execute("otinuse -t")`
foreach ot ($ots)
  set original_otl = `execute("otgetotl $ot")`
  if( "$original_otl" != "Embedded" )
    if( `strmatch("${HFS}*","$original_otl")` == 1 )
      echo "hardenOTLs.cmd: not copy $ot because it's in the houdini 
distribution."
    else
      echo "($ot) copying operator type into the Embedded section from 
$original_otl."
      otcopy $ot Embedded
      otprefer $ot Embedded
  else
    echo "($ot) this operator type is already Embedded."
  endif
end

*
- this copies external file refs to a recursed structure under you 
directory and points the file path to them.  this doesn't always work 
and god forbid you have expressions controlling paths or filenames. :)*


set found = $found `run("opfind -w 
'*/some/pattern/you/recognize/as/a/path/and/not/just/a/string*'")`
# or use opextern to find file references.

set totalnum = `argc("$found")`
set num = 0
foreach nodeparm ($found)
  set num = `$num + 1`
  echo "processing: $num/$totalnum"
  set file = `chs($nodeparm)`
  set torelfile = `substr($file,1,1000)`
  set tofile = $base_dir/`substr($file,1,1000)`
  set dir = `substr($tofile,0,rindex($tofile,"/"))`
 
  echo "-- mkdir $dir"
  unix "mkdir -p $dir"
  echo "-- cp $file $tofile"
  unix "cp $file $tofile"
 
  set node = `substr($nodeparm,0,rindex($nodeparm,"/"))`
  set parm = `substr($nodeparm,rindex($nodeparm,"/")+1,1000)`
  echo "-- opparm $node $parm ( \$HIP/$torelfile )"
  opparm $node $parm ( \$HIP/$torelfile )
end

varchange



Peter Bowmar wrote:
> There is the "opextern" Hscript command that will list them in various
> ways, however it's up to you to make a script that actually pulls them
> in.
>
> This is actually a big job, especially if you want to be able to go
> back to exactly that version of Houdini. It means you need to find all
> your OTL files, VEX files, external scripts, the actual binary of
> Houdini that you were using etc etc and put that all into an archive.
> It's not easy, but it's possible :)
>
> Cheers,
>
> Peter B
>
> On 04/03/06, Fat Tony <anthonysidefx at gmail.com> wrote:
>   
>> I would like to know if there is a command or script to make Houdini
>> go out and grab all the files being currently used by your project,
>> and copy them into a new folder.  Basically after working on the same
>> project for a few weeks, obviously I get lots of test files building
>> up that are no longer needed.  Or maybe I should just become more
>> organized :).  Thanks
>>
>> Anthony
>> _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>
>>     
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
>   

-- 
jason iversen
 digital domain
  technical director
  
aim:jdiversen|w(310)314-2800x2305|m(310)699-6648|http://odforce.net




More information about the Sidefx-houdini-list mailing list