mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-05 04:25:16 +00:00
* Update levelAsset creation so it can be flagged to be creating a subScene preemptively, improving workflow when creating a SubScene level asset 'in place' via the inspector.
* Fixed issue of creating new SubScene using the full level template instead of a blank level file * Fixed subScene inspector field handling so clicking the create new will mark the 'in place' created level asset as a subscene appropriately * Changed up persistenceManager logic when parsing objects out - especially with specialty fields - to use Strings instead of const char* to simplify memory juggling and improve stability * Rolled back specialty array field outputs for decal roads and convex shapes to have the field names in the output again * Added sanity check for MeshRoad's when writing out via specialty array field to ensure there are profile nodes before trying to write any * Added sanity check to avoid pointlessly writing out meshroad and river position field into subScene file as it could cause a transform double-up and cause them to move when loading from a subscene
This commit is contained in:
parent
f71f4e051f
commit
0d338f2d51
10 changed files with 124 additions and 84 deletions
|
|
@ -43,6 +43,7 @@
|
|||
// Debug Profiling.
|
||||
#include "platform/profiler.h"
|
||||
#include "gfx/gfxDrawUtil.h"
|
||||
#include "T3D/SubScene.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -479,8 +480,15 @@ GuiControl* GuiInspectorTypeLevelAssetPtr::constructEditControl()
|
|||
// Create "Open in Editor" button
|
||||
mEditButton = new GuiBitmapButtonCtrl();
|
||||
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "$createAndAssignField = %s; AssetBrowser.setupCreateNewAsset(\"LevelAsset\", AssetBrowser.selectedModule, \"createAndAssignLevelAsset\");",
|
||||
getIdString());
|
||||
String setSubSceneValue = "$createLevelAssetIsSubScene = \"\";";
|
||||
if(dynamic_cast<SubScene*>(mInspector->getInspectObject()) != NULL)
|
||||
{
|
||||
setSubSceneValue = "$createLevelAssetIsSubScene = true;";
|
||||
}
|
||||
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "$createAndAssignField = %s; %s AssetBrowser.setupCreateNewAsset(\"LevelAsset\", AssetBrowser.selectedModule, \"createAndAssignLevelAsset\");",
|
||||
getIdString(),
|
||||
setSubSceneValue.c_str());
|
||||
mEditButton->setField("Command", szBuffer);
|
||||
|
||||
char bitmapName[512] = "ToolsModule:iconAdd_image";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue