Initial implementation of the Scene object for handling scenes/levels in a more consistent and deliberate way.

This commit is contained in:
Areloch 2019-02-23 15:55:28 -06:00
parent 775ca57047
commit 9bf8337e4a
37 changed files with 509 additions and 140 deletions

View file

@ -1584,7 +1584,7 @@ function ColladaImportDlg::onOK(%this)
function ColladaImportDlg::loadLights(%this)
{
// Get the ID of the last object added
%obj = MissionGroup.getObject(MissionGroup.getCount()-1);
%obj = getScene(0).getObject(getScene(0).getCount()-1);
// Create a new SimGroup to hold the model and lights
%group = new SimGroup();
@ -1596,7 +1596,7 @@ function ColladaImportDlg::loadLights(%this)
{
%group.add(%obj);
%group.bringToFront(%obj);
MissionGroup.add(%group);
getScene(0).add(%group);
if (EditorTree.isVisible())
{
EditorTree.removeItem(EditorTree.findItemByObjectId(%obj));