Matte
eharetea

Hscript used to get objects to render as a matte, creating a render pass.

Render pass script.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday July 30th, 2008 09:03 PM


set SOP = `oppwf()`

set matte = `chs("$SOP/mattedisplay")`
set passname = `chs("$SOP/passname")`
set passarg = `argc($passname)`

 if ($passarg==0#pass check
         message You must enter a name for this pass!
 else             #pass check
         

message $matte
# if one argument is in the field, it doesnt need to loop and increment the var

# matte
if `argc($matte)` > "1" then
    for 0 to `evals(argc($matte)-1)`

        set objd = `arg($matte, $i)`
        set endis opparm ${OBJECTCONTAINER}${objdtmatte 1 matte 1;
        set nendis $nendis $endis

        set pendis opparm ${OBJECTCONTAINER}${objdmatte 0 tmatte 0;
        set pnendis $pnendis $pendis
        
    end
else
    set objd $matte
    set nendis opparm ${OBJECTCONTAINER}${objdtmatte 1 matte 1;
    set pnendis opparm ${OBJECTCONTAINER}${objdmatte 0 tmatte 0;

endif

    cd $SOP/codegen
    set passname = `strreplace($passname, " ","_")`
    set qikck = `opexist($passname)`
  
      if ($qikck==1)
        message This Pass existsChange name to continue.
      else
        opadd houdini_code $passname
        otunsync $passname
       
        opparm $SOP/codegen/$passname pre_em ("$nendis")
        opparm $SOP/codegen/$passname post_em ("$pnendis")    
        oppane -t parmeditor $SOP/codegen/$passname
      endif

 endif #pass check    



Downloads:
Download: matte.sh 1 KB

Please login or Click Here to register for downloads
Creative Commons License
Matte by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com