mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
decal safeties via if (mMaterialAsset.notNull() && mMaterialAsset->getStatus() == MaterialAsset::Ok)
This commit is contained in:
parent
68fee78744
commit
0bf97ad2c8
1 changed files with 4 additions and 2 deletions
|
|
@ -202,7 +202,7 @@ void DecalData::initPersistFields()
|
||||||
"grid; use #textureCoords to manually specify UV coordinates for "
|
"grid; use #textureCoords to manually specify UV coordinates for "
|
||||||
"irregular sized frames." );
|
"irregular sized frames." );
|
||||||
|
|
||||||
addField( "textureCoords", TypeRectF, Offset( texRect, DecalData ), MAX_TEXCOORD_COUNT,
|
addField( "textureCoords", TypeRectUV, Offset( texRect, DecalData ), MAX_TEXCOORD_COUNT,
|
||||||
"@brief An array of RectFs (topleft.x topleft.y extent.x extent.y) "
|
"@brief An array of RectFs (topleft.x topleft.y extent.x extent.y) "
|
||||||
"representing the UV coordinates for each frame in the imagemap.\n\n"
|
"representing the UV coordinates for each frame in the imagemap.\n\n"
|
||||||
"@note This field should only be set if the imagemap frames are "
|
"@note This field should only be set if the imagemap frames are "
|
||||||
|
|
@ -313,7 +313,9 @@ void DecalData::_initMaterial()
|
||||||
{
|
{
|
||||||
SAFE_DELETE( matInst );
|
SAFE_DELETE( matInst );
|
||||||
|
|
||||||
if (mMaterialAsset.notNull())
|
_setMaterial(getMaterial());
|
||||||
|
|
||||||
|
if (mMaterialAsset.notNull() && mMaterialAsset->getStatus() == MaterialAsset::Ok)
|
||||||
{
|
{
|
||||||
matInst = getMaterialResource()->createMatInstance();
|
matInst = getMaterialResource()->createMatInstance();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue