|
@ -67,8 +67,13 @@ class Film extends BaseCfg |
|
|
Base::__construct($config); |
|
|
Base::__construct($config); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public function addImage(object $object, $outDir) |
|
|
|
|
|
|
|
|
public function addImage(object $object, $outDir, $filename = null) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if($filename){ |
|
|
|
|
|
$object->filename = $filename; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$nowTime = date("Y-m-d_H:i:s"); |
|
|
$i = -1; |
|
|
$i = -1; |
|
|
if($object->type == Image::TYPE_RGB_IMAGEPIPELINE){ |
|
|
if($object->type == Image::TYPE_RGB_IMAGEPIPELINE){ |
|
|
foreach($this->outputs as $value){ |
|
|
foreach($this->outputs as $value){ |
|
@ -77,24 +82,27 @@ class Film extends BaseCfg |
|
|
$object->index = $i + 1; |
|
|
$object->index = $i + 1; |
|
|
if ($object->effect != null){ |
|
|
if ($object->effect != null){ |
|
|
$this->imagepipelines[ sprintf("%03d",$object->index) ] = $object->effect; |
|
|
$this->imagepipelines[ sprintf("%03d",$object->index) ] = $object->effect; |
|
|
$object->effect = null; |
|
|
|
|
|
} |
|
|
} |
|
|
$object->filename = "{$object->type}_{$object->index}.png"; |
|
|
|
|
|
|
|
|
if(!$object->filename){ |
|
|
|
|
|
$object->filename = "{$nowTime}_{$object->type}_{$object->index}"; |
|
|
|
|
|
} |
|
|
|
|
|
$object->filename = $object->filename.".png"; |
|
|
}else{ |
|
|
}else{ |
|
|
if(!$object->filename){ |
|
|
if(!$object->filename){ |
|
|
if( in_array($object->type,Image::PNG ) ){ |
|
|
|
|
|
$object->filename = "{$object->type}.png"; |
|
|
|
|
|
} |
|
|
|
|
|
else if ( in_array($object->type,Image::EXR) ){ |
|
|
|
|
|
$object->filename = "{$object->type}.exr"; |
|
|
|
|
|
} |
|
|
|
|
|
else{ |
|
|
|
|
|
$object->filename = "{$object->type}.jpg"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
$object->filename = "{$nowTime}_{$object->type}"; |
|
|
|
|
|
} |
|
|
|
|
|
if( in_array($object->type,Image::PNG ) ){ |
|
|
|
|
|
$object->filename = $object->filename.".png"; |
|
|
|
|
|
} |
|
|
|
|
|
else if ( in_array($object->type,Image::EXR) ){ |
|
|
|
|
|
$object->filename = $object->filename.".exr"; |
|
|
|
|
|
} |
|
|
|
|
|
else{ |
|
|
|
|
|
$object->filename = $object->filename.".jpg"; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
$nowTime = date("Y-m-d_H:i:s"); |
|
|
|
|
|
$object->filename = "{$outDir}/{$nowTime}_{$object->filename}"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$object->filename = "{$outDir}/{$object->filename}"; |
|
|
$this->outputs[] = $object; |
|
|
$this->outputs[] = $object; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|