public string create(string treeView)
        {
            omni.Util.pushInstantGroup();
            ObjectCreator undoObject = new ObjectCreator("UndoScriptAction", "", typeof(UndoActionReparentObjects));

            //undoObject["class"] = "UndoActionReparentObjects";
            undoObject["numObjects"] = "0";
            undoObject["treeView"]   = treeView;
            UndoActionReparentObjects action = undoObject.Create();

            omni.Util.popInstantGroup();

            return(action);
        }
        public override void onEndReparenting()
        {
            GuiEditorGui.GuiEditor GuiEditor = "GuiEditor";

            UndoActionReparentObjects action = this.reparentUndoAction;
            this.reparentUndoAction = "";

            if (action.numObjects > 0)
                {
                if (action.numObjects == 1)
                    action.actionName = "Reparent Control";
                else
                    action.actionName = "Reparent Controls";

                action.addToManager(GuiEditor.getUndoManager());

                GuiEditor.updateUndoMenu();
                }
            else
                action.delete();
        }
        public override void onBeginReparenting()
        {
            UndoActionReparentObjects UndoActionReparentObjects = "UndoActionReparentObjects";

            if (this.reparentUndoAction.isObject())
                this.reparentUndoAction.delete();

            UndoActionReparentObjects action = UndoActionReparentObjects.create(this);

            this.reparentUndoAction = action;
        }