public string getEdits(string profile)
            {
                SimSet set = new ObjectCreator("SimSet").Create();

                for (uint i = 0; i < this.getCount(); i++)
                    {
                    SimObject obj = this.getObject(i);
                    if (obj["profile"] == profile)
                        set.add(obj);
                    }
                return set;
            }
        public void buildStaticFilters()
        {
            TerrainEditor ETerrainEditor = "ETerrainEditor";
            SimSet materialSet = "materialSet";
            SimSet TerrainMaterialSet = "TerrainMaterialSet";
            ArrayObject UnlistedMaterials = "UnlistedMaterials";
            GuiCheckBoxCtrl MaterialFilterAllArrayCheckbox = "MaterialFilterAllArrayCheckbox";
            GuiCheckBoxCtrl MaterialFilterMappedArrayCheckbox = "MaterialFilterMappedArrayCheckbox";
            GuiCheckBoxCtrl MaterialFilterUnmappedArrayCheckbox = "MaterialFilterUnmappedArrayCheckbox";

            GuiDynamicCtrlArrayControl filterArray = this.FOT("filterArray");

            // if you want to add any more containers to staticFilterObjects, here's
            // where to do it

            //TODO

            #region GuiControl  ()        oc_Newobject58

            ObjectCreator oc_Newobject58 = new ObjectCreator("GuiControl ", "");

            #region GuiContainer ()        oc_Newobject46

            ObjectCreator oc_Newobject46 = new ObjectCreator("GuiContainer", "");
            oc_Newobject46["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject46["Position"] = "0 0";
            oc_Newobject46["Extent"] = "128 18";
            oc_Newobject46["HorizSizing"] = "right";
            oc_Newobject46["VertSizing"] = "bottom";
            oc_Newobject46["isContainer"] = "1";
            oc_Newobject46["parentGroup"] = new Creator.StringNoQuote("%filter");

            #region GuiContainer ()        oc_Newobject44

            ObjectCreator oc_Newobject44 = new ObjectCreator("GuiContainer", "");
            oc_Newobject44["profile"] = "inspectorStyleRolloutDarkProfile";
            oc_Newobject44["Position"] = "-1 0";
            oc_Newobject44["Extent"] = "128 32";
            oc_Newobject44["HorizSizing"] = "right";
            oc_Newobject44["VertSizing"] = "bottom";
            oc_Newobject44["isContainer"] = "1";

            #endregion

            oc_Newobject46["#Newobject44"] = oc_Newobject44;

            #region GuiTextCtrl ()        oc_Newobject45

            ObjectCreator oc_Newobject45 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject45["Profile"] = "EditorTextProfile";
            oc_Newobject45["position"] = "5 0";
            oc_Newobject45["Extent"] = "118 18";
            oc_Newobject45["text"] = "Types";

            #endregion

            oc_Newobject46["#Newobject45"] = oc_Newobject45;

            #endregion

            oc_Newobject58["#Newobject46"] = oc_Newobject46;

            #region GuiContainer ()        oc_Newobject48

            ObjectCreator oc_Newobject48 = new ObjectCreator("GuiContainer", "");
            oc_Newobject48["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject48["Position"] = "415 191";
            oc_Newobject48["Extent"] = "128 18";
            oc_Newobject48["HorizSizing"] = "right";
            oc_Newobject48["VertSizing"] = "bottom";
            oc_Newobject48["isContainer"] = "1";
            oc_Newobject48["parentGroup"] = new Creator.StringNoQuote("%filter");

            #region GuiCheckBoxCtrl (MaterialFilterAllArrayCheckbox)        oc_Newobject47

            ObjectCreator oc_Newobject47 = new ObjectCreator("GuiCheckBoxCtrl", "MaterialFilterAllArrayCheckbox");
            oc_Newobject47["Profile"] = "ToolsGuiCheckBoxListProfile";
            oc_Newobject47["position"] = "5 2";
            oc_Newobject47["Extent"] = "118 18";
            oc_Newobject47["text"] = "All";
            oc_Newobject47["Command"] = "MaterialSelector.switchStaticFilters(\\\"MaterialFilterAllArray\\\");";

            #endregion

            oc_Newobject48["#Newobject47"] = oc_Newobject47;

            #endregion

            oc_Newobject58["#Newobject48"] = oc_Newobject48;

            #region GuiContainer ()        oc_Newobject50

            ObjectCreator oc_Newobject50 = new ObjectCreator("GuiContainer", "");
            oc_Newobject50["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject50["Position"] = "415 191";
            oc_Newobject50["Extent"] = "128 18";
            oc_Newobject50["HorizSizing"] = "right";
            oc_Newobject50["VertSizing"] = "bottom";
            oc_Newobject50["isContainer"] = "1";
            oc_Newobject50["parentGroup"] = new Creator.StringNoQuote("%filter");

            #region GuiCheckBoxCtrl (MaterialFilterMappedArrayCheckbox)        oc_Newobject49

            ObjectCreator oc_Newobject49 = new ObjectCreator("GuiCheckBoxCtrl", "MaterialFilterMappedArrayCheckbox");
            oc_Newobject49["Profile"] = "ToolsGuiCheckBoxListProfile";
            oc_Newobject49["position"] = "5 2";
            oc_Newobject49["Extent"] = "118 18";
            oc_Newobject49["text"] = "Mapped";
            oc_Newobject49["Command"] = "MaterialSelector.switchStaticFilters(\\\"MaterialFilterMappedArray\\\");";

            #endregion

            oc_Newobject50["#Newobject49"] = oc_Newobject49;

            #endregion

            oc_Newobject58["#Newobject50"] = oc_Newobject50;

            #region GuiContainer ()        oc_Newobject52

            ObjectCreator oc_Newobject52 = new ObjectCreator("GuiContainer", "");
            oc_Newobject52["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject52["Position"] = "415 191";
            oc_Newobject52["Extent"] = "128 18";
            oc_Newobject52["HorizSizing"] = "right";
            oc_Newobject52["VertSizing"] = "bottom";
            oc_Newobject52["isContainer"] = "1";
            oc_Newobject52["parentGroup"] = new Creator.StringNoQuote("%filter");

            #region GuiCheckBoxCtrl (MaterialFilterUnmappedArrayCheckbox)        oc_Newobject51

            ObjectCreator oc_Newobject51 = new ObjectCreator("GuiCheckBoxCtrl", "MaterialFilterUnmappedArrayCheckbox");
            oc_Newobject51["Profile"] = "ToolsGuiCheckBoxListProfile";
            oc_Newobject51["position"] = "5 2";
            oc_Newobject51["Extent"] = "118 18";
            oc_Newobject51["text"] = "Unmapped";
            oc_Newobject51["Command"] = "MaterialSelector.switchStaticFilters(\\\"MaterialFilterUnmappedArray\\\");";

            #endregion

            oc_Newobject52["#Newobject51"] = oc_Newobject51;

            #endregion

            oc_Newobject58["#Newobject52"] = oc_Newobject52;

            #region GuiContainer ()        oc_Newobject57

            ObjectCreator oc_Newobject57 = new ObjectCreator("GuiContainer", "");
            oc_Newobject57["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject57["Position"] = "0 0";
            oc_Newobject57["Extent"] = "128 18";
            oc_Newobject57["HorizSizing"] = "right";
            oc_Newobject57["VertSizing"] = "bottom";
            oc_Newobject57["isContainer"] = "1";
            oc_Newobject57["parentGroup"] = new Creator.StringNoQuote("%filter");

            #region GuiContainer ()        oc_Newobject53

            ObjectCreator oc_Newobject53 = new ObjectCreator("GuiContainer", "");
            oc_Newobject53["profile"] = "inspectorStyleRolloutDarkProfile";
            oc_Newobject53["Position"] = "-1 0";
            oc_Newobject53["Extent"] = "128 32";
            oc_Newobject53["HorizSizing"] = "right";
            oc_Newobject53["VertSizing"] = "bottom";
            oc_Newobject53["isContainer"] = "1";

            #endregion

            oc_Newobject57["#Newobject53"] = oc_Newobject53;

            #region GuiTextCtrl ()        oc_Newobject54

            ObjectCreator oc_Newobject54 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject54["Profile"] = "EditorTextProfile";
            oc_Newobject54["position"] = "5 0";
            oc_Newobject54["Extent"] = "118 18";
            oc_Newobject54["text"] = "Tags";

            #endregion

            oc_Newobject57["#Newobject54"] = oc_Newobject54;

            #region GuiBitmapButtonCtrl ()        oc_Newobject55

            ObjectCreator oc_Newobject55 = new ObjectCreator("GuiBitmapButtonCtrl", "");
            oc_Newobject55["canSaveDynamicFields"] = "0";
            oc_Newobject55["Enabled"] = "1";
            oc_Newobject55["isContainer"] = "0";
            oc_Newobject55["Profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject55["HorizSizing"] = "left";
            oc_Newobject55["VertSizing"] = "bottom";
            oc_Newobject55["position"] = "105 2";
            oc_Newobject55["Extent"] = "15 15";
            oc_Newobject55["MinExtent"] = "8 2";
            oc_Newobject55["canSave"] = "1";
            oc_Newobject55["Visible"] = "1";
            oc_Newobject55["Command"] = "MaterialSelector_addFilterWindow.setVisible(1); MaterialSelectorOverlay.pushToBack(MaterialSelector_addFilterWindow);";
            oc_Newobject55["hovertime"] = "1000";
            oc_Newobject55["tooltip"] = "Create New Tag";
            oc_Newobject55["bitmap"] = "tools/gui/images/new";
            oc_Newobject55["groupNum"] = "-1";
            oc_Newobject55["buttonType"] = "PushButton";
            oc_Newobject55["useMouseEvents"] = "0";

            #endregion

            oc_Newobject57["#Newobject55"] = oc_Newobject55;

            #region GuiBitmapButtonCtrl ()        oc_Newobject56

            ObjectCreator oc_Newobject56 = new ObjectCreator("GuiBitmapButtonCtrl", "");
            oc_Newobject56["canSaveDynamicFields"] = "0";
            oc_Newobject56["Enabled"] = "1";
            oc_Newobject56["isContainer"] = "0";
            oc_Newobject56["Profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject56["HorizSizing"] = "left";
            oc_Newobject56["VertSizing"] = "bottom";
            oc_Newobject56["position"] = "89 2";
            oc_Newobject56["Extent"] = "13 13";
            oc_Newobject56["MinExtent"] = "8 2";
            oc_Newobject56["canSave"] = "1";
            oc_Newobject56["Visible"] = "1";
            oc_Newobject56["Command"] = "MaterialSelector.clearMaterialFilters();";
            oc_Newobject56["hovertime"] = "1000";
            oc_Newobject56["tooltip"] = "Clear Selected Tag";
            oc_Newobject56["bitmap"] = "tools/gui/images/clear-btn";
            oc_Newobject56["groupNum"] = "-1";
            oc_Newobject56["buttonType"] = "PushButton";
            oc_Newobject56["useMouseEvents"] = "0";

            #endregion

            oc_Newobject57["#Newobject56"] = oc_Newobject56;

            #endregion

            oc_Newobject58["#Newobject57"] = oc_Newobject57;

            #endregion

            GuiControl staticFilterContainer = oc_Newobject58.Create();

            int filterCount = staticFilterContainer.getCount();
            for (; filterCount != 0; filterCount--)
                filterArray.addGuiControl(staticFilterContainer.getObject(0));

            this.staticFilterObjects = filterArray.getCount();

            staticFilterContainer.delete();

            // Create our category array used in the selector, this code should be taken out
            // in order to make the material selector agnostic
            ArrayObject MaterialFilterAllArray = new ObjectCreator("ArrayObject", "MaterialFilterAllArray").Create();
            ArrayObject MaterialFilterMappedArray = new ObjectCreator("ArrayObject", "MaterialFilterMappedArray").Create();
            ArrayObject MaterialFilterUnmappedArray = new ObjectCreator("ArrayObject", "MaterialFilterUnmappedArray").Create();

            string mats = "";
            int count = 0;
            if (this.terrainMaterials)
                {
                mats = ETerrainEditor.getTerrainBlocksMaterialList();
                count = Util.getRecordCount(mats);
                }
            else
                count = materialSet.getCount();

            for (uint i = 0; i < count; i++)
                {
                Material material;
                // Process terrain materials
                if (this.terrainMaterials)
                    {
                    string matInternalName = Util.getRecord(mats, (int) i);
                    material = TerrainMaterialSet.findObjectByInternalName(matInternalName, false);

                    // Is there no material info for this slot?
                    if (!material.isObject())
                        continue;

                    // Add to the appropriate filters
                    MaterialFilterMappedArray.add("", material);
                    MaterialFilterAllArray.add("", material);

                    continue;
                    }

                // Process regular materials here
                material = materialSet.getObject(i);

                bool unlistedFound = false;
                for (int k = 0; k < UnlistedMaterials.count(); k++)
                    {
                    unlistedFound = false;
                    if (UnlistedMaterials.getValue(k) == material.name)
                        {
                        unlistedFound = true;
                        break;
                        }
                    }

                if (unlistedFound)
                    continue;

                if (material.mapTo == "" || material.mapTo == "unmapped_mat")
                    {
                    MaterialFilterUnmappedArray.add("", material.name);
                    //running through the existing tag names
                    for (int j = 0; material.getFieldValue("materialTag" + j, -1) != ""; j++)
                        MaterialFilterUnmappedArray.add(material.getFieldValue("materialTag" + j, -1), material.name);
                    }
                else
                    {
                    MaterialFilterMappedArray.add("", material.name);
                    for (int j = 0; material.getFieldValue("materialTag" + j, -1) != ""; j++)
                        MaterialFilterMappedArray.add(material.getFieldValue("materialTag" + j, -1), material.name);
                    }

                MaterialFilterAllArray.add("", material.name);
                for (int j = 0; material.getFieldValue("materialTag" + j, -1) != ""; j++)
                    MaterialFilterAllArray.add(material.getFieldValue("materialTag" + j, -1), material.name);
                }

            MaterialFilterAllArrayCheckbox.setText("All ( " + MaterialFilterAllArray.count() + " ) ");
            MaterialFilterMappedArrayCheckbox.setText("Mapped ( " + MaterialFilterMappedArray.count() + " ) ");
            MaterialFilterUnmappedArrayCheckbox.setText("Unmapped ( " + MaterialFilterUnmappedArray.count() + " ) ");
        }
        public void loadFilter(string selectedFilter, string staticFilter = "")
        {
            ArrayObject MatEdScheduleArray = "MatEdScheduleArray";
            ArrayObject MatEdPreviewArray = "MatEdPreviewArray";

            GuiDynamicCtrlArrayControl materialSelection = this.FOT("materialSelection");
            GuiStackControl materialPreviewPagesStack = this.FOT("materialPreviewPagesStack");
            GuiPopUpMenuCtrlEx materialPreviewCountPopup = this.FOT("materialPreviewCountPopup");

            // manage schedule array properly
            if (!MatEdScheduleArray.isObject())
                MatEdScheduleArray = new ObjectCreator("ArrayObject", "MatEdScheduleArray").Create();

            // if we select another list... delete all schedules that were created by 
            // previous load
            for (int i = 0; i < MatEdScheduleArray.count(); i++)
                Util.cancel(MatEdScheduleArray.getKey(i).AsInt());

            // we have to empty out the list; so when we create new schedules, these dont linger
            MatEdScheduleArray.empty();

            // manage preview array
            if (!MatEdPreviewArray.isObject())
                MatEdPreviewArray = new ObjectCreator("ArrayObject", "MatEdPreviewArray").Create();

            // we have to empty out the list; so when we create new guicontrols, these dont linger
            MatEdPreviewArray.empty();
            materialSelection.deleteAllObjects();
            materialPreviewPagesStack.deleteAllObjects();

            // changed to accomadate tagging. dig through the array for each tag name,
            // call unique value, sort, and we have a perfect set of materials
            if (staticFilter != "")
                this.currentStaticFilter = staticFilter;

            this.currentFilter = selectedFilter;

            ArrayObject filteredObjectsArray = new ObjectCreator("ArrayObject").Create();

            int previewsPerPage = materialPreviewCountPopup.getTextById(materialPreviewCountPopup.getSelected()).AsInt();

            int tagCount = Util.getWordCount(this.currentFilter);
            if (tagCount != 0)
                {
                for (int j = 0; j < tagCount; j++)
                    {
                    for (int i = 0; i < this.currentStaticFilter.count(); i++)
                        {
                        string currentTag = Util.getWord(this.currentFilter, j);
                        if (this.currentStaticFilter.getKey(i) == currentTag)
                            filteredObjectsArray.add(this.currentStaticFilter.getKey(i), this.currentStaticFilter.getValue(i));
                        }
                    }

                filteredObjectsArray.uniqueValue();
                filteredObjectsArray.sortd();

                this.totalPages = Util.mCeil(filteredObjectsArray.count()/previewsPerPage);

                //Can we maintain the current preview page, or should we go to page 1?
                if ((this.currentPreviewPage*previewsPerPage) >= filteredObjectsArray.count())
                    this.currentPreviewPage = 0;

                // Build out the pages buttons
                this.buildPagesButtons(this.currentPreviewPage, this.totalPages);

                int previewCount = previewsPerPage;
                int possiblePreviewCount = filteredObjectsArray.count() - this.currentPreviewPage*previewsPerPage;
                if (possiblePreviewCount < previewCount)
                    previewCount = possiblePreviewCount;

                int start = this.currentPreviewPage*previewsPerPage;
                for (int i = start; i < start + previewCount; i++)
                    this.buildPreviewArray(filteredObjectsArray.getValue(i));

                filteredObjectsArray.delete();
                }
            else
                {
                this.currentStaticFilter.sortd();

                // Rebuild the static filter list without tagged materials
                ArrayObject noTagArray = new ObjectCreator("ArrayObject").Create();
                for (int i = 0; i < this.currentStaticFilter.count(); i++)
                    {
                    if (this.currentStaticFilter.getKey(i) != "")
                        continue;

                    SimObject material = this.currentStaticFilter.getValue(i);

                    // CustomMaterials are not available for selection
                    if (!material.isObject() || material.isMemberOfClass("CustomMaterial"))
                        continue;

                    noTagArray.add("", material);
                    }

                this.totalPages = Util.mCeil(noTagArray.count()/previewsPerPage);

                //Can we maintain the current preview page, or should we go to page 1?
                if ((this.currentPreviewPage*previewsPerPage) >= noTagArray.count())
                    this.currentPreviewPage = 0;

                // Build out the pages buttons
                this.buildPagesButtons(this.currentPreviewPage, this.totalPages);

                int previewCount = previewsPerPage;
                int possiblePreviewCount = noTagArray.count() - this.currentPreviewPage*previewsPerPage;
                if (possiblePreviewCount < previewCount)
                    previewCount = possiblePreviewCount;

                int start = this.currentPreviewPage*previewsPerPage;
                for (int i = start; i < start + previewCount; i++)
                    this.buildPreviewArray(noTagArray.getValue(i));
                }

            this.loadImages(0);
        }
Ejemplo n.º 4
0
            public override void onControlInspectPostApply(GuiControl control)
            {
                GuiEditorTreeView GuiEditorTreeView = "GuiEditorTreeView";

                SimSet set = new ObjectCreator("SimSet").Create();
                set.add(control);
                this.onPostEdit(set);
                set.delete();
                GuiEditorTreeView.update();
            }
        public static void initialize()
        {
            #region GuiControl (MaterialSelectorOverlay, EditorGuiGroup)        oc_Newobject42

            ObjectCreator oc_Newobject42 = new ObjectCreator("GuiControl", "MaterialSelectorOverlay, EditorGuiGroup");
            oc_Newobject42["canSaveDynamicFields"] = "0";
            oc_Newobject42["Profile"] = "GuiOverlayProfile";
            oc_Newobject42["Enabled"] = "1";
            oc_Newobject42["isContainer"] = "1";
            oc_Newobject42["HorizSizing"] = "right";
            oc_Newobject42["VertSizing"] = "bottom";
            oc_Newobject42["Position"] = "0 0";
            oc_Newobject42["Extent"] = "1024 768";
            oc_Newobject42["MinExtent"] = "8 2";
            oc_Newobject42["canSave"] = "1";
            oc_Newobject42["Visible"] = "1";
            oc_Newobject42["hovertime"] = "1000";

            #region GuiWindowCtrl (MaterialSelector)        oc_Newobject36

            ObjectCreator oc_Newobject36 = new ObjectCreator("GuiWindowCtrl", "MaterialSelector", typeof (MaterialSelector));
            oc_Newobject36["profile"] = "ToolsGuiWindowProfile";
            oc_Newobject36["HorizSizing"] = "center";
            oc_Newobject36["VertSizing"] = "center";
            oc_Newobject36["resizeWidth"] = "1";
            oc_Newobject36["resizeHeight"] = "1";
            oc_Newobject36["canClose"] = "1";
            oc_Newobject36["canMinimize"] = "0";
            oc_Newobject36["canMaximize"] = "0";
            oc_Newobject36["position"] = "72 98";
            oc_Newobject36["extent"] = " 766 550";
            oc_Newobject36["MinExtent"] = "383 274";
            oc_Newobject36["text"] = "Material Selector";
            oc_Newobject36["closeCommand"] = "MaterialSelector.hideDialog();";
            oc_Newobject36["EdgeSnap"] = "0";
            oc_Newobject36["canCollapse"] = "0";
            oc_Newobject36["visible"] = "0";

            #region GuiContainer ()        oc_Newobject1

            ObjectCreator oc_Newobject1 = new ObjectCreator("GuiContainer", "");
            oc_Newobject1["isContainer"] = "1";
            oc_Newobject1["HorizSizing"] = "right";
            oc_Newobject1["VertSizing"] = "bottom";
            oc_Newobject1["Position"] = "4 22";
            oc_Newobject1["Extent"] = "120 31";
            oc_Newobject1["Profile"] = "inspectorStyleRolloutDarkProfile";

            #endregion

            oc_Newobject36["#Newobject1"] = oc_Newobject1;

            #region GuiTextCtrl ()        oc_Newobject2

            ObjectCreator oc_Newobject2 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject2["Profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject2["HorizSizing"] = "right";
            oc_Newobject2["VertSizing"] = "bottom";
            oc_Newobject2["position"] = "10 23";
            oc_Newobject2["extent"] = "30 16";
            oc_Newobject2["text"] = "Filters";

            #endregion

            oc_Newobject36["#Newobject2"] = oc_Newobject2;

            #region GuiContainer ()        oc_Newobject5

            ObjectCreator oc_Newobject5 = new ObjectCreator("GuiContainer", "");
            oc_Newobject5["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject5["Position"] = "4 39";
            oc_Newobject5["Extent"] = "120 507";
            oc_Newobject5["HorizSizing"] = "right";
            oc_Newobject5["VertSizing"] = "height";
            oc_Newobject5["isContainer"] = "1";

            #region GuiScrollCtrl ()        oc_Newobject4

            ObjectCreator oc_Newobject4 = new ObjectCreator("GuiScrollCtrl", "");
            oc_Newobject4["canSaveDynamicFields"] = "0";
            oc_Newobject4["Enabled"] = "1";
            oc_Newobject4["isContainer"] = "1";
            oc_Newobject4["Profile"] = "GuiEditorScrollProfile";
            oc_Newobject4["HorizSizing"] = "width";
            oc_Newobject4["VertSizing"] = "height";
            oc_Newobject4["Position"] = "0 0";
            oc_Newobject4["Extent"] = "128 355";
            oc_Newobject4["MinExtent"] = "8 8";
            oc_Newobject4["canSave"] = "1";
            oc_Newobject4["isDecoy"] = "0";
            oc_Newobject4["Visible"] = "1";
            oc_Newobject4["tooltipprofile"] = "ToolsGuiDefaultProfile";
            oc_Newobject4["hovertime"] = "1000";
            oc_Newobject4["Docking"] = "Client";
            oc_Newobject4["Margin"] = "0 0 0 0";
            oc_Newobject4["Padding"] = "0 0 0 0";
            oc_Newobject4["AnchorTop"] = "1";
            oc_Newobject4["AnchorBottom"] = "0";
            oc_Newobject4["AnchorLeft"] = "1";
            oc_Newobject4["AnchorRight"] = "0";
            oc_Newobject4["willFirstRespond"] = "1";
            oc_Newobject4["hScrollBar"] = "alwaysOff";
            oc_Newobject4["vScrollBar"] = "dynamic";
            oc_Newobject4["lockHorizScroll"] = new Creator.StringNoQuote("true");
            oc_Newobject4["lockVertScroll"] = "false";
            oc_Newobject4["constantThumbHeight"] = "0";
            oc_Newobject4["childMargin"] = "0 0";
            oc_Newobject4["mouseWheelScrollSpeed"] = "-1";

            #region GuiDynamicCtrlArrayControl ()        oc_Newobject3

            ObjectCreator oc_Newobject3 = new ObjectCreator("GuiDynamicCtrlArrayControl", "");
            oc_Newobject3["canSaveDynamicFields"] = "0";
            oc_Newobject3["internalName"] = "filterArray";
            oc_Newobject3["Enabled"] = "1";
            oc_Newobject3["isContainer"] = "1";
            oc_Newobject3["Profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject3["HorizSizing"] = "width";
            oc_Newobject3["VertSizing"] = "bottom";
            oc_Newobject3["Position"] = "18 0";
            oc_Newobject3["Extent"] = "128 195";
            oc_Newobject3["MinExtent"] = "8 8";
            oc_Newobject3["dynamicSize"] = "1";
            oc_Newobject3["rowSpacing"] = "2";
            oc_Newobject3["colSize"] = "128";
            oc_Newobject3["rowSize"] = "18";

            #endregion

            oc_Newobject4["#Newobject3"] = oc_Newobject3;

            #endregion

            oc_Newobject5["#Newobject4"] = oc_Newobject4;

            #endregion

            oc_Newobject36["#Newobject5"] = oc_Newobject5;

            #region GuiContainer ()        oc_Newobject6

            ObjectCreator oc_Newobject6 = new ObjectCreator("GuiContainer", "");
            oc_Newobject6["Profile"] = "inspectorStyleRolloutDarkProfile";
            oc_Newobject6["Position"] = "128 22";
            oc_Newobject6["Extent"] = "480 31";
            oc_Newobject6["HorizSizing"] = "width";
            oc_Newobject6["VertSizing"] = "bottom";
            oc_Newobject6["isContainer"] = "1";

            #endregion

            oc_Newobject36["#Newobject6"] = oc_Newobject6;

            #region GuiTextCtrl ()        oc_Newobject7

            ObjectCreator oc_Newobject7 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject7["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject7["HorizSizing"] = "right";
            oc_Newobject7["VertSizing"] = "bottom";
            oc_Newobject7["position"] = "133 23";
            oc_Newobject7["extent"] = "53 16";
            oc_Newobject7["text"] = "Materials";

            #endregion

            oc_Newobject36["#Newobject7"] = oc_Newobject7;

            #region GuiBitmapButtonCtrl ()        oc_Newobject8

            ObjectCreator oc_Newobject8 = new ObjectCreator("GuiBitmapButtonCtrl", "");
            oc_Newobject8["canSaveDynamicFields"] = "0";
            oc_Newobject8["Enabled"] = "1";
            oc_Newobject8["isContainer"] = "0";
            oc_Newobject8["Profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject8["HorizSizing"] = "left";
            oc_Newobject8["VertSizing"] = "bottom";
            oc_Newobject8["position"] = "594 24";
            oc_Newobject8["Extent"] = "15 15";
            oc_Newobject8["MinExtent"] = "8 2";
            oc_Newobject8["canSave"] = "1";
            oc_Newobject8["Visible"] = "1";
            oc_Newobject8["Command"] = "MaterialSelector.createNewMaterial();";
            oc_Newobject8["hovertime"] = "1000";
            oc_Newobject8["tooltip"] = "Create New Unmapped Material";
            oc_Newobject8["bitmap"] = "tools/gui/images/new";
            oc_Newobject8["groupNum"] = "-1";
            oc_Newobject8["buttonType"] = "PushButton";
            oc_Newobject8["useMouseEvents"] = "0";

            #endregion

            oc_Newobject36["#Newobject8"] = oc_Newobject8;

            #region GuiBitmapButtonCtrl ()        oc_Newobject9

            ObjectCreator oc_Newobject9 = new ObjectCreator("GuiBitmapButtonCtrl", "");
            oc_Newobject9["canSaveDynamicFields"] = "0";
            oc_Newobject9["Enabled"] = "1";
            oc_Newobject9["isContainer"] = "0";
            oc_Newobject9["Profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject9["HorizSizing"] = "left";
            oc_Newobject9["VertSizing"] = "bottom";
            oc_Newobject9["position"] = "578 24";
            oc_Newobject9["Extent"] = "15 15";
            oc_Newobject9["MinExtent"] = "8 2";
            oc_Newobject9["canSave"] = "1";
            oc_Newobject9["Visible"] = "1";
            oc_Newobject9["Command"] = "MaterialSelector.showDeleteDialog();";
            oc_Newobject9["hovertime"] = "1000";
            oc_Newobject9["tooltip"] = "Delete Material";
            oc_Newobject9["bitmap"] = "tools/gui/images/delete";
            oc_Newobject9["groupNum"] = "-1";
            oc_Newobject9["buttonType"] = "PushButton";
            oc_Newobject9["useMouseEvents"] = "0";

            #endregion

            oc_Newobject36["#Newobject9"] = oc_Newobject9;

            #region GuiContainer ()        oc_Newobject23

            ObjectCreator oc_Newobject23 = new ObjectCreator("GuiContainer", "");
            oc_Newobject23["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject23["Position"] = "128 39";
            oc_Newobject23["Extent"] = "480 507";
            oc_Newobject23["HorizSizing"] = "width";
            oc_Newobject23["VertSizing"] = "height";
            oc_Newobject23["isContainer"] = "1";

            #region GuiScrollCtrl ()        oc_Newobject13

            ObjectCreator oc_Newobject13 = new ObjectCreator("GuiScrollCtrl", "");
            oc_Newobject13["canSaveDynamicFields"] = "0";
            oc_Newobject13["Enabled"] = "1";
            oc_Newobject13["isContainer"] = "1";
            oc_Newobject13["Profile"] = "GuiEditorScrollProfile";
            oc_Newobject13["HorizSizing"] = "width";
            oc_Newobject13["VertSizing"] = "height";
            oc_Newobject13["Position"] = "0 0";
            oc_Newobject13["Extent"] = "480 507";
            oc_Newobject13["MinExtent"] = "8 8";
            oc_Newobject13["canSave"] = "1";
            oc_Newobject13["isDecoy"] = "0";
            oc_Newobject13["Visible"] = "1";
            oc_Newobject13["tooltipprofile"] = "ToolsGuiDefaultProfile";
            oc_Newobject13["hovertime"] = "1000";
            oc_Newobject13["Docking"] = "Client";
            oc_Newobject13["Margin"] = "0 0 0 0";
            oc_Newobject13["Padding"] = "0 0 0 0";
            oc_Newobject13["AnchorTop"] = "1";
            oc_Newobject13["AnchorBottom"] = "0";
            oc_Newobject13["AnchorLeft"] = "1";
            oc_Newobject13["AnchorRight"] = "0";
            oc_Newobject13["willFirstRespond"] = "1";
            oc_Newobject13["hScrollBar"] = "alwaysOff";
            oc_Newobject13["vScrollBar"] = "dynamic";
            oc_Newobject13["lockHorizScroll"] = "true";
            oc_Newobject13["lockVertScroll"] = "false";
            oc_Newobject13["constantThumbHeight"] = "0";
            oc_Newobject13["childMargin"] = "0 0";
            oc_Newobject13["mouseWheelScrollSpeed"] = "-1";

            #region GuiStackControl ()        oc_Newobject12

            ObjectCreator oc_Newobject12 = new ObjectCreator("GuiStackControl", "");
            oc_Newobject12["HorizSizing"] = "width";
            oc_Newobject12["VertSizing"] = "bottom";
            oc_Newobject12["Position"] = "0 0";
            oc_Newobject12["Extent"] = "128 0";
            oc_Newobject12["changeChildPosition"] = new Creator.StringNoQuote("0");
            oc_Newobject12["changeChildSizeToFit"] = new Creator.StringNoQuote("1");

            #region GuiControl ()        oc_Newobject10

            ObjectCreator oc_Newobject10 = new ObjectCreator("GuiControl", "");
            oc_Newobject10["Extent"] = "0 4";

            #endregion

            oc_Newobject12["#Newobject10"] = oc_Newobject10;

            #region GuiDynamicCtrlArrayControl ()        oc_Newobject11

            ObjectCreator oc_Newobject11 = new ObjectCreator("GuiDynamicCtrlArrayControl", "");
            oc_Newobject11["canSaveDynamicFields"] = "0";
            oc_Newobject11["internalName"] = "materialSelection";
            oc_Newobject11["Enabled"] = "1";
            oc_Newobject11["isContainer"] = "1";
            oc_Newobject11["Profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject11["HorizSizing"] = "width";
            oc_Newobject11["VertSizing"] = "bottom";
            oc_Newobject11["Position"] = "3 0";
            oc_Newobject11["Extent"] = "128 0";
            oc_Newobject11["MinExtent"] = "8 8";
            oc_Newobject11["dynamicSize"] = "1";
            oc_Newobject11["autoCellSize"] = "1";
            oc_Newobject11["rowSpacing"] = "2";
            oc_Newobject11["colSpacing"] = "2";
            oc_Newobject11["margin"] = "2";

            #endregion

            oc_Newobject12["#Newobject11"] = oc_Newobject11;

            #endregion

            oc_Newobject13["#Newobject12"] = oc_Newobject12;

            #endregion

            oc_Newobject23["#Newobject13"] = oc_Newobject13;

            #region GuiContainer ()        oc_Newobject22

            ObjectCreator oc_Newobject22 = new ObjectCreator("GuiContainer", "");
            oc_Newobject22["internalName"] = "materialPreviewControlContainer";
            oc_Newobject22["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject22["Position"] = "0 0";
            oc_Newobject22["Extent"] = "480 20";
            oc_Newobject22["HorizSizing"] = "width";
            oc_Newobject22["VertSizing"] = "height";
            oc_Newobject22["isContainer"] = "1";
            oc_Newobject22["Docking"] = "Bottom";

            #region GuiTextCtrl ()        oc_Newobject14

            ObjectCreator oc_Newobject14 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject14["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject14["HorizSizing"] = "right";
            oc_Newobject14["VertSizing"] = "bottom";
            oc_Newobject14["position"] = "0 2";
            oc_Newobject14["extent"] = "100 16";
            oc_Newobject14["text"] = "Thumbnails per Page:";

            #endregion

            oc_Newobject22["#Newobject14"] = oc_Newobject14;

            #region GuiPopupMenuCtrlEx ()        oc_Newobject15

            ObjectCreator oc_Newobject15 = new ObjectCreator("GuiPopupMenuCtrlEx", "");
            oc_Newobject15["internalName"] = "materialPreviewCountPopup";
            oc_Newobject15["Profile"] = "ToolsGuiPopUpMenuProfile";
            oc_Newobject15["Position"] = "104 2";
            oc_Newobject15["Extent"] = "40 18";
            oc_Newobject15["HorizSizing"] = "right";
            oc_Newobject15["VertSizing"] = "bottom";
            oc_Newobject15["Command"] = "MaterialSelector.thumbnailCountUpdate();";
            oc_Newobject15["reverseTextList"] = "0";
            oc_Newobject15["Text"] = "16";

            #endregion

            oc_Newobject22["#Newobject15"] = oc_Newobject15;

            #region GuiStackControl ()        oc_Newobject21

            ObjectCreator oc_Newobject21 = new ObjectCreator("GuiStackControl", "");
            oc_Newobject21["internalName"] = "materialPreviewButtonStack";
            oc_Newobject21["HorizSizing"] = "left";
            oc_Newobject21["VertSizing"] = "bottom";
            oc_Newobject21["Position"] = "480 2";
            oc_Newobject21["Extent"] = "0 16";
            oc_Newobject21["dynamic"] = new Creator.StringNoQuote("1");
            oc_Newobject21["dynamicPos"] = new Creator.StringNoQuote("1");
            oc_Newobject21["stackingType"] = "Horizontal";
            oc_Newobject21["changeChildPosition"] = new Creator.StringNoQuote("1");
            oc_Newobject21["changeChildSizeToFit"] = new Creator.StringNoQuote("1");
            oc_Newobject21["padding"] = new Creator.StringNoQuote("2");

            #region GuiButtonCtrl ()        oc_Newobject16

            ObjectCreator oc_Newobject16 = new ObjectCreator("GuiButtonCtrl", "");
            oc_Newobject16["canSaveDynamicFields"] = "0";
            oc_Newobject16["Enabled"] = "1";
            oc_Newobject16["isContainer"] = "0";
            oc_Newobject16["Profile"] = "ToolsGuiButtonProfile";
            oc_Newobject16["HorizSizing"] = "right";
            oc_Newobject16["VertSizing"] = "bottom";
            oc_Newobject16["Position"] = "0 0";
            oc_Newobject16["Extent"] = "20 16";
            oc_Newobject16["MinExtent"] = "8 8";
            oc_Newobject16["canSave"] = "1";
            oc_Newobject16["isDecoy"] = "0";
            oc_Newobject16["Visible"] = "1";
            oc_Newobject16["Command"] = "MaterialSelector.firstPage();";
            oc_Newobject16["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject16["tooltip"] = "First";
            oc_Newobject16["hovertime"] = "1000";
            oc_Newobject16["text"] = "|<";
            oc_Newobject16["groupNum"] = "-1";
            oc_Newobject16["buttonType"] = "PushButton";
            oc_Newobject16["useMouseEvents"] = "1";

            #endregion

            oc_Newobject21["#Newobject16"] = oc_Newobject16;

            #region GuiButtonCtrl ()        oc_Newobject17

            ObjectCreator oc_Newobject17 = new ObjectCreator("GuiButtonCtrl", "");
            oc_Newobject17["canSaveDynamicFields"] = "0";
            oc_Newobject17["Enabled"] = "1";
            oc_Newobject17["isContainer"] = "0";
            oc_Newobject17["Profile"] = "ToolsGuiButtonProfile";
            oc_Newobject17["HorizSizing"] = "right";
            oc_Newobject17["VertSizing"] = "bottom";
            oc_Newobject17["Position"] = "0 0";
            oc_Newobject17["Extent"] = "20 16";
            oc_Newobject17["MinExtent"] = "8 8";
            oc_Newobject17["canSave"] = "1";
            oc_Newobject17["isDecoy"] = "0";
            oc_Newobject17["Visible"] = "1";
            oc_Newobject17["Command"] = "MaterialSelector.previousPage();";
            oc_Newobject17["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject17["tooltip"] = "Previous";
            oc_Newobject17["hovertime"] = "1000";
            oc_Newobject17["text"] = "<";
            oc_Newobject17["groupNum"] = "-1";
            oc_Newobject17["buttonType"] = "PushButton";
            oc_Newobject17["useMouseEvents"] = "1";

            #endregion

            oc_Newobject21["#Newobject17"] = oc_Newobject17;

            #region GuiStackControl ()        oc_Newobject18

            ObjectCreator oc_Newobject18 = new ObjectCreator("GuiStackControl", "");
            oc_Newobject18["internalName"] = "materialPreviewPagesStack";
            oc_Newobject18["HorizSizing"] = "right";
            oc_Newobject18["VertSizing"] = "bottom";
            oc_Newobject18["Position"] = "0 0";
            oc_Newobject18["Extent"] = "0 16";
            oc_Newobject18["dynamic"] = new Creator.StringNoQuote("1");
            oc_Newobject18["stackingType"] = "Horizontal";
            oc_Newobject18["changeChildPosition"] = new Creator.StringNoQuote("1");
            oc_Newobject18["changeChildSizeToFit"] = new Creator.StringNoQuote("1");
            oc_Newobject18["padding"] = new Creator.StringNoQuote("2");

            #endregion

            oc_Newobject21["#Newobject18"] = oc_Newobject18;

            #region GuiButtonCtrl ()        oc_Newobject19

            ObjectCreator oc_Newobject19 = new ObjectCreator("GuiButtonCtrl", "");
            oc_Newobject19["canSaveDynamicFields"] = "0";
            oc_Newobject19["Enabled"] = "1";
            oc_Newobject19["isContainer"] = "0";
            oc_Newobject19["Profile"] = "ToolsGuiButtonProfile";
            oc_Newobject19["HorizSizing"] = "right";
            oc_Newobject19["VertSizing"] = "bottom";
            oc_Newobject19["Position"] = "0 0";
            oc_Newobject19["Extent"] = "20 16";
            oc_Newobject19["MinExtent"] = "8 8";
            oc_Newobject19["canSave"] = "1";
            oc_Newobject19["isDecoy"] = "0";
            oc_Newobject19["Visible"] = "1";
            oc_Newobject19["Command"] = "MaterialSelector.nextPage();";
            oc_Newobject19["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject19["tooltip"] = "Next";
            oc_Newobject19["hovertime"] = "1000";
            oc_Newobject19["text"] = ">";
            oc_Newobject19["groupNum"] = "-1";
            oc_Newobject19["buttonType"] = "PushButton";
            oc_Newobject19["useMouseEvents"] = "1";

            #endregion

            oc_Newobject21["#Newobject19"] = oc_Newobject19;

            #region GuiButtonCtrl ()        oc_Newobject20

            ObjectCreator oc_Newobject20 = new ObjectCreator("GuiButtonCtrl", "");
            oc_Newobject20["canSaveDynamicFields"] = "0";
            oc_Newobject20["Enabled"] = "1";
            oc_Newobject20["isContainer"] = "0";
            oc_Newobject20["Profile"] = "ToolsGuiButtonProfile";
            oc_Newobject20["HorizSizing"] = "right";
            oc_Newobject20["VertSizing"] = "bottom";
            oc_Newobject20["Position"] = "0 0";
            oc_Newobject20["Extent"] = "20 16";
            oc_Newobject20["MinExtent"] = "8 8";
            oc_Newobject20["canSave"] = "1";
            oc_Newobject20["isDecoy"] = "0";
            oc_Newobject20["Visible"] = "1";
            oc_Newobject20["Command"] = "MaterialSelector.lastPage();";
            oc_Newobject20["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject20["tooltip"] = "Last";
            oc_Newobject20["hovertime"] = "1000";
            oc_Newobject20["text"] = ">|";
            oc_Newobject20["groupNum"] = "-1";
            oc_Newobject20["buttonType"] = "PushButton";
            oc_Newobject20["useMouseEvents"] = "1";

            #endregion

            oc_Newobject21["#Newobject20"] = oc_Newobject20;

            #endregion

            oc_Newobject22["#Newobject21"] = oc_Newobject21;

            #endregion

            oc_Newobject23["#Newobject22"] = oc_Newobject22;

            #endregion

            oc_Newobject36["#Newobject23"] = oc_Newobject23;

            #region GuiContainer ()        oc_Newobject24

            ObjectCreator oc_Newobject24 = new ObjectCreator("GuiContainer", "");
            oc_Newobject24["Profile"] = "inspectorStyleRolloutDarkProfile";
            oc_Newobject24["Position"] = "612 206";
            oc_Newobject24["Extent"] = "150 31";
            oc_Newobject24["HorizSizing"] = "left";
            oc_Newobject24["VertSizing"] = "bottom";
            oc_Newobject24["isContainer"] = "1";

            #endregion

            oc_Newobject36["#Newobject24"] = oc_Newobject24;

            #region GuiTextCtrl ()        oc_Newobject25

            ObjectCreator oc_Newobject25 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject25["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject25["HorizSizing"] = "left";
            oc_Newobject25["VertSizing"] = "bottom";
            oc_Newobject25["position"] = "618 207";
            oc_Newobject25["extent"] = "84 16";
            oc_Newobject25["text"] = "Material Tags";

            #endregion

            oc_Newobject36["#Newobject25"] = oc_Newobject25;

            #region GuiContainer ()        oc_Newobject28

            ObjectCreator oc_Newobject28 = new ObjectCreator("GuiContainer", "");
            oc_Newobject28["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject28["Position"] = "612 223";
            oc_Newobject28["Extent"] = "150 295";
            oc_Newobject28["HorizSizing"] = "left";
            oc_Newobject28["VertSizing"] = "height";
            oc_Newobject28["isContainer"] = "1";

            #region GuiScrollCtrl ()        oc_Newobject27

            ObjectCreator oc_Newobject27 = new ObjectCreator("GuiScrollCtrl", "");
            oc_Newobject27["canSaveDynamicFields"] = "0";
            oc_Newobject27["Enabled"] = "1";
            oc_Newobject27["isContainer"] = "1";
            oc_Newobject27["Profile"] = "GuiEditorScrollProfile";
            oc_Newobject27["HorizSizing"] = "width";
            oc_Newobject27["VertSizing"] = "height";
            oc_Newobject27["Position"] = "0 0";
            oc_Newobject27["Extent"] = "128 195";
            oc_Newobject27["MinExtent"] = "8 8";
            oc_Newobject27["canSave"] = "1";
            oc_Newobject27["isDecoy"] = "0";
            oc_Newobject27["Visible"] = "1";
            oc_Newobject27["tooltipprofile"] = "ToolsGuiDefaultProfile";
            oc_Newobject27["hovertime"] = "1000";
            oc_Newobject27["Docking"] = "Client";
            oc_Newobject27["Margin"] = "0 0 0 0";
            oc_Newobject27["Padding"] = "0 0 0 0";
            oc_Newobject27["AnchorTop"] = "1";
            oc_Newobject27["AnchorBottom"] = "0";
            oc_Newobject27["AnchorLeft"] = "1";
            oc_Newobject27["AnchorRight"] = "0";
            oc_Newobject27["willFirstRespond"] = "1";
            oc_Newobject27["hScrollBar"] = "alwaysOff";
            oc_Newobject27["vScrollBar"] = "dynamic";
            oc_Newobject27["lockHorizScroll"] = "true";
            oc_Newobject27["lockVertScroll"] = "false";
            oc_Newobject27["constantThumbHeight"] = "0";
            oc_Newobject27["childMargin"] = "0 0";
            oc_Newobject27["mouseWheelScrollSpeed"] = "-1";

            #region GuiDynamicCtrlArrayControl ()        oc_Newobject26

            ObjectCreator oc_Newobject26 = new ObjectCreator("GuiDynamicCtrlArrayControl", "");
            oc_Newobject26["canSaveDynamicFields"] = "0";
            oc_Newobject26["internalName"] = "materialCategories";
            oc_Newobject26["Enabled"] = "1";
            oc_Newobject26["isContainer"] = "1";
            oc_Newobject26["Profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject26["HorizSizing"] = "width";
            oc_Newobject26["VertSizing"] = "bottom";
            oc_Newobject26["Position"] = "0 0";
            oc_Newobject26["Extent"] = "128 195";
            oc_Newobject26["MinExtent"] = "8 8";
            oc_Newobject26["dynamicSize"] = "1";
            oc_Newobject26["rowSpacing"] = "2";
            oc_Newobject26["colSize"] = "128";
            oc_Newobject26["rowSize"] = "18";

            #endregion

            oc_Newobject27["#Newobject26"] = oc_Newobject26;

            #endregion

            oc_Newobject28["#Newobject27"] = oc_Newobject27;

            #endregion

            oc_Newobject36["#Newobject28"] = oc_Newobject28;

            #region GuiContainer ()        oc_Newobject30

            ObjectCreator oc_Newobject30 = new ObjectCreator("GuiContainer", "");
            oc_Newobject30["Profile"] = "inspectorStyleRolloutDarkProfile";
            oc_Newobject30["Position"] = "612 22";
            oc_Newobject30["Extent"] = "150 167";
            oc_Newobject30["HorizSizing"] = "left";
            oc_Newobject30["VertSizing"] = "bottom";
            oc_Newobject30["isContainer"] = "1";

            #region GuiBitmapCtrl ()        oc_Newobject29

            ObjectCreator oc_Newobject29 = new ObjectCreator("GuiBitmapCtrl", "");
            oc_Newobject29["internalName"] = "previewSelection";
            oc_Newobject29["HorizSizing"] = "left";
            oc_Newobject29["VertSizing"] = "bottom";
            oc_Newobject29["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject29["position"] = "1 18";
            oc_Newobject29["extent"] = "148 148";
            oc_Newobject29["bitmap"] = "";

            #endregion

            oc_Newobject30["#Newobject29"] = oc_Newobject29;

            #endregion

            oc_Newobject36["#Newobject30"] = oc_Newobject30;

            #region GuiTextCtrl ()        oc_Newobject31

            ObjectCreator oc_Newobject31 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject31["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject31["HorizSizing"] = "left";
            oc_Newobject31["VertSizing"] = "bottom";
            oc_Newobject31["position"] = "618 23";
            oc_Newobject31["extent"] = "84 16";
            oc_Newobject31["text"] = "Diffuse Preview";

            #endregion

            oc_Newobject36["#Newobject31"] = oc_Newobject31;

            #region GuiBitmapCtrl ()        oc_Newobject32

            ObjectCreator oc_Newobject32 = new ObjectCreator("GuiBitmapCtrl", "");
            oc_Newobject32["HorizSizing"] = "left";
            oc_Newobject32["VertSizing"] = "bottom";
            oc_Newobject32["profile"] = "ToolsGuiDefaultProfile";
            oc_Newobject32["position"] = "612 39";
            oc_Newobject32["extent"] = "150 150";
            oc_Newobject32["bitmap"] = "tools/worldEditor/images/terrainpainter/terrain-painter-border-large";
            oc_Newobject32["visible"] = new Creator.StringNoQuote("false");

            #endregion

            oc_Newobject36["#Newobject32"] = oc_Newobject32;

            #region GuiTextCtrl ()        oc_Newobject33

            ObjectCreator oc_Newobject33 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject33["internalName"] = "previewSelectionText";
            oc_Newobject33["HorizSizing"] = "left";
            oc_Newobject33["VertSizing"] = "bottom";
            oc_Newobject33["profile"] = "ToolsGuiTextProfile";
            oc_Newobject33["position"] = "613 189";
            oc_Newobject33["extent"] = "149 16";
            oc_Newobject33["text"] = "";

            #endregion

            oc_Newobject36["#Newobject33"] = oc_Newobject33;

            #region GuiButtonCtrl ()        oc_Newobject34

            ObjectCreator oc_Newobject34 = new ObjectCreator("GuiButtonCtrl", "");
            oc_Newobject34["internalName"] = "SelectButton";
            oc_Newobject34["HorizSizing"] = "left";
            oc_Newobject34["VertSizing"] = "top";
            oc_Newobject34["profile"] = "ToolsGuiButtonProfile";
            oc_Newobject34["position"] = "612 522";
            oc_Newobject34["extent"] = "94 24";
            oc_Newobject34["text"] = "Select";
            oc_Newobject34["command"] = "MaterialSelector.selectMaterial( MaterialSelector.selectedMaterial );";

            #endregion

            oc_Newobject36["#Newobject34"] = oc_Newobject34;

            #region GuiButtonCtrl ()        oc_Newobject35

            ObjectCreator oc_Newobject35 = new ObjectCreator("GuiButtonCtrl", "");
            oc_Newobject35["HorizSizing"] = "left";
            oc_Newobject35["VertSizing"] = "top";
            oc_Newobject35["profile"] = "ToolsGuiButtonProfile";
            oc_Newobject35["position"] = "710 522";
            oc_Newobject35["extent"] = "52 24";
            oc_Newobject35["text"] = "Cancel";
            oc_Newobject35["command"] = "MaterialSelector.hideDialog();";

            #endregion

            oc_Newobject36["#Newobject35"] = oc_Newobject35;

            #endregion

            oc_Newobject42["#Newobject36"] = oc_Newobject36;

            #region GuiWindowCtrl (MaterialSelector_addFilterWindow)        oc_Newobject41

            ObjectCreator oc_Newobject41 = new ObjectCreator("GuiWindowCtrl", "MaterialSelector_addFilterWindow");
            oc_Newobject41["canSaveDynamicFields"] = "0";
            oc_Newobject41["isContainer"] = "1";
            oc_Newobject41["Profile"] = "ToolsGuiWindowProfile";
            oc_Newobject41["HorizSizing"] = "center";
            oc_Newobject41["VertSizing"] = "center";
            oc_Newobject41["position"] = "362 333";
            oc_Newobject41["Extent"] = "272 99";
            oc_Newobject41["MinExtent"] = "48 92";
            oc_Newobject41["canSave"] = "1";
            oc_Newobject41["Visible"] = "0";
            oc_Newobject41["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject41["hovertime"] = "1000";
            oc_Newobject41["Margin"] = "0 0 0 0";
            oc_Newobject41["Padding"] = "0 0 0 0";
            oc_Newobject41["AnchorTop"] = "1";
            oc_Newobject41["AnchorBottom"] = "0";
            oc_Newobject41["AnchorLeft"] = "1";
            oc_Newobject41["AnchorRight"] = "0";
            oc_Newobject41["resizeWidth"] = "1";
            oc_Newobject41["resizeHeight"] = "1";
            oc_Newobject41["canMove"] = "1";
            oc_Newobject41["canClose"] = "0";
            oc_Newobject41["canMinimize"] = "0";
            oc_Newobject41["canMaximize"] = "0";
            oc_Newobject41["minSize"] = "50 50";
            oc_Newobject41["EdgeSnap"] = "1";
            oc_Newobject41["text"] = "Create New Tag";

            #region GuiTextEditCtrl ()        oc_Newobject37

            ObjectCreator oc_Newobject37 = new ObjectCreator("GuiTextEditCtrl", "");
            oc_Newobject37["canSaveDynamicFields"] = "0";
            oc_Newobject37["internalName"] = "tagName";
            oc_Newobject37["isContainer"] = "0";
            oc_Newobject37["Profile"] = "ToolsGuiTextEditProfile";
            oc_Newobject37["HorizSizing"] = "right";
            oc_Newobject37["VertSizing"] = "bottom";
            oc_Newobject37["position"] = "64 35";
            oc_Newobject37["Extent"] = "196 18";
            oc_Newobject37["MinExtent"] = "8 2";
            oc_Newobject37["canSave"] = "1";
            oc_Newobject37["Visible"] = "1";
            oc_Newobject37["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject37["hovertime"] = "1000";
            oc_Newobject37["Margin"] = "0 0 0 0";
            oc_Newobject37["Padding"] = "0 0 0 0";
            oc_Newobject37["AnchorTop"] = "1";
            oc_Newobject37["AnchorBottom"] = "0";
            oc_Newobject37["AnchorLeft"] = "1";
            oc_Newobject37["AnchorRight"] = "0";
            oc_Newobject37["maxLength"] = "1024";
            oc_Newobject37["historySize"] = "0";
            oc_Newobject37["password"] = "******";
            oc_Newobject37["tabComplete"] = "0";
            oc_Newobject37["sinkAllKeyEvents"] = "0";
            oc_Newobject37["passwordMask"] = "*";

            #endregion

            oc_Newobject41["#Newobject37"] = oc_Newobject37;

            #region GuiTextCtrl ()        oc_Newobject38

            ObjectCreator oc_Newobject38 = new ObjectCreator("GuiTextCtrl", "");
            oc_Newobject38["canSaveDynamicFields"] = "0";
            oc_Newobject38["isContainer"] = "0";
            oc_Newobject38["Profile"] = "ToolsGuiTextProfile";
            oc_Newobject38["HorizSizing"] = "right";
            oc_Newobject38["VertSizing"] = "bottom";
            oc_Newobject38["position"] = "12 35";
            oc_Newobject38["Extent"] = "52 16";
            oc_Newobject38["MinExtent"] = "8 2";
            oc_Newobject38["canSave"] = "1";
            oc_Newobject38["Visible"] = "1";
            oc_Newobject38["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject38["hovertime"] = "1000";
            oc_Newobject38["Margin"] = "0 0 0 0";
            oc_Newobject38["Padding"] = "0 0 0 0";
            oc_Newobject38["AnchorTop"] = "1";
            oc_Newobject38["AnchorBottom"] = "0";
            oc_Newobject38["AnchorLeft"] = "1";
            oc_Newobject38["AnchorRight"] = "0";
            oc_Newobject38["maxLength"] = "1024";
            oc_Newobject38["text"] = "Tag Name";

            #endregion

            oc_Newobject41["#Newobject38"] = oc_Newobject38;

            #region GuiButtonCtrl ()        oc_Newobject39

            ObjectCreator oc_Newobject39 = new ObjectCreator("GuiButtonCtrl", "");
            oc_Newobject39["canSaveDynamicFields"] = "0";
            oc_Newobject39["isContainer"] = "0";
            oc_Newobject39["Profile"] = "ToolsGuiButtonProfile";
            oc_Newobject39["HorizSizing"] = "right";
            oc_Newobject39["VertSizing"] = "bottom";
            oc_Newobject39["position"] = "64 68";
            oc_Newobject39["Extent"] = "126 22";
            oc_Newobject39["MinExtent"] = "8 2";
            oc_Newobject39["canSave"] = "1";
            oc_Newobject39["Visible"] = "1";
            oc_Newobject39["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject39["hovertime"] = "1000";
            oc_Newobject39["groupNum"] = "-1";
            oc_Newobject39["buttonType"] = "PushButton";
            oc_Newobject39["useMouseEvents"] = "0";
            oc_Newobject39["text"] = "Create";
            oc_Newobject39["Command"] = "MaterialSelector.createFilter( MaterialSelector_addFilterWindow-->tagName.getText() );MaterialSelector_addFilterWindow.setVisible(0);";

            #endregion

            oc_Newobject41["#Newobject39"] = oc_Newobject39;

            #region GuiButtonCtrl ()        oc_Newobject40

            ObjectCreator oc_Newobject40 = new ObjectCreator("GuiButtonCtrl", "");
            oc_Newobject40["canSaveDynamicFields"] = "0";
            oc_Newobject40["isContainer"] = "0";
            oc_Newobject40["Profile"] = "ToolsGuiButtonProfile";
            oc_Newobject40["HorizSizing"] = "right";
            oc_Newobject40["VertSizing"] = "bottom";
            oc_Newobject40["position"] = "196 68";
            oc_Newobject40["Extent"] = "64 22";
            oc_Newobject40["MinExtent"] = "8 2";
            oc_Newobject40["canSave"] = "1";
            oc_Newobject40["Visible"] = "1";
            oc_Newobject40["tooltipprofile"] = "ToolsGuiToolTipProfile";
            oc_Newobject40["hovertime"] = "1000";
            oc_Newobject40["groupNum"] = "-1";
            oc_Newobject40["buttonType"] = "PushButton";
            oc_Newobject40["useMouseEvents"] = "0";
            oc_Newobject40["text"] = "Cancel";
            oc_Newobject40["Command"] = "MaterialSelector_addFilterWindow.setVisible(0);";

            #endregion

            oc_Newobject41["#Newobject40"] = oc_Newobject40;

            #endregion

            oc_Newobject42["#Newobject41"] = oc_Newobject41;

            #endregion

            oc_Newobject42.Create();

            omni.sGlobal["$Pref::MaterialSelector::CurrentStaticFilter"] = "MaterialFilterAllArray";
            omni.sGlobal["$Pref::MaterialSelector::CurrentFilter"] = ""; //ALL
            omni.iGlobal["$Pref::MaterialSelector::ThumbnailCountIndex"] = 0;

            new ObjectCreator("PersistenceManager", "MaterialSelectorPerMan").Create();

            Material WarningMaterial = "WarningMaterial";
            Material materialEd_previewMaterial = "materialEd_previewMaterial";
            Material notDirtyMaterial = "notDirtyMaterial";
            Material materialEd_cubemapEd_cubeMapPreview = "materialEd_cubemapEd_cubeMapPreview";
            CubemapData matEdCubeMapPreviewMat = "matEdCubeMapPreviewMat";
            CustomMaterial materialEd_justAlphaMaterial = "materialEd_justAlphaMaterial";
            ShaderData materialEd_justAlphaShader = "materialEd_justAlphaShader";

            ArrayObject UnlistedMaterials = new ObjectCreator("ArrayObject", "UnlistedMaterials").Create();
            UnlistedMaterials.add("unlistedMaterials", WarningMaterial);
            UnlistedMaterials.add("unlistedMaterials", materialEd_previewMaterial);
            UnlistedMaterials.add("unlistedMaterials", notDirtyMaterial);
            UnlistedMaterials.add("unlistedMaterials", materialEd_cubemapEd_cubeMapPreview);
            UnlistedMaterials.add("unlistedMaterials", matEdCubeMapPreviewMat);
            UnlistedMaterials.add("unlistedMaterials", materialEd_justAlphaMaterial);
            UnlistedMaterials.add("unlistedMaterials", materialEd_justAlphaShader);
        }
Ejemplo n.º 6
0
 public override void onControlInspectPreApply(GuiControl control)
 {
     SimSet set = new ObjectCreator("SimSet").Create();
     set.add(control);
     this.onPreEdit(set);
     this.pendingGenericUndoAction.actionName = "Change Properties";
     set.delete();
 }
Ejemplo n.º 7
0
            public override void onAddNewCtrl(GuiControl ctrl)
            {
                GuiEditorUndo.UndoActionAddObject UndoActionAddObject = "UndoActionAddObject";
                GuiEditorTreeView GuiEditorTreeView = "GuiEditorTreeView";

                SimSet set = new ObjectCreator("SimSet").Create();
                set.add(ctrl);
                GuiEditorUndo.UndoActionAddObject act = UndoActionAddObject.create(set, this.getTrash(), GuiEditorTreeView, false);
                set.delete();
                act.addToManager(this.getUndoManager());
                this.updateUndoMenu();
                //GuiEditorInspectFields.update(0);
            }
Ejemplo n.º 8
0
            public void deleteControl(SimObject ctrl)
            {
                GuiEditorUndo.UndoActionDeleteObject UndoActionDeleteObject = "UndoActionDeleteObject";
                GuiEditorTreeView GuiEditorTreeView = "GuiEditorTreeView";

                // Unselect.

                this.removeSelection(ctrl);

                // Record undo.

                SimSet set = new ObjectCreator("SimSet").Create();
                set.parentGroup = "RootGroup";

                set.add(ctrl);

                GuiEditorUndo.UndoActionDeleteObject action = UndoActionDeleteObject.create(set, this.getTrash(), GuiEditorTreeView, true);
                action.addToManager(this.getUndoManager());
                this.updateUndoMenu();

                GuiEditorTreeView.update();
                set.delete();

                // Remove.

                ((SimSet) this.getTrash()).add(ctrl);
            }
        public void loadLights()
        {
            SimGroup MissionGroup = "MissionGroup";
            EditorTree EditorTree = "EditorTree";

            // Get the ID of the last object added
            SimObject obj = MissionGroup.getObject((uint) MissionGroup.getCount() - 1);

            // Create a new SimGroup to hold the model and lights
            SimGroup group = new ObjectCreator("SimGroup").Create();
            Util.loadColladaLights(this.path, group, obj);

            // Delete the SimGroup if no lights were found. Otherwise, add the model to
            // the group as well.
            if (group.getCount() > 0)
                {
                group.add(obj);
                group.bringToFront(obj);
                MissionGroup.add(group);
                if (EditorTree.isVisible())
                    {
                    EditorTree.removeItem(EditorTree.findItemByObjectId(obj));
                    EditorTree.buildVisibleTree(true);
                    }
                }
            else
                group.delete();
        }
        public override void onWorldEditorStartup()
        {
            EditorGui EditorGui = "EditorGui";
            GuiWindowCollapseCtrl MaterialEditorPropertiesWindow = "MaterialEditorPropertiesWindow";
            MaterialEditor.MaterialEditorGui MaterialEditorGui = "MaterialEditorGui";
            CubemapData matEdCubeMapPreviewMat = "matEdCubeMapPreviewMat";
            CubemapData WarnMatCubeMap = "WarnMatCubeMap";

            // Add ourselves to the window menu.
            string accel = EditorGui.addToEditorsMenu("Material Editor", "", this);

            // Add ourselves to the ToolsToolbar
            string tooltip = "Material Editor (" + accel + ")";
            EditorGui.addToToolsToolbar("MaterialEditorPlugin", "MaterialEditorPalette", Util._expandFilename("tools/worldEditor/images/toolbar/matterial-editor"), tooltip);

            //connect editor windows
            MaterialEditorPropertiesWindow.attachTo("MaterialEditorPreviewWindow");

            ActionMap map = new ObjectCreator("ActionMap").Create();
            map.bindCmd("keyboard", "1", "EWorldEditorNoneModeBtn.performClick();", ""); // Select
            map.bindCmd("keyboard", "2", "EWorldEditorMoveModeBtn.performClick();", ""); // Move
            map.bindCmd("keyboard", "3", "EWorldEditorRotateModeBtn.performClick();", ""); // Rotate
            map.bindCmd("keyboard", "4", "EWorldEditorScaleModeBtn.performClick();", ""); // Scale
            map.bindCmd("keyboard", "f", "FitToSelectionBtn.performClick();", ""); // Fit Camera to Selection
            map.bindCmd("keyboard", "z", "EditorGuiStatusBar.setCamera(\"Standard Camera\");", ""); // Free Camera
            map.bindCmd("keyboard", "n", "ToggleNodeBar->renderHandleBtn.performClick();", ""); // Render Node
            map.bindCmd("keyboard", "shift n", "ToggleNodeBar->renderTextBtn.performClick();", ""); // Render Node Text
            map.bindCmd("keyboard", "alt s", "MaterialEditorGui.save();", ""); // Save Material
            //%map.bindCmd( keyboard, "delete", "ToggleNodeBar->renderTextBtn.performClick();", "" );// delete Material
            map.bindCmd("keyboard", "g", "ESnapOptions-->GridSnapButton.performClick();", ""); // Grid Snappping
            map.bindCmd("keyboard", "t", "SnapToBar->objectSnapDownBtn.performClick();", ""); // Terrain Snapping
            map.bindCmd("keyboard", "b", "SnapToBar-->objectSnapBtn.performClick();", ""); // Soft Snappping
            map.bindCmd("keyboard", "v", "EWorldEditorToolbar->boundingBoxColBtn.performClick();", "");
            // Bounds Selection
            map.bindCmd("keyboard", "o", "objectCenterDropdown->objectBoxBtn.performClick(); objectCenterDropdown.toggle();", "");
            // Object Center
            map.bindCmd("keyboard", "p", "objectCenterDropdown->objectBoundsBtn.performClick(); objectCenterDropdown.toggle();", "");
            // Bounds Center
            map.bindCmd("keyboard", "k", "objectTransformDropdown->objectTransformBtn.performClick(); objectTransformDropdown.toggle();", "");
            // Object Transform
            map.bindCmd("keyboard", "l", "objectTransformDropdown->worldTransformBtn.performClick(); objectTransformDropdown.toggle();", "");
            // World Transform
            this.map = map;

            MaterialEditorGui["fileSpec"] = "Torque Material Files (materials.cs)|materials.cs|All Files (*.*)|*.*";
            MaterialEditorGui["textureFormats"] = "Image Files (*.png, *.jpg, *.dds, *.bmp, *.gif, *.jng. *.tga)|*.png;*.jpg;*.dds;*.bmp;*.gif;*.jng;*.tga|All Files (*.*)|*.*";
            MaterialEditorGui["modelFormats"] = "DTS Files (*.dts)|*.dts";
            MaterialEditorGui["lastTexturePath"] = "";
            MaterialEditorGui["lastTextureFile"] = "";
            MaterialEditorGui["lastModelPath"] = "";
            MaterialEditorGui["lastModelFile"] = "";
            MaterialEditorGui.currentMaterial = "";
            MaterialEditorGui["lastMaterial"] = "";
            MaterialEditorGui["currentCubemap"] = "";
            MaterialEditorGui.currentObject = "";

            MaterialEditorGui["livePreview"] = "1";
            MaterialEditorGui["currentLayer"] = "0";
            MaterialEditorGui.currentMode = "Material";
            MaterialEditorGui.currentMeshMode = "EditorShape";

            ArrayObject UnlistedCubemaps = new ObjectCreator("ArrayObject", "UnlistedCubemaps").Create();
            UnlistedCubemaps.add("unlistedCubemaps", matEdCubeMapPreviewMat);
            UnlistedCubemaps.add("unlistedCubemaps", WarnMatCubeMap);

            //MaterialEditor persistence manager
            new ObjectCreator("PersistenceManager", "matEd_PersistMan").Create();
        }