mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Initial implementation of the Scene object for handling scenes/levels in a more consistent and deliberate way.
This commit is contained in:
parent
775ca57047
commit
9bf8337e4a
37 changed files with 509 additions and 140 deletions
|
|
@ -354,13 +354,13 @@ function CreateNewNavMeshDlg::create(%this)
|
|||
|
||||
if(MeshMissionBounds.isStateOn())
|
||||
{
|
||||
if(!isObject(MissionGroup))
|
||||
if(!isObject(getScene(0)))
|
||||
{
|
||||
MessageBoxOk("Error", "You must have a MissionGroup to use the mission bounds function.");
|
||||
MessageBoxOk("Error", "You must have a Scene to use the mission bounds function.");
|
||||
return;
|
||||
}
|
||||
// Get maximum extents of all objects.
|
||||
%box = MissionBoundsExtents(MissionGroup);
|
||||
%box = MissionBoundsExtents(getScene(0));
|
||||
%pos = GetBoxCenter(%box);
|
||||
%scale = (GetWord(%box, 3) - GetWord(%box, 0)) / 2 + 5
|
||||
SPC (GetWord(%box, 4) - GetWord(%box, 1)) / 2 + 5
|
||||
|
|
@ -380,7 +380,7 @@ function CreateNewNavMeshDlg::create(%this)
|
|||
scale = %this-->MeshScale.getText();
|
||||
};
|
||||
}
|
||||
MissionGroup.add(%mesh);
|
||||
getScene(0).add(%mesh);
|
||||
NavEditorGui.selectObject(%mesh);
|
||||
|
||||
Canvas.popDialog(CreateNewNavMeshDlg);
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ function NavEditorPlugin::onSaveMission(%this, %missionFile)
|
|||
{
|
||||
if(NavEditorGui.isDirty)
|
||||
{
|
||||
MissionGroup.save(%missionFile);
|
||||
getScene(0).save(%missionFile);
|
||||
NavEditorGui.isDirty = false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue