Tcl
	    	 | 
	
			Introduction
			To explain what is meant by file 
			filtering this tutorial assumes that the contents of one or more RenderMan rib
			files are to be altered ie. filtered, prior to being (batch) rendered
			with Pixar's prman.  | 
	
			Defining the Task and the Filter
			rib files are produced by 3D modeling and animation programs such as Maya
			and Houdini. When rendering a complicated model/scene such applications
			may take a significant amount of time to produce a rib file, or rib files,
			needed by a RenderMan complient renderer.  | 
	
			Search and Replace
			The script developed in this tutorial follows these steps: 
 
			Either the temporary file can be named as a copy or it can be renamed
			to match the name of the target file, in which case it will over-write
			the oribinal file.  | 
	
| 
			 
			In this final version of the procedure, renamed filterrib, the while 
			loop has been modified so that if a match is found for "ShadingRate" 
			a new value of ShadingRate is written to the temp file. Otherwise, 
			text is copied line-by-line from the oribinal rib file to the temp
			rib file. Listing 1 
 It is sometimes useful to measure the time taken to run a procedure. Use the following code to measure time in milliseconds.     set t1 [clock clicks -milliseconds ]
    filterrib "YOUR_PATH/sample.rib"
    set t2 [clock clicks -milliseconds ]
      
    puts "\nTime taken [expr $t2 - $t1] milliseconds"
			
			  | 
	
© 2002- Malcolm Kesson. All rights reserved.