mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-28 07:45:40 +00:00
Merge branch 'Preview4_0' of https://github.com/TorqueGameEngines/Torque3D into Preview4_0
This commit is contained in:
commit
d06bc790e3
12 changed files with 147 additions and 74 deletions
|
|
@ -405,7 +405,12 @@ public: \
|
|||
else if (m##name##AssetId[index] != StringTable->EmptyString())\
|
||||
return m##name##AssetId[index];\
|
||||
else if (m##name##Name[index] != StringTable->EmptyString())\
|
||||
return StringTable->insert(Platform::makeRelativePathName(m##name##Name[index], Platform::getMainDotCsDir()));\
|
||||
{\
|
||||
if (String(m##name##Name[index]).startsWith("#") || String(m##name##Name[index]).startsWith("$"))\
|
||||
return StringTable->insert(m##name##Name[index]);\
|
||||
else\
|
||||
return StringTable->insert(Platform::makeRelativePathName(m##name##Name[index], Platform::getMainDotCsDir()));\
|
||||
}\
|
||||
else\
|
||||
return StringTable->EmptyString();\
|
||||
}\
|
||||
|
|
|
|||
|
|
@ -721,27 +721,27 @@ String AssetImporter::parseImageSuffixes(String assetName, String* suffixType)
|
|||
{
|
||||
case 0:
|
||||
suffixList = activeImportConfig->DiffuseTypeSuffixes;
|
||||
suffixType->insert(0, "Albedo", 10);
|
||||
suffixType->insert(0, "Albedo", 6);
|
||||
break;
|
||||
case 1:
|
||||
suffixList = activeImportConfig->NormalTypeSuffixes;
|
||||
suffixType->insert(0, "Normal", 10);
|
||||
suffixType->insert(0, "Normal", 6);
|
||||
break;
|
||||
case 2:
|
||||
suffixList = activeImportConfig->RoughnessTypeSuffixes;
|
||||
suffixType->insert(0, "Roughness", 10);
|
||||
suffixType->insert(0, "Roughness", 9);
|
||||
break;
|
||||
case 3:
|
||||
suffixList = activeImportConfig->AOTypeSuffixes;
|
||||
suffixType->insert(0, "AO", 10);
|
||||
suffixType->insert(0, "AO", 2);
|
||||
break;
|
||||
case 4:
|
||||
suffixList = activeImportConfig->MetalnessTypeSuffixes;
|
||||
suffixType->insert(0, "Metalness", 10);
|
||||
suffixType->insert(0, "Metalness", 9);
|
||||
break;
|
||||
case 5:
|
||||
suffixList = activeImportConfig->PBRTypeSuffixes;
|
||||
suffixType->insert(0, "ORMConfig", 10);
|
||||
suffixType->insert(0, "ORMConfig", 9);
|
||||
break;
|
||||
default:
|
||||
suffixList = "";
|
||||
|
|
|
|||
|
|
@ -731,7 +731,8 @@ void Trigger::potentialEnterObject(GameBase* enter)
|
|||
|
||||
if(evalCmD(&mEnterCommand))
|
||||
{
|
||||
String command = String("%obj = ") + enter->getIdString() + ";" + mEnterCommand;
|
||||
String command = String("%obj = ") + enter->getIdString() + ";";
|
||||
command = command + String("%this = ") + getIdString() + ";" + mEnterCommand;
|
||||
Con::evaluate(command.c_str());
|
||||
}
|
||||
|
||||
|
|
@ -779,7 +780,8 @@ void Trigger::processTick(const Move* move)
|
|||
|
||||
if (evalCmD(&mLeaveCommand))
|
||||
{
|
||||
String command = String("%obj = ") + remove->getIdString() + ";" + mLeaveCommand;
|
||||
String command = String("%obj = ") + remove->getIdString() + ";";
|
||||
command = command + String("%this = ") + getIdString() + ";" + mLeaveCommand;
|
||||
Con::evaluate(command.c_str());
|
||||
}
|
||||
if (testTrippable() && testCondition())
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@
|
|||
#include "materials/materialFeatureTypes.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "T3D/accumulationVolume.h"
|
||||
#include "math/mTransform.h"
|
||||
|
||||
#include "gui/editor/inspector/group.h"
|
||||
#include "console/typeValidators.h"
|
||||
|
|
@ -1863,3 +1864,31 @@ void TSStatic::setSelectionFlags(U8 flags)
|
|||
}
|
||||
}
|
||||
|
||||
void TSStatic::getNodeTransform(const char *nodeName, const MatrixF &xfm, MatrixF *outMat)
|
||||
{
|
||||
|
||||
S32 nodeIDx = getShapeResource()->findNode(nodeName);
|
||||
|
||||
MatrixF mountTransform = mShapeInstance->mNodeTransforms[nodeIDx];
|
||||
mountTransform.mul(xfm);
|
||||
const Point3F &scale = getScale();
|
||||
// The position of the mount point needs to be scaled.
|
||||
Point3F position = mountTransform.getPosition();
|
||||
position.convolve(scale);
|
||||
mountTransform.setPosition(position);
|
||||
// Also we would like the object to be scaled to the model.
|
||||
outMat->mul(mObjToWorld, mountTransform);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
DefineEngineMethod(TSStatic, getNodeTransform, TransformF, (const char *nodeName), ,
|
||||
"@brief Get the world transform of the specified mount slot.\n\n"
|
||||
|
||||
"@param slot Image slot to query\n"
|
||||
"@return the mount transform\n\n")
|
||||
{
|
||||
MatrixF xf(true);
|
||||
object->getNodeTransform(nodeName, MatrixF::Identity, &xf);
|
||||
return xf;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -276,6 +276,7 @@ public:
|
|||
void updateMaterials();
|
||||
|
||||
bool isAnimated() { return mPlayAmbient; }
|
||||
void getNodeTransform(const char *nodeName, const MatrixF &xfm, MatrixF *outMat);
|
||||
|
||||
virtual void getUtilizedAssets(Vector<StringTableEntry>* usedAssetsList);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue