diff --git a/Engine/source/gui/controls/guiTreeViewCtrl.cpp b/Engine/source/gui/controls/guiTreeViewCtrl.cpp index e568a1c81..080760b59 100644 --- a/Engine/source/gui/controls/guiTreeViewCtrl.cpp +++ b/Engine/source/gui/controls/guiTreeViewCtrl.cpp @@ -540,8 +540,14 @@ void GuiTreeViewCtrl::Item::getDisplayText(U32 bufLen, char *buf) if( mState.test( ShowObjectName ) ) { S32 n = 0; - if( hasObjectName ) - n = dSprintf( ptr, len, "%s", pObjName ); + if (hasObjectName) + { + //If it's been marked, reflect that + if (mState.test(Item::Marked)) + n = dSprintf(ptr, len, "*%s", pObjName); + else + n = dSprintf(ptr, len, "%s", pObjName); + } else if( mState.test( ShowClassNameForUnnamed ) ) n = dSprintf( ptr, len, "%s", pClassName ); @@ -549,8 +555,13 @@ void GuiTreeViewCtrl::Item::getDisplayText(U32 bufLen, char *buf) len -= n; } - if( hasInternalName && mState.test( ShowInternalName ) ) - dSprintf( ptr, len, " [%s]", pInternalName ); + if (hasInternalName && mState.test(ShowInternalName)) + { + if (mState.test(Item::Marked)) + dSprintf(ptr, len, " *[%s]", pInternalName); + else + dSprintf(ptr, len, " [%s]", pObjName); + } } } else diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs index a1ab6fb90..b39839e8d 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.cs @@ -614,6 +614,9 @@ function EditorGui::onNewLevelLoaded( %this, %levelName ) //ECameraSettingsPage.init(); EditorCameraSpeedOptions.setupDefaultState(); + //Set our starting Active Scene being edited + EWorldEditor.SetActiveScene(getRootScene()); + new ScriptObject( EditorMissionCleanup ) { parentGroup = "MissionCleanup"; @@ -1646,7 +1649,10 @@ function EditorTree::onRightMouseUp( %this, %itemId, %mouse, %obj ) } else if( %obj.isMemberOfClass( "Scene" )) { - %popup.item[ 0 ] = "Set as Active Scene" TAB "" TAB "EditorTree.showItemRenameCtrl( EditorTree.findItemByObjectId(" @ %popup.object @ ") );"; + %popup.object = %obj; + %haveObjectEntries = true; + + %popup.item[ 0 ] = "Set as Active Scene" TAB "" TAB "EWorldEditor.SetActiveScene(" @ %popup.object @ ");"; %popup.item[ 1 ] = "Delete" TAB "" TAB "EWorldEditor.deleteMissionObject(" @ %popup.object @ ");"; %popup.item[ 2 ] = "Inspect" TAB "" TAB "inspectObject(" @ %popup.object @ ");"; %popup.item[ 3 ] = "-"; @@ -2280,6 +2286,22 @@ function EWorldEditor::selectAllObjectsInSet( %this, %set, %deselect ) } } +function EWorldEditor::SetActiveScene(%this, %sceneObj) +{ + if(isObject($ActiveEditingScene)) + { + $ActiveEditingScene.isEditing = false; + %itemId = EditorTree.findItemByObjectId($ActiveScene); + EditorTree.markItem(%itemId); + } + + %itemId = EditorTree.findItemByObjectId(%sceneObj); + EditorTree.markItem(%itemId); + + $ActiveEditingScene = %sceneObj; + $ActiveEditingScene.isEditing = true; +} + function toggleSnappingOptions( %var ) { if( SnapToBar->objectSnapDownBtn.getValue() && SnapToBar->objectSnapBtn.getValue() )