mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
Add initPersistFields to mPropertyTable
This commit is contained in:
parent
bc435a3b33
commit
c1e64ff3bd
|
|
@ -662,6 +662,27 @@ public:
|
|||
// Finally, do any class specific initialization...
|
||||
T::initPersistFields();
|
||||
T::consoleInit();
|
||||
|
||||
EnginePropertyTable::Property* props = new EnginePropertyTable::Property[sg_tempFieldList.size()];
|
||||
|
||||
for (int i = 0; i < sg_tempFieldList.size(); ++i)
|
||||
{
|
||||
EnginePropertyTable::Property prop;
|
||||
prop.mDocString = sg_tempFieldList[i].pFieldDocs;
|
||||
prop.mName = sg_tempFieldList[i].pFieldname;
|
||||
prop.mNumElements = sg_tempFieldList[i].elementCount;
|
||||
prop.mFlags = 0;
|
||||
if (sg_tempFieldList[i].type == StartGroupFieldType)
|
||||
prop.mFlags |= EnginePropertyGroupBegin;
|
||||
if (sg_tempFieldList[i].type == EndGroupFieldType)
|
||||
prop.mFlags |= EnginePropertyGroupEnd;
|
||||
props[i] = prop;
|
||||
}
|
||||
|
||||
_smPropertyTable = EnginePropertyTable(sg_tempFieldList.size(), props);
|
||||
smPropertyTable = _smPropertyTable;
|
||||
|
||||
const_cast<EngineTypeInfo*>(mTypeInfo)->mPropertyTable = &_smPropertyTable;
|
||||
|
||||
// Let the base finish up.
|
||||
AbstractClassRep::init();
|
||||
|
|
|
|||
Loading…
Reference in a new issue