public void onMultiSelect(SimSet set) { EditorTree EditorTree = "EditorTree"; EditorGui EditorGui = "EditorGui"; EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar"; ETransformSelection ETransformSelection = "ETransformSelection"; int count = set.getCount(); int i = 0; for (uint x = 0; x < set.getCount(); x++) { SimObject obj = set.getObject(x); if (obj.isMethod("onEditorSelect")) { obj.call("onEditorSelect", count.AsString()); } i++; EditorTree.addSelection(obj, i == count); EditorGui.currentEditor.onObjectSelected(obj); } // Inform the camera console.commandToServer("EditorOrbitCameraSelectChange", new string[] { count.AsString(), getSelectionCentroid().AsString() }); EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString()); // Update the Transform Selection window, if it is // visible. if (ETransformSelection.isVisible()) { ETransformSelection.onSelectionChanged(); } }
public void onSelect(SimObject obj) { EditorTree EditorTree = "EditorTree"; EditorTree.addSelection(obj, true); Util.setShadowVizLight(obj); if (obj.isObject() && obj.isMethod("onEditorSelect")) { obj.call("onEditorSelect", getSelectionSize().AsString()); } EditorGui EditorGui = "EditorGui"; EditorGui.currentEditor.onObjectSelected(obj); // Inform the camera console.commandToServer("EditorOrbitCameraSelectChange", new string[] { getSelectionSize().AsString(), getSelectionCentroid().AsString() }); EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar"; EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString()); // Update the materialEditorList iGlobal["$Tools::materialEditorList"] = obj.getId(); // Used to help the Material Editor( the M.E doesn't utilize its own TS control ) // so this dirty extension is used to fake it, just like the women I use to date... GuiWindowCollapseCtrl womanIUseToDate = "MaterialEditorPreviewWindow"; GuiControl theOtherTramp = "MaterialEditorGui"; if (womanIUseToDate.isVisible()) { theOtherTramp.call("prepareActiveObject"); } // Update the Transform Selection window ETransformSelection ETransformSelection = "ETransformSelection"; ETransformSelection.onSelectionChanged(); }