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(); }
public void onUnSelect(SimObject obj) { EditorGui EditorGui = "EditorGui"; Inspector Inspector = "Inspector"; EditorTree EditorTree = "EditorTree"; EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar"; ETransformSelection ETransformSelection = "ETransformSelection"; if (obj.isObject() && obj.isMethod("onEditorUnselect")) { obj.call("onEditorUnselect"); } EditorGui.currentEditor.onObjectDeselected(obj); Inspector.removeInspect(obj); EditorTree.removeSelection(obj); // Inform the camera console.commandToServer("EditorOrbitCameraSelectChange", new string[] { getSelectionSize().AsString(), getSelectionCentroid().AsString() }); EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString()); // Update the Transform Selection window 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(); }
public void onUnSelect(SimObject obj) { EditorGui EditorGui = "EditorGui"; Inspector Inspector = "Inspector"; EditorTree EditorTree = "EditorTree"; EditorGui.EditorGuiStatusBar EditorGuiStatusBar = "EditorGuiStatusBar"; ETransformSelection ETransformSelection = "ETransformSelection"; if (obj.isObject() && obj.isMethod("onEditorUnselect")) obj.call("onEditorUnselect"); EditorGui.currentEditor.onObjectDeselected(obj); Inspector.removeInspect(obj); EditorTree.removeSelection(obj); // Inform the camera console.commandToServer("EditorOrbitCameraSelectChange", new string[] {getSelectionSize().AsString(), getSelectionCentroid().AsString()}); EditorGuiStatusBar.setSelectionObjectsByCount(getSelectionSize().AsString()); // Update the Transform Selection window ETransformSelection.onSelectionChanged(); }
public string GetTooltipWorldEditorSelection(SimObject obj) { string text = "Objects: " + obj.call("getCount"); if (!obj.getCanSave()) text = text + '\n' + "Persistent: No"; else text = text + '\n' + "Persistent: Yes"; return text; }
public void loadNewParticle(SimObject particle) { GuiPopUpMenuCtrl PEP_ParticleSelector = "PEP_ParticleSelector"; ParticleData PE_ParticleEditor_NotDirtyParticle = "PE_ParticleEditor_NotDirtyParticle"; if (particle.isObject()) particle = particle.getId().AsString(); else particle = PEP_ParticleSelector.getSelected().AsString(); this.currParticle = particle; particle.call("reload"); PE_ParticleEditor_NotDirtyParticle.assignFieldsFrom(particle); PE_ParticleEditor_NotDirtyParticle["originalName"] = particle.getName(); this.guiSync(); this.setParticleNotDirty(); }
public void onFinishCreateObject(SimObject objId) { this.objectGroup.add(objId); if (objId.isMemberOfClass("SceneObject")) { objId["position"] = this.getCreateObjectPosition(); //flush new position objId.call("setTransform", objId.call("getTransform")); } this.onObjectCreated(objId); }