|
|
@ -98,15 +98,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setBaseColor($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->basecolor = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->basecolor = $color; |
|
|
|
$this->basecolor = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -114,15 +106,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setSubsurface($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->subsurface = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->subsurface = $color; |
|
|
|
$this->subsurface = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -130,15 +114,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setMetallic($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->metallic = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->metallic = $color; |
|
|
|
$this->metallic = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -146,15 +122,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setSpecular($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->specular = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->specular = $color; |
|
|
|
$this->specular = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -162,15 +130,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setSpeculartint($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->speculartint = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->speculartint = $color; |
|
|
|
$this->speculartint = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -178,15 +138,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setRoughness($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->roughness = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->roughness = $color; |
|
|
|
$this->roughness = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -194,15 +146,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setAnisotropic($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->anisotropic = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->anisotropic = $color; |
|
|
|
$this->anisotropic = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -210,15 +154,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setSheen($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->sheen = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->sheen = $color; |
|
|
|
$this->sheen = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -226,15 +162,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setSheentint($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->sheentint = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->sheentint = $color; |
|
|
|
$this->sheentint = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -242,15 +170,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setClearcoat($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->clearcoat = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->clearcoat = $color; |
|
|
|
$this->clearcoat = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -258,15 +178,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setClearcoatgloss($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->clearcoatgloss = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->clearcoatgloss = $color; |
|
|
|
$this->clearcoatgloss = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -274,30 +186,15 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setFilmamount($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->filmamount = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->filmamount = $color; |
|
|
|
$this->filmamount = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param object $color 接收一个贴图对象或小数形式的色值,设置Disney清漆涂层厚度 |
|
|
|
*/ |
|
|
|
public function setFilmthickness($color) |
|
|
|
{ if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->filmthickness = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->filmthickness = $color; |
|
|
|
$this->filmthickness = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -305,15 +202,7 @@ class Disney extends MaterialsBase |
|
|
|
*/ |
|
|
|
public function setFilmior($color) |
|
|
|
{ |
|
|
|
if( is_object($color) ) |
|
|
|
{ |
|
|
|
if( $color->registerId != null ) $this->filmior = $color->registerId; |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new \Exception("You use an unregistered ".$color->getInstanceClassName()." object for the current property"); |
|
|
|
} |
|
|
|
} |
|
|
|
else $this->filmior = $color; |
|
|
|
$this->filmior = Scene::testAbnormal($color); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|