| 149 |
|
</WindowElement> |
| 150 |
|
'; |
| 151 |
|
# Clean up temporary files and exit |
| 152 |
– |
if ( $persistfile && open(PFI, "< $persistfile") ) { |
| 153 |
– |
while (<PFI>) { |
| 154 |
– |
s/^[^ ]* //; |
| 155 |
– |
kill('ALRM', $_); |
| 156 |
– |
last; |
| 157 |
– |
} |
| 158 |
– |
close PFI; |
| 159 |
– |
} |
| 152 |
|
exec("rm -rf $td"); |
| 153 |
|
|
| 154 |
|
#-------------- End of main program segment --------------# |
| 155 |
|
|
| 156 |
+ |
#++++++++++++++ Kill persistent rtrace +++++++++++++++++++# |
| 157 |
+ |
sub persist_end { |
| 158 |
+ |
if ( $persistfile && open(PFI, "< $persistfile") ) { |
| 159 |
+ |
while (<PFI>) { |
| 160 |
+ |
s/^[^ ]* //; |
| 161 |
+ |
kill('ALRM', $_); |
| 162 |
+ |
last; |
| 163 |
+ |
} |
| 164 |
+ |
close PFI; |
| 165 |
+ |
} |
| 166 |
+ |
} |
| 167 |
+ |
|
| 168 |
|
#++++++++++++++ Tensor tree BSDF generation ++++++++++++++# |
| 169 |
|
sub do_tree_bsdf { |
| 170 |
|
# Get sampling rate and subdivide task |
| 240 |
|
die "rtcontrib process reported error" if ( $? ); |
| 241 |
|
$npleft++; |
| 242 |
|
} |
| 243 |
+ |
persist_end(); |
| 244 |
|
ttree_out(0); |
| 245 |
|
} |
| 246 |
|
if ( $doforw ) { |
| 257 |
|
die "rtcontrib process reported error" if ( $? ); |
| 258 |
|
$npleft++; |
| 259 |
|
} |
| 260 |
+ |
persist_end(); |
| 261 |
|
ttree_out(1); |
| 262 |
|
} |
| 263 |
|
} # end of sub do_tree_bsdf() |