diff --git a/Engine/source/T3D/assets/ImageAsset.cpp b/Engine/source/T3D/assets/ImageAsset.cpp index bc831a2c8..dd50934d5 100644 --- a/Engine/source/T3D/assets/ImageAsset.cpp +++ b/Engine/source/T3D/assets/ImageAsset.cpp @@ -808,6 +808,8 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl() if (Sim::findObject("ToolsGuiTextEditProfile", toolEditProfile)) editTextCtrl->setControlProfile(toolEditProfile); + editTextCtrl->setPlaceholderText("(None)"); + GuiControlProfile* toolDefaultProfile = nullptr; Sim::findObject("ToolsGuiDefaultProfile", toolDefaultProfile); @@ -836,21 +838,25 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl() // // Create "Open in Editor" button - /*mEditButton = new GuiBitmapButtonCtrl(); + mEditButton = new GuiBitmapButtonCtrl(); + + if (mInspector->getInspectObject() != nullptr) + dSprintf(szBuffer, sizeof(szBuffer), "%d.apply(\"\");", getId()); + else + dSprintf(szBuffer, sizeof(szBuffer), "%s = \"\";", mVariableName); - dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.editAsset(%d.getText());", retCtrl->getId()); mEditButton->setField("Command", szBuffer); - mEditButton->setText("Edit"); - mEditButton->setSizing(horizResizeLeft, vertResizeAspectTop); + mEditButton->setBitmap(StringTable->insert("ToolsModule:delete_n_image")); + mEditButton->setSizing(horizResizeRight, vertResizeAspectBottom); mEditButton->setDataField(StringTable->insert("Profile"), NULL, "ToolsGuiButtonProfile"); mEditButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); mEditButton->setDataField(StringTable->insert("hovertime"), NULL, "1000"); - mEditButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this asset in the Image Editor"); + mEditButton->setDataField(StringTable->insert("tooltip"), NULL, "Clear this ImageAsset"); mEditButton->registerObject(); - addObject(mEditButton);*/ + addObject(mEditButton); // mUseHeightOverride = true; @@ -875,9 +881,9 @@ bool GuiInspectorTypeImageAssetPtr::updateRects() mPreviewImage->resize(previewRect.point, previewRect.extent); S32 editPos = previewRect.point.x + previewRect.extent.x + 10; - mEdit->resize(Point2I(editPos, rowSize * 1.5), Point2I(fieldExtent.x - editPos - 5, rowSize)); + mEdit->resize(Point2I(editPos, rowSize * 1.5), Point2I(fieldExtent.x - editPos - 5 - rowSize, rowSize)); - //mEditButton->resize(Point2I(fieldExtent.x - 105, previewRect.point.y + previewRect.extent.y - rowSize), Point2I(100, rowSize)); + mEditButton->resize(Point2I(mEdit->getPosition().x + mEdit->getExtent().x, mEdit->getPosition().y), Point2I(rowSize, rowSize)); mBrowseButton->setHidden(true); @@ -975,7 +981,7 @@ void GuiInspectorTypeImageAssetPtr::updatePreviewImage() //if what we're working with isn't even a valid asset, don't present like we found a good one if (!AssetDatabase.isDeclaredAsset(previewImage)) { - mPreviewImage->_setBitmap(StringTable->EmptyString()); + mPreviewImage->_setBitmap(StringTable->insert("ToolsModule:unknownImage_image")); return; } @@ -1003,7 +1009,7 @@ void GuiInspectorTypeImageAssetPtr::setPreviewImage(StringTableEntry assetId) //if what we're working with isn't even a valid asset, don't present like we found a good one if (!AssetDatabase.isDeclaredAsset(assetId)) { - mPreviewImage->_setBitmap(StringTable->EmptyString()); + mPreviewImage->_setBitmap(StringTable->insert("ToolsModule:unknownImage_image")); return; } @@ -1025,4 +1031,20 @@ void GuiInspectorTypeImageAssetPtr::setPreviewImage(StringTableEntry assetId) if (mPreviewImage->getBitmapAsset().isNull()) mPreviewImage->_setBitmap(StringTable->insert("ToolsModule:genericAssetIcon_image")); } + +void GuiInspectorTypeImageAssetPtr::setCaption(StringTableEntry caption) +{ + mCaption = caption; + mLabel->setText(mCaption); +} + +DefineEngineMethod(GuiInspectorTypeImageAssetPtr, setCaption, void, (String newCaption), , "() - Sets the caption of the field.") +{ + object->setCaption(StringTable->insert(newCaption.c_str())); +} + +DefineEngineMethod(GuiInspectorTypeImageAssetPtr, setIsDeleteBtnVisible, void, (bool isVisible), (false), "() - Sets if the delete/clear button is visible for the field") +{ + object->setIsDeleteBtnVisible(isVisible); +} #endif diff --git a/Engine/source/T3D/assets/ImageAssetInspectors.h b/Engine/source/T3D/assets/ImageAssetInspectors.h index 36d4a9788..b43460293 100644 --- a/Engine/source/T3D/assets/ImageAssetInspectors.h +++ b/Engine/source/T3D/assets/ImageAssetInspectors.h @@ -16,7 +16,9 @@ public: GuiTextCtrl* mLabel = NULL; GuiBitmapButtonCtrl* mPreviewBorderButton = NULL; GuiBitmapCtrl* mPreviewImage = NULL; - GuiButtonCtrl* mEditButton = NULL; + GuiBitmapButtonCtrl* mEditButton = NULL; + + bool mIsDeleteButtonVisible; DECLARE_CONOBJECT(GuiInspectorTypeImageAssetPtr); static void consoleInit(); @@ -29,6 +31,16 @@ public: void updatePreviewImage(); void setPreviewImage(StringTableEntry assetId); + + /// Sets this control's caption text, usually set within setInspectorField, + /// this is exposed in case someone wants to override the normal caption. + void setCaption(StringTableEntry caption) override; + + void setIsDeleteBtnVisible(const bool& isVisible) + { + if (mEditButton) + mEditButton->setVisible(isVisible); + } }; class GuiInspectorTypeImageAssetId : public GuiInspectorTypeImageAssetPtr diff --git a/Engine/source/T3D/guiMaterialPreview.cpp b/Engine/source/T3D/guiMaterialPreview.cpp index a83569f6e..4efda009d 100644 --- a/Engine/source/T3D/guiMaterialPreview.cpp +++ b/Engine/source/T3D/guiMaterialPreview.cpp @@ -40,7 +40,8 @@ // GuiMaterialPreview GuiMaterialPreview::GuiMaterialPreview() : mMouseState(None), - mModel(NULL), + mModelInstance(NULL), + mMountedModelInstance(NULL), runThread(0), lastRenderTime(0), mLastMousePoint(0, 0), @@ -64,13 +65,13 @@ GuiMaterialPreview::GuiMaterialPreview() // By default don't do dynamic reflection // updates for this viewport. mReflectPriority = 0.0f; - mMountedModel = NULL; + mSkinTag = 0; } GuiMaterialPreview::~GuiMaterialPreview() { - SAFE_DELETE(mModel); + SAFE_DELETE(mModelInstance); SAFE_DELETE(mFakeSun); } @@ -258,30 +259,34 @@ void GuiMaterialPreview::onMiddleMouseDragged(const GuiEvent &event) } // This is used to set the model we want to view in the control object. -void GuiMaterialPreview::setObjectModel(const char* modelName) +void GuiMaterialPreview::setObjectModel(StringTableEntry modelName) { deleteModel(); - Resource model = ResourceManager::get().load(modelName); - if (! bool(model)) + _setModel(modelName); + + if (!getModel()) { - Con::warnf(avar("GuiMaterialPreview: Failed to load model %s. Please check your model name and load a valid model.", modelName)); + Con::warnf("GuiMaterialPreview::setObjectModel - Failed to load model '%s'", modelName); return; } - mModel = new TSShapeInstance(model, true); - AssertFatal(mModel, avar("GuiMaterialPreview: Failed to load model %s. Please check your model name and load a valid model.", modelName)); + mModelInstance = new TSShapeInstance(getModel(), true); + mModelInstance->resetMaterialList(); + mModelInstance->cloneMaterialList(); + + AssertFatal(mModelInstance, avar("GuiMaterialPreview: Failed to load model %s. Please check your model name and load a valid model.", modelName)); // Initialize camera values: - mOrbitPos = mModel->getShape()->center; - mMinOrbitDist = mModel->getShape()->mRadius; + mOrbitPos = mModelInstance->getShape()->center; + mMinOrbitDist = mModelInstance->getShape()->mRadius; lastRenderTime = Platform::getVirtualMilliseconds(); } void GuiMaterialPreview::deleteModel() { - SAFE_DELETE(mModel); + SAFE_DELETE(mModelInstance); runThread = 0; } @@ -358,7 +363,7 @@ void GuiMaterialPreview::onMouseLeave(const GuiEvent & event) void GuiMaterialPreview::renderWorld(const RectI &updateRect) { // nothing to render, punt - if ( !mModel && !mMountedModel ) + if ( !mModelInstance && !mMountedModelInstance ) return; S32 time = Platform::getVirtualMilliseconds(); @@ -408,10 +413,10 @@ void GuiMaterialPreview::renderWorld(const RectI &updateRect) LIGHTMGR->unregisterAllLights(); LIGHTMGR->setSpecialLight( LightManager::slSunLightType, mFakeSun ); - if ( mModel ) - mModel->render( rdata ); + if ( mModelInstance ) + mModelInstance->render( rdata ); - if ( mMountedModel ) + if ( mMountedModelInstance ) { // render a weapon /* @@ -441,7 +446,7 @@ void GuiMaterialPreview::renderSunDirection() const { // Render four arrows aiming in the direction of the sun's light ColorI color = LinearColorF(mFakeSun->getColor()).toColorI(); - F32 length = mModel->getShape()->mBounds.len() * 0.8f; + F32 length = mModelInstance->getShape()->mBounds.len() * 0.8f; // Get the sun's vectors Point3F fwd = mFakeSun->getTransform().getForwardVector(); @@ -449,8 +454,8 @@ void GuiMaterialPreview::renderSunDirection() const Point3F right = mFakeSun->getTransform().getRightVector() * length / 8; // Calculate the start and end points of the first arrow (bottom left) - Point3F start = mModel->getShape()->center - fwd * length - up / 2 - right / 2; - Point3F end = mModel->getShape()->center - fwd * length / 3 - up / 2 - right / 2; + Point3F start = mModelInstance->getShape()->center - fwd * length - up / 2 - right / 2; + Point3F end = mModelInstance->getShape()->center - fwd * length / 3 - up / 2 - right / 2; GFXStateBlockDesc desc; desc.setZReadWrite(true, true); @@ -476,7 +481,7 @@ void GuiMaterialPreview::resetViewport() mCameraRot.set( mDegToRad(30.0f), 0, mDegToRad(-30.0f) ); mCameraPos.set(0.0f, 1.75f, 1.25f); mOrbitDist = 5.0f; - mOrbitPos = mModel->getShape()->center; + mOrbitPos = mModelInstance->getShape()->center; // Reset the viewport's lighting. GuiMaterialPreview::mFakeSun->setColor( LinearColorF( 1.0f, 1.0f, 1.0f ) ); @@ -498,7 +503,7 @@ DefineEngineMethod(GuiMaterialPreview, setModel, void, ( const char* shapeName ) "Sets the model to be displayed in this control\n\n" "@param shapeName Name of the model to display.\n") { - object->setObjectModel(shapeName); + object->setObjectModel(StringTable->insert(shapeName)); } DefineEngineMethod(GuiMaterialPreview, deleteModel, void, (),, diff --git a/Engine/source/T3D/guiMaterialPreview.h b/Engine/source/T3D/guiMaterialPreview.h index 3acafeb14..7c5d2ce09 100644 --- a/Engine/source/T3D/guiMaterialPreview.h +++ b/Engine/source/T3D/guiMaterialPreview.h @@ -28,6 +28,8 @@ #ifndef _GUIMATERIALPREVIEW_H_ #define _GUIMATERIALPREVIEW_H_ +#include "assets/ShapeAsset.h" + #include "gui/3d/guiTSControl.h" #include "ts/tsShapeInstance.h" @@ -50,8 +52,11 @@ protected: MouseState mMouseState; - TSShapeInstance* mModel; - TSShapeInstance* mMountedModel; + DECLARE_SHAPEASSET_REFACTOR(GuiMaterialPreview, Model) + DECLARE_SHAPEASSET_REFACTOR(GuiMaterialPreview, MountedModel) + + TSShapeInstance* mModelInstance; + TSShapeInstance* mMountedModelInstance; U32 mSkinTag; // For Camera Panning. diff --git a/Engine/source/gui/editor/inspector/field.cpp b/Engine/source/gui/editor/inspector/field.cpp index 748eddb88..a77c03601 100644 --- a/Engine/source/gui/editor/inspector/field.cpp +++ b/Engine/source/gui/editor/inspector/field.cpp @@ -1050,6 +1050,15 @@ DefineEngineMethod(GuiInspectorField, setCaption, void, (String newCaption),, "( object->setCaption(StringTable->insert(newCaption.c_str())); } +DefineEngineMethod(GuiInspectorField, getFieldName, const char*, (), , "() - Gets the fieldName of the field.") +{ + constexpr U32 bufSize = 128; + char* retBuffer = Con::getReturnBuffer(bufSize); + dSprintf(retBuffer, bufSize, "%s", object->getFieldName()); + + return retBuffer; +} + DefineEngineMethod(GuiInspectorField, setSpecialEditVariableName, void, (String newCaption), , "() - Sets the variable name for special edit fields.") { object->setSpecialEditVariableName(StringTable->insert(newCaption.c_str())); diff --git a/Engine/source/gui/editor/inspector/field.h b/Engine/source/gui/editor/inspector/field.h index a5057254d..30dd7442b 100644 --- a/Engine/source/gui/editor/inspector/field.h +++ b/Engine/source/gui/editor/inspector/field.h @@ -132,6 +132,8 @@ class GuiInspectorField : public GuiControl /// this is exposed in case someone wants to override the normal caption. virtual void setCaption( StringTableEntry caption ) { mCaption = caption; } + virtual StringTableEntry getCaption() { return mCaption; } + void setEditControl(GuiControl* editCtrl); void setHeightOverride(bool useOverride, U32 heightOverride); diff --git a/Engine/source/gui/editor/inspector/group.cpp b/Engine/source/gui/editor/inspector/group.cpp index 13953ead5..cd2a8000b 100644 --- a/Engine/source/gui/editor/inspector/group.cpp +++ b/Engine/source/gui/editor/inspector/group.cpp @@ -211,7 +211,7 @@ GuiInspectorField *GuiInspectorGroup::findField( const char *fieldName ) for( ; i != mChildren.end(); i++ ) { - if( (*i)->getFieldName() != NULL && dStricmp( (*i)->getFieldName(), fieldName ) == 0 ) + if( ((*i)->getFieldName() != NULL && dStricmp( (*i)->getFieldName(), fieldName ) == 0) || ((*i)->getCaption() != StringTable->EmptyString() && dStricmp((*i)->getCaption(), fieldName) == 0) ) return (*i); } @@ -834,3 +834,26 @@ DefineEngineMethod(GuiInspectorGroup, setForcedArrayIndex, void, (S32 arrayIndex { object->setForcedArrayIndex(arrayIndex); } + +DefineEngineMethod(GuiInspectorGroup, findField, S32, (const char* fieldName),, + "Finds an Inspector field in this group of a given name.\n" + "@param fieldName The name of the field to be found.\n" + "@return Field SimObjectId") +{ + if (dStrEqual(fieldName, "")) + return 0; + + GuiInspectorField* field = object->findField(StringTable->insert(fieldName)); + if (field == nullptr) + return 0; + + return field->getId(); +} + +DefineEngineMethod(GuiInspectorGroup, refresh, void, (), , + "Finds an Inspector field in this group of a given name.\n" + "@param fieldName The name of the field to be found.\n" + "@return Field SimObjectId") +{ + object->inspectGroup(); +} diff --git a/Engine/source/materials/materialDefinition.cpp b/Engine/source/materials/materialDefinition.cpp index cd175fd80..4c0e3a61f 100644 --- a/Engine/source/materials/materialDefinition.cpp +++ b/Engine/source/materials/materialDefinition.cpp @@ -101,6 +101,15 @@ ImplementEnumType(MaterialWaveType, { Material::Square, "Square", "Warps the material along a wave which transitions between two oppposite states. As a Square Wave, the transition is quick and sudden." }, EndImplementEnumType; +ImplementEnumType(MaterialSourceChannelType, + "When sampling from ORM Texture maps, dictates what channel to sample from for a given AO, Roughness or Metalness texture.\n" + "@ingroup GFX\n") +{ Material::RedChannel, "Red", "Red Channel" }, +{ Material::GreenChannel, "Green", "Green Channel" }, +{ Material::BlueChannel, "Blue", "Blue Channel" }, +{ Material::AlphaChannel, "Alpha", "Alpha Channel" }, +EndImplementEnumType; + bool Material::sAllowTextureTargetAssignment = false; GFXCubemap* Material::GetNormalizeCube() @@ -254,6 +263,11 @@ void Material::initPersistFields() addGroup("Light Influence Maps"); + addFieldV("roughness", TypeRangedF32, Offset(mRoughness, Material), &CommonValidators::F32_8BitPercent, MAX_STAGES, + "The degree of roughness when not using a ORMConfigMap."); + addFieldV("metalness", TypeRangedF32, Offset(mMetalness, Material), &CommonValidators::F32_8BitPercent, MAX_STAGES, + "The degree of Metalness when not using a ORMConfigMap."); + INITPERSISTFIELD_IMAGEASSET_ARRAY(ORMConfigMap, MAX_STAGES, Material, "AO|Roughness|metalness map"); addField("isSRGb", TypeBool, Offset(mIsSRGb, Material), MAX_STAGES, "Substance Designer Workaround."); @@ -261,21 +275,19 @@ void Material::initPersistFields() "Treat Roughness as Roughness"); INITPERSISTFIELD_IMAGEASSET_ARRAY(AOMap, MAX_STAGES, Material, "AOMap"); - INITPERSISTFIELD_IMAGEASSET_ARRAY(RoughMap, MAX_STAGES, Material, "RoughMap (also needs MetalMap)"); - INITPERSISTFIELD_IMAGEASSET_ARRAY(MetalMap, MAX_STAGES, Material, "MetalMap (also needs RoughMap)"); - INITPERSISTFIELD_IMAGEASSET_ARRAY(GlowMap, MAX_STAGES, Material, "GlowMap (needs Albedo)"); - - addFieldV("AOChan", TypeRangedS32, Offset(mAOChan, Material), &bmpChanRange, MAX_STAGES, + addField("AOChan", TYPEID< SourceChannelType >(), Offset(mAOChan, Material), MAX_STAGES, "The input channel AO maps use."); - addFieldV("roughness", TypeRangedF32, Offset(mRoughness, Material), &CommonValidators::F32_8BitPercent,MAX_STAGES, - "The degree of roughness when not using a ORMConfigMap."); - addFieldV("roughnessChan", TypeRangedS32, Offset(mRoughnessChan, Material), &bmpChanRange, MAX_STAGES, + + INITPERSISTFIELD_IMAGEASSET_ARRAY(RoughMap, MAX_STAGES, Material, "RoughMap (also needs MetalMap)"); + addField("roughnessChan", TYPEID< SourceChannelType >(), Offset(mRoughnessChan, Material), MAX_STAGES, "The input channel roughness maps use."); - addFieldV("metalness", TypeRangedF32, Offset(mMetalness, Material), &CommonValidators::F32_8BitPercent, MAX_STAGES, - "The degree of Metalness when not using a ORMConfigMap."); - addFieldV("metalChan", TypeRangedS32, Offset(mMetalChan, Material), &bmpChanRange, MAX_STAGES, + + INITPERSISTFIELD_IMAGEASSET_ARRAY(MetalMap, MAX_STAGES, Material, "MetalMap (also needs RoughMap)"); + addField("metalChan", TYPEID< SourceChannelType >(), Offset(mMetalChan, Material), MAX_STAGES, "The input channel metalness maps use."); + INITPERSISTFIELD_IMAGEASSET_ARRAY(GlowMap, MAX_STAGES, Material, "GlowMap (needs Albedo)"); + addFieldV("glowMul", TypeRangedF32, Offset(mGlowMul, Material),&glowMulRange, MAX_STAGES, "glow mask multiplier"); endGroup("Light Influence Maps"); diff --git a/Engine/source/materials/materialDefinition.h b/Engine/source/materials/materialDefinition.h index f0045fd10..cecbdc7b3 100644 --- a/Engine/source/materials/materialDefinition.h +++ b/Engine/source/materials/materialDefinition.h @@ -129,6 +129,14 @@ public: Square, }; + enum SourceChannelType + { + RedChannel = 0, + GreenChannel, + BlueChannel, + AlphaChannel + }; + class StageData { protected: @@ -425,9 +433,11 @@ private: typedef Material::AnimType MaterialAnimType; typedef Material::BlendOp MaterialBlendOp; typedef Material::WaveType MaterialWaveType; +typedef Material::SourceChannelType MaterialSourceChannelType; DefineBitfieldType(MaterialAnimType); DefineEnumType(MaterialBlendOp); DefineEnumType(MaterialWaveType); +DefineEnumType(MaterialSourceChannelType); #endif // _MATERIALDEFINITION_H_ diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript index eb29fb365..2b832d0ba 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript @@ -1,5 +1,39 @@ AssetBrowser::registerAssetType("ImageAsset", "Images"); +function ImageAsset::onCreateNew() +{ + %moduleName = $CurrentAssetBrowser.newAssetSettings.moduleName; + %modulePath = "data/" @ %moduleName; + + %assetName = $CurrentAssetBrowser.newAssetSettings.assetName; + + %assetPath = NewAssetTargetAddress.getText() @ "/"; + + %tamlpath = %assetPath @ %assetName @ ".asset.taml"; + %filePath = %assetPath @ %assetName @ ".png"; + + %asset = new ImageAsset() + { + AssetName = %assetName; + versionId = 1; + imageFile = %assetName @ ".png"; + }; + + TamlWrite(%asset, %tamlpath); + + %moduleDef = ModuleDatabase.findModule(%moduleName, 1); + AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath); + + %file = new FileObject(); + + if(%file.openForWrite(%filePath)) + { + %file.close(); + } + + return %tamlpath; +} + function ImageAsset::buildBrowserElement(%this, %previewData) { //%module = %this.dirHandler.getModuleFromAddress(makeRelativePath(filePath(%assetDef.getImagePath()))); @@ -96,6 +130,17 @@ function ImageAsset::generatePreviewImage(%this, %previewButton, %forceRegenerat function ImageAsset::onShowActionMenu(%this) { GenericAsset::onShowActionMenu(%this); + + %assetId = %this.getAssetId(); + + EditAssetPopup.setItemPosition("Create Composite Texture" TAB "" TAB "CompositeTextureEditor.buildComposite(\"" @ %assetId @ "\");", 4); + + EditAssetPopup.objectData = %assetId; + EditAssetPopup.objectType = AssetDatabase.getAssetType(%assetId); + + EditAssetPopup.reloadItems(); + + EditAssetPopup.showPopup(Canvas); } function ImageAsset::onEditProperties(%this) diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript index 6795387f4..0e9952c7e 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript @@ -1,5 +1,13 @@ AssetBrowser::registerAssetType("MaterialAsset", "Materials"); +function MaterialAsset::setupCreateNew() +{ + NewAssetPropertiesInspector.startGroup("Material"); + NewAssetPropertiesInspector.addField("InheritFrom", "Inherit From", "MaterialInheritList", "What material should this new one inherit from.", "", "", $CurrentAssetBrowser.newAssetSettings); + + NewAssetPropertiesInspector.endGroup(); +} + function MaterialAsset::onCreateNew() { %assetName = $CurrentAssetBrowser.newAssetSettings.assetName; @@ -18,6 +26,7 @@ function MaterialAsset::onCreateNew() materialDefinitionName = %assetName; new Material(%assetName) { + inheritFrom = $CurrentAssetBrowser.newAssetSettings.inheritFrom; mapTo = %assetName; }; }; @@ -227,3 +236,101 @@ function GuiInspectorTypeMaterialAssetPtr::onControlDropped( %this, %payload, %p EWorldEditor.isDirty = true; } + +function GuiInspectorGroup::buildMaterialInheritListField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %extent = 18; + + %fieldCtrl = %this.createInspectorField(); + + %extent = %this.stack.getExtent(); + + %width = mRound(%extent/2); + %height = 20; + %inset = 10; + + %editControl = new GuiPopUpMenuCtrlEx() { + class = "materialInheritListField"; + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + isContainer = "0"; + Profile = "ToolsGuiPopUpMenuProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + Position = %fieldCtrl.edit.position; + Extent = %fieldCtrl.edit.extent; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + tooltip = ""; //%tooltip; + text = %fieldDefaultVal; + hovertime = "1000"; + ownerObject = %ownerObj; + fieldName = %fieldName; + callbackName = %callbackName; + allowTextSearch = true; + }; + + //set the field value + if(getSubStr(%this.fieldName, 0, 1) $= "$") + { + if(%fieldName $= "") + %editControl.setText(%fieldName); + } + else if(isObject(%ownerObj)) + { + //regular variable + %setCommand = %editControl @ ".setText(" @ %ownerObj @ "." @ %fieldName @ ");"; + eval(%setCommand); + } + + %listCount = getTokenCount(%fieldDataVals, ",;"); + + for(%i=0; %i < materialSet.getCount(); %i++) + { + %matObj = materialSet.getObject(%i); + %matName = %matObj.getName(); + + if(%matName !$= "") + %editControl.add(%matName); + } + + %fieldCtrl.setCaption(%fieldLabel); + %fieldCtrl.setEditControl(%editControl); + + //echo("GuiInspectorListField - " @ %editControl.getID() @ " - " @ %fieldName); + + %this.addInspectorField(%fieldCtrl); +} + +function materialInheritListField::onSelect( %this, %id, %text ) +{ + if(getSubStr(%this.fieldName, 0, 1) $= "$") + { + //ah, a global var, just do it straight, then + %setCommand = %this.fieldName @ " = \"" @ %text @ "\";"; + } + else if(isObject(%this.ownerObject)) + { + //regular variable + %setCommand = %this.ownerObject @ "." @ %this.fieldName @ " = \"" @ %text @ "\";"; + } + else if(%this.callbackName !$= "") + { + %setCommand = %this.callbackName @ "(\"" @ %this.fieldName @ "\",\"" @ %text @"\");"; + } + + echo("materialInheritListField::onSelect() - command: " @ %setCommand); + + eval(%setCommand); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript index 3ed2b7d2f..a572d06dd 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript @@ -16,6 +16,11 @@ function AssetBrowser::editAsset(%this, %assetDef) } else { + if(AssetDatabase.isDeclaredAsset(%assetDef)) + { + %assetDef = AssetDatabase.acquireAsset(%assetDef); + } + if(isObject(%assetDef)) { %assetType = AssetDatabase.getAssetType(%assetDef.getAssetId()); diff --git a/Templates/BaseGame/game/tools/gui/CubemapEditor.asset.taml b/Templates/BaseGame/game/tools/gui/CubemapEditor.asset.taml index bf47a3b3e..a42dfa462 100644 --- a/Templates/BaseGame/game/tools/gui/CubemapEditor.asset.taml +++ b/Templates/BaseGame/game/tools/gui/CubemapEditor.asset.taml @@ -2,6 +2,6 @@ canSave="true" canSaveDynamicFields="true" AssetName="CubemapEditor" - scriptFile="@assetFile=cubemapEditor.gui" + scriptFile="@assetFile=cubemapEditor.tscript" GUIFile="@assetFile=cubemapEditor.gui" VersionId="1" /> diff --git a/Templates/BaseGame/game/tools/gui/compositeTextureEditor.gui b/Templates/BaseGame/game/tools/gui/compositeTextureEditor.gui new file mode 100644 index 000000000..2d11dfffe --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/compositeTextureEditor.gui @@ -0,0 +1,437 @@ +//--- OBJECT WRITE BEGIN --- +$guiContent = new GuiControl(CompositeTextureEditor) { + extent = "1920 1080"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + isContainer = "1"; + canSaveDynamicFields = "1"; + enabled = "1"; + + new GuiWindowCtrl(CompositeTextureEditorWindow) { + Text = "Composite Texture Editor"; + resizeWidth = "0"; + resizeHeight = "0"; + canMinimize = "0"; + canMaximize = "0"; + closeCommand = "Canvas.popDialog(CompositeTextureEditor);"; + position = "721 416"; + extent = "478 248"; + minExtent = "478 248"; + horizSizing = "center"; + vertSizing = "center"; + profile = "ToolsGuiWindowProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiContainer(CompTextureEd_RedChan) { + position = "11 39"; + extent = "107 174"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + className = "CompositeTextureSlotContainer"; + + new GuiTextCtrl() { + Text = "Red Channel"; + position = "5 -2"; + extent = "100 15"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "1 20"; + extent = "106 23"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "InputMode"; + className = "CompositeTextureChannelMode"; + }; + new GuiContainer() { + position = "0 41"; + extent = "107 125"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueContainer"; + + new GuiTextEditCtrl() { + position = "0 8"; + extent = "28 20"; + profile = "ToolsGuiTextEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueTxtEdit"; + className = "CompositeTextureRawValueEdit"; + }; + new GuiSliderCtrl() { + position = "38 9"; + extent = "68 19"; + profile = "GuiSliderProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueSlider"; + className = "CompositeTextureRawValueSlider"; + Command = "$thisControl.onDragComplete();"; + range = 0 SPC 1; + ticks = 0.01; + }; + }; + new GuiContainer() { + position = "0 41"; + extent = "107 125"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "TextureContainer"; + + new GuiBitmapCtrl() { + BitmapAsset = "ToolsModule:unknownImage_image"; + BitmapFile = "tools/materialEditor/images/unknownImage.png"; + position = "21 9"; + horizSizing = "center"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "Bitmap"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; + position = "21 9"; + extent = "64 64"; + horizSizing = "center"; + profile = "ToolsGuiDefaultProfile"; + command = "$CompTexSourceChannel = 0;AssetBrowser.showDialog(\"ImageAsset\", \"CompositeTextureEditor.setSourceTex\");"; + tooltipProfile = "ToolsGuiDefaultProfile"; + ToolTip = "Set the source of the texture for this channel to sample from when baking a composite."; + }; + new GuiTextCtrl() { + Text = "Source Channel"; + position = "5 85"; + extent = "100 10"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "1 97"; + extent = "106 23"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "sourceChannel"; + className = "CompositeTextureTexSrcChannel"; + }; + }; + }; + new GuiContainer(CompTextureEd_GreenChan) { + position = "129 39"; + extent = "107 174"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + className = "CompositeTextureSlotContainer"; + + new GuiTextCtrl() { + Text = "Green Channel"; + position = "5 -2"; + extent = "100 15"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "1 20"; + extent = "106 23"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "InputMode"; + className = "CompositeTextureChannelMode"; + }; + new GuiContainer() { + position = "0 41"; + extent = "107 125"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueContainer"; + + new GuiTextEditCtrl() { + position = "0 8"; + extent = "28 20"; + profile = "ToolsGuiTextEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueTxtEdit"; + className = "CompositeTextureRawValueEdit"; + }; + new GuiSliderCtrl() { + position = "38 9"; + extent = "68 19"; + profile = "GuiSliderProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueSlider"; + className = "CompositeTextureRawValueSlider"; + Command = "$thisControl.onDragComplete();"; + range = 0 SPC 1; + ticks = 0.01; + }; + }; + new GuiContainer() { + position = "0 41"; + extent = "107 125"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "TextureContainer"; + + new GuiBitmapCtrl() { + BitmapAsset = "ToolsModule:unknownImage_image"; + BitmapFile = "tools/materialEditor/images/unknownImage.png"; + position = "21 9"; + horizSizing = "center"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "Bitmap"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; + position = "21 9"; + extent = "64 64"; + horizSizing = "center"; + profile = "ToolsGuiDefaultProfile"; + command = "$CompTexSourceChannel = 1;AssetBrowser.showDialog(\"ImageAsset\", \"CompositeTextureEditor.setSourceTex\");"; + tooltipProfile = "ToolsGuiDefaultProfile"; + ToolTip = "Set the source of the texture for this channel to sample from when baking a composite."; + }; + new GuiTextCtrl() { + Text = "Source Channel"; + position = "5 85"; + extent = "100 10"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "1 97"; + extent = "106 23"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "sourceChannel"; + className = "CompositeTextureTexSrcChannel"; + }; + }; + }; + new GuiContainer(CompTextureEd_BlueChan) { + position = "247 39"; + extent = "107 174"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + className = "CompositeTextureSlotContainer"; + + new GuiTextCtrl() { + Text = "Blue Channel"; + position = "5 -2"; + extent = "100 15"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "1 20"; + extent = "106 23"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "InputMode"; + className = "CompositeTextureChannelMode"; + }; + new GuiContainer() { + position = "0 41"; + extent = "107 125"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueContainer"; + + new GuiTextEditCtrl() { + position = "0 8"; + extent = "28 20"; + profile = "ToolsGuiTextEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueTxtEdit"; + className = "CompositeTextureRawValueEdit"; + }; + new GuiSliderCtrl() { + position = "38 9"; + extent = "68 19"; + profile = "GuiSliderProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueSlider"; + className = "CompositeTextureRawValueSlider"; + Command = "$thisControl.onDragComplete();"; + range = 0 SPC 1; + ticks = 0.01; + }; + }; + new GuiContainer() { + position = "0 41"; + extent = "107 125"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "TextureContainer"; + + new GuiBitmapCtrl() { + BitmapAsset = "ToolsModule:unknownImage_image"; + BitmapFile = "tools/materialEditor/images/unknownImage.png"; + position = "21 9"; + horizSizing = "center"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "Bitmap"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; + position = "21 9"; + extent = "64 64"; + horizSizing = "center"; + profile = "ToolsGuiDefaultProfile"; + command = "$CompTexSourceChannel = 2;AssetBrowser.showDialog(\"ImageAsset\", \"CompositeTextureEditor.setSourceTex\");"; + tooltipProfile = "ToolsGuiDefaultProfile"; + ToolTip = "Set the source of the texture for this channel to sample from when baking a composite."; + }; + new GuiTextCtrl() { + Text = "Source Channel"; + position = "5 85"; + extent = "100 10"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "1 97"; + extent = "106 23"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "sourceChannel"; + className = "CompositeTextureTexSrcChannel"; + }; + }; + }; + new GuiContainer(CompTextureEd_AlphaChan) { + position = "361 39"; + extent = "107 174"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + className = "CompositeTextureSlotContainer"; + + new GuiTextCtrl() { + Text = "Alpha Channel"; + position = "5 -2"; + extent = "100 15"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "1 20"; + extent = "106 23"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "InputMode"; + className = "CompositeTextureChannelMode"; + }; + new GuiContainer() { + position = "0 41"; + extent = "107 125"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueContainer"; + + new GuiTextEditCtrl() { + position = "0 8"; + extent = "28 20"; + profile = "ToolsGuiTextEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueTxtEdit"; + className = "CompositeTextureRawValueEdit"; + }; + new GuiSliderCtrl() { + position = "38 9"; + extent = "68 19"; + profile = "GuiSliderProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "RawValueSlider"; + className = "CompositeTextureRawValueSlider"; + Command = "$thisControl.onDragComplete();"; + range = 0 SPC 1; + ticks = 0.01; + }; + }; + new GuiContainer() { + position = "0 41"; + extent = "107 125"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "TextureContainer"; + + new GuiBitmapCtrl() { + BitmapAsset = "ToolsModule:unknownImage_image"; + BitmapFile = "tools/materialEditor/images/unknownImage.png"; + position = "21 9"; + horizSizing = "center"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "Bitmap"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; + position = "21 9"; + extent = "64 64"; + horizSizing = "center"; + profile = "ToolsGuiDefaultProfile"; + command = "$CompTexSourceChannel = 3;AssetBrowser.showDialog(\"ImageAsset\", \"CompositeTextureEditor.setSourceTex\");"; + tooltipProfile = "ToolsGuiDefaultProfile"; + ToolTip = "Set the source of the texture for this channel to sample from when baking a composite."; + }; + new GuiTextCtrl() { + Text = "Source Channel"; + position = "5 85"; + extent = "100 10"; + horizSizing = "width"; + profile = "ToolsGuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrl() { + position = "1 97"; + extent = "106 23"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "sourceChannel"; + className = "CompositeTextureTexSrcChannel"; + }; + }; + }; + new GuiButtonCtrl() { + Text = "Save"; + position = "339 216"; + extent = "74 24"; + profile = "ToolsGuiButtonProfile"; + command = "CompositeTextureEditor.saveComposite();"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiButtonCtrl() { + Text = "Cancel"; + position = "417 216"; + extent = "52 24"; + profile = "ToolsGuiButtonProfile"; + command = "Canvas.popDialog(CompositeTextureEditor);"; + tooltipProfile = "GuiToolTipProfile"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/gui/compositeTextureEditor.tscript b/Templates/BaseGame/game/tools/gui/compositeTextureEditor.tscript new file mode 100644 index 000000000..4fd31b5aa --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/compositeTextureEditor.tscript @@ -0,0 +1,192 @@ +function CompositeTextureEditor::buildComposite(%this, %sourceTex0, %sourceTex1, %sourceTex2, %sourceTex3, %sourceChan0, %sourceChan1, %sourceChan2, %sourceChan3, %callback) +{ + Canvas.pushDialog(%this); + + CompTextureEd_RedChan.setChannelData(%sourceTex0, %sourceChan0); + CompTextureEd_GreenChan.setChannelData(%sourceTex1, %sourceChan1); + CompTextureEd_BlueChan.setChannelData(%sourceTex2, %sourceChan2); + CompTextureEd_AlphaChan.setChannelData(%sourceTex3, %sourceChan3); + + %this.callbackFunc = %callback; +} + +function CompositeTextureSlotContainer::onWake(%this) +{ + %this-->InputMode.clear(); + %this-->InputMode.add("Raw Value"); + %this-->InputMode.add("Texture"); + %this-->InputMode.setSelected(1); + %this-->InputMode.active = false; + + %this-->sourceChannel.clear(); + %this-->sourceChannel.add("Red"); + %this-->sourceChannel.add("Green"); + %this-->sourceChannel.add("Blue"); + %this-->sourceChannel.add("Alpha"); +} + +function CompositeTextureSlotContainer::setChannelData(%this, %sourceValue, %sourceChannel) +{ + //for now, hard-force Texture mode + %this-->InputMode.setSelected(1); + + if(AssetDatabase.isDeclaredAsset(%sourceValue)) + { + %this-->InputMode.setSelected(1); + + %this-->bitmap.setBitmap(%sourceValue); + + if(%sourceChannel $= "") + %sourceChannel = "Red"; + + %this-->sourceChannel.setText(%sourceChannel); + } + /*else + { + %this-->InputMode.setSelected(0); + + %value = 0; + if(%sourceValue !$= "" && (isFloat(%sourceValue) || isFloat(%sourceValue))) + { + %value = %sourceValue; + } + + %this-->RawValueTxtEdit.setText(%value); + %this-->RawValueSlider.setValue(%value); + }*/ +} + +function CompositeTextureSlotContainer::getChannelData(%this) +{ + return ""; +} + +function CompositeTextureChannelMode::onSelect(%this, %id, %text) +{ + %isRawValueMode = %text $= "Raw Value"; + %this.getParent()-->RawValueContainer.setVisible(%isRawValueMode); + %this.getParent()-->TextureContainer.setVisible(!%isRawValueMode); +} + +function CompositeTextureEditor::setSourceTex(%this, %assetId) +{ + if($CompTexSourceChannel $= "") + $CompTexSourceChannel = 0; + + %channelContainer = CompositeTextureEditorWindow.getObject($CompTexSourceChannel); + %channelContainer-->bitmap.setBitmap(%assetId); +} + +function CompositeTextureEditor::saveComposite(%this) +{ + %cubemap = CubemapEditor.currentCubemap; + + %aoMap = CompTextureEd_RedChan-->Bitmap.getBitmap(); + %roughMap = CompTextureEd_GreenChan-->Bitmap.getBitmap(); + %metalMap = CompTextureEd_BlueChan-->Bitmap.getBitmap(); + + if(%aoMap $= "ToolsModule:unknownImage_image") + %aoMap = ""; + if(%roughMap $= "ToolsModule:unknownImage_image") + %roughMap = ""; + if(%metalMap $= "ToolsModule:unknownImage_image") + %metalMap = ""; + + if(%aoMap $= "" && %roughMap $= "" && %metalMap $= "") + { + toolsMessageBoxOK("Error", "Saving a composite map requires at least one channel slot to have source data!"); + return; + } + + AssetBrowser.setupCreateNewAsset("ImageAsset", AssetBrowser.selectedModule, "CompositeEditorDoSaveComposite"); +} + +function CompositeEditorDoSaveComposite(%assetId) +{ + %assetDef = AssetDatabase.acquireAsset(%assetId); + if(!isObject(%assetDef)) + { + toolsMessageBoxOK("Error", "We somehow failed to successfully create a new ImageAsset!"); + return; + } + + %targetFilePath = %assetDef.getImagePath(); + + %aoMapAsset = CompTextureEd_RedChan-->Bitmap.getBitmap(); + %roughMapAsset = CompTextureEd_GreenChan-->Bitmap.getBitmap(); + %metalMapAsset = CompTextureEd_BlueChan-->Bitmap.getBitmap(); + + + if(%aoMapAsset $= "ToolsModule:unknownImage_image") + { + %aoMap = ""; + } + else + { + %aoAssetDef = AssetDatabase.acquireAsset(%aoMapAsset); + %aoMap = %aoAssetDef.getImagePath(); + } + if(%roughMapAsset $= "ToolsModule:unknownImage_image") + { + %roughMap = ""; + } + else + { + %roughAssetDef = AssetDatabase.acquireAsset(%roughMapAsset); + %roughMap = %roughAssetDef.getImagePath(); + } + if(%metalMapAsset $= "ToolsModule:unknownImage_image") + { + %metalMap = ""; + } + else + { + %metalAssetDef = AssetDatabase.acquireAsset(%metalMapAsset); + %metalMap = %roughAssetDef.getImagePath(); + } + + if(%aoMap $= "" && %roughMap $= "" && %metalMap $= "") + { + toolsMessageBoxOK("Error", "Attempted to create a composite texture but all three source textures are blank or invalid!"); + return; + } + + %redChanSource = CompTextureEd_RedChan-->sourceChannel; + %greenChanSource = CompTextureEd_GreenChan-->sourceChannel; + %blueChanSource = CompTextureEd_BlueChan-->sourceChannel; + + %aoChan = %redChanSource.findText(%redChanSource.getText()); + %aoChan = %aoChan == -1 ? 0 : %aoChan; + + %roughChan = %greenChanSource.findText(%greenChanSource.getText()); + %roughChan = %roughChan == -1 ? 1 : %roughChan; + + %metalChan = %blueChanSource.findText(%blueChanSource.getText()); + %metalChan = %metalChan == -1 ? 2 : %metalChan; + + %channelKey = %aoChan SPC %roughChan SPC %metalChan SPC 3; + error("Storing: \"" @ %aoMap @"\" \""@ %roughMap @"\" \""@ %metalMap @"\" \""@ %channelKey @"\" \""@ %targetFilePath @"\""); + saveCompositeTexture(%aoMap, %roughMap, %metalMap, "", %channelKey, %targetFilePath); + + %assetDef.refreshAsset(); + + %command = CompositeTextureEditor.callbackFunc @ "(\"" @ %assetId @ "\");"; + if(CompositeTextureEditor.callbackFunc !$= "") + { + eval(%command); + CompositeTextureEditor.callbackFunc = ""; + } + + Canvas.popDialog(CompositeTextureEditor); +} + +function CompositeTextureRawValueEdit::onReturn(%this) +{ + %this.getParent()-->RawValueSlider.setValue(%this.getText()); +} + +function CompositeTextureRawValueSlider::onDragComplete(%this) +{ + %value = %this.getValue(); + %this.getParent()-->RawValueTxtEdit.setText(%value); +} diff --git a/Templates/BaseGame/game/tools/gui/cubemapEditor.gui b/Templates/BaseGame/game/tools/gui/cubemapEditor.gui index d238feae5..b15c3a20b 100644 --- a/Templates/BaseGame/game/tools/gui/cubemapEditor.gui +++ b/Templates/BaseGame/game/tools/gui/cubemapEditor.gui @@ -39,7 +39,7 @@ $guiContent = new GuiControl(CubemapEditor) { canMaximize = "0"; minSize = "50 50"; EdgeSnap = "1"; - closeCommand = "MaterialEditorGui.hideCubemapEditor(true);"; + closeCommand = "CubemapEditor.hideCubemapEditor(true);"; text = "Cubemap Editor"; new GuiTextCtrl(){ @@ -69,23 +69,23 @@ $guiContent = new GuiControl(CubemapEditor) { AnchorRight = "0"; text = "myCubemap 1"; maxLength = "1024"; - AltCommand = "MaterialEditorGui.editCubemapName($ThisControl.getText());"; + AltCommand = "CubemapEditor.editCubemapName($ThisControl.getText());"; }; new GuiButtonCtrl(){ Profile = "ToolsGuiButtonProfile"; position = "339 216"; Extent = "74 24"; text = "Select"; - command = "MaterialEditorGui.selectCubemap();"; // needs hookup use selected cubemap + command = "CubemapEditor.selectCubemap();"; // needs hookup use selected cubemap }; new GuiButtonCtrl(){ Profile = "ToolsGuiButtonProfile"; position = "417 216"; Extent = "52 24"; text = "Cancel"; - command = "MaterialEditorGui.hideCubemapEditor(true);"; // needs hookup Cancel + command = "CubemapEditor.hideCubemapEditor(true);"; // needs hookup Cancel }; - new GuiScrollCtrl(matEd_cubemapEd_availableCubemapScroller) { + new GuiScrollCtrl(cubemapEd_availableCubemapScroller) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "1"; @@ -106,7 +106,7 @@ $guiContent = new GuiControl(CubemapEditor) { constantThumbHeight = "0"; childMargin = "0 0"; - new GuiListBoxCtrl(matEd_cubemapEd_availableCubemapList) { + new GuiListBoxCtrl(cubemapEd_availableCubemapList) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -130,7 +130,7 @@ $guiContent = new GuiControl(CubemapEditor) { text = "Cubemaps"; }; // ------------------------------ Right X Positive ------------------------------------ - new GuiBitmapCtrl(matEd_cubemapEd_XPos) { + new GuiBitmapCtrl(cubemapEd_XPos) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -146,12 +146,12 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; - new GuiTextCtrl(matEd_cubeMapEd_xPosTxt) { + new GuiTextCtrl(cubeMapEd_xPosTxt) { position = "304 110"; Extent = "57 10"; text = "+ X Right"; }; - new GuiBitmapButtonCtrl(matEd_cubeMapEd_updateXPOSImg) { + new GuiBitmapButtonCtrl(cubeMapEd_updateXPOSImg) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -163,7 +163,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.editCubemapImage(\"0\", $ThisControl.bitmap );"; + Command = "CubemapEditor.editCubemapImage(\"0\", $ThisControl.bitmap );"; tooltipprofile = "ToolsGuiDefaultProfile"; ToolTip = "When using Static Cubemaps, select your CubeMap by clicking here."; hovertime = "1000"; @@ -173,7 +173,7 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ X Negitive ------------------------------------ - new GuiBitmapCtrl(matEd_cubemapEd_XNeg) { + new GuiBitmapCtrl(cubemapEd_XNeg) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -189,12 +189,12 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; - new GuiTextCtrl(matEd_cubeMapEd_xNegTxt) { + new GuiTextCtrl(cubeMapEd_xNegTxt) { position = "171 110"; Extent = "57 10"; text = "- X Left"; }; - new GuiBitmapButtonCtrl(matEd_cubeMapEd_updateXNEGImg) { + new GuiBitmapButtonCtrl(cubeMapEd_updateXNEGImg) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -206,7 +206,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.editCubemapImage(\"1\", $ThisControl.bitmap );"; + Command = "CubemapEditor.editCubemapImage(\"1\", $ThisControl.bitmap );"; tooltipprofile = "ToolsGuiDefaultProfile"; ToolTip = "When using Static Cubemaps, select your CubeMap by clicking here."; hovertime = "1000"; @@ -216,7 +216,7 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ Y Positive ------------------------------------ - new GuiBitmapCtrl(matEd_cubemapEd_YPos) { + new GuiBitmapCtrl(cubemapEd_YPos) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -232,12 +232,12 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; - new GuiTextCtrl(matEd_cubeMapEd_yPosTxt) { + new GuiTextCtrl(cubeMapEd_yPosTxt) { position = "237 175"; Extent = "57 10"; text = "+ Y Front"; }; - new GuiBitmapButtonCtrl(matEd_cubeMapEd_updateYPOSImg) { + new GuiBitmapButtonCtrl(cubeMapEd_updateYPOSImg) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -249,7 +249,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.editCubemapImage(\"3\", $ThisControl.bitmap );"; + Command = "CubemapEditor.editCubemapImage(\"3\", $ThisControl.bitmap );"; tooltipprofile = "ToolsGuiDefaultProfile"; ToolTip = "When using Static Cubemaps, select your CubeMap by clicking here."; hovertime = "1000"; @@ -259,7 +259,7 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ Y Negitive ------------------------------------ - new GuiBitmapCtrl(matEd_cubemapEd_YNeG) { + new GuiBitmapCtrl(cubemapEd_YNeG) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -275,12 +275,12 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; - new GuiTextCtrl(matEd_cubeMapEd_yNegTxt) { + new GuiTextCtrl(cubeMapEd_yNegTxt) { position = "237 44"; Extent = "57 10"; text = "- Y Back"; }; - new GuiBitmapButtonCtrl(matEd_cubeMapEd_updateYNegImg) { + new GuiBitmapButtonCtrl(cubeMapEd_updateYNegImg) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -292,7 +292,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.editCubemapImage(\"2\", $ThisControl.bitmap );"; + Command = "CubemapEditor.editCubemapImage(\"2\", $ThisControl.bitmap );"; tooltipprofile = "ToolsGuiDefaultProfile"; ToolTip = "When using Static Cubemaps, select your CubeMap by clicking here."; hovertime = "1000"; @@ -302,7 +302,7 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ Z Positive ------------------------------------ - new GuiBitmapCtrl(matEd_cubemapEd_ZPos) { + new GuiBitmapCtrl(cubemapEd_ZPos) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -318,12 +318,12 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; - new GuiTextCtrl(matEd_cubeMapEd_zPosTxt) { + new GuiTextCtrl(cubeMapEd_zPosTxt) { position = "237 110"; Extent = "57 10"; text = "+ Z Top"; }; - new GuiBitmapButtonCtrl(matEd_cubeMapEd_updateZPosImg) { + new GuiBitmapButtonCtrl(cubeMapEd_updateZPosImg) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -335,7 +335,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.editCubemapImage(\"4\", $ThisControl.bitmap );"; + Command = "CubemapEditor.editCubemapImage(\"4\", $ThisControl.bitmap );"; tooltipprofile = "ToolsGuiDefaultProfile"; ToolTip = "When using Static Cubemaps, select your CubeMap by clicking here."; hovertime = "1000"; @@ -345,7 +345,7 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ Z Negitive ------------------------------------ - new GuiBitmapCtrl(matEd_cubemapEd_ZNeg) { + new GuiBitmapCtrl(cubemapEd_ZNeg) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -361,12 +361,12 @@ $guiContent = new GuiControl(CubemapEditor) { bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; - new GuiTextCtrl(matEd_cubeMapEd_zNegTxt) { + new GuiTextCtrl(cubeMapEd_zNegTxt) { position = "369 110"; Extent = "57 10"; text = "- Z Bottom"; }; - new GuiBitmapButtonCtrl(matEd_cubeMapEd_updateZNegImg) { + new GuiBitmapButtonCtrl(cubeMapEd_updateZNegImg) { canSaveDynamicFields = "0"; Enabled = "1"; isContainer = "0"; @@ -378,7 +378,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.editCubemapImage(\"5\", $ThisControl.bitmap );"; + Command = "CubemapEditor.editCubemapImage(\"5\", $ThisControl.bitmap );"; tooltipprofile = "ToolsGuiDefaultProfile"; ToolTip = "When using Static Cubemaps, select your CubeMap by clicking here."; hovertime = "1000"; @@ -401,7 +401,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "matEd_addCubemapWindow.setVisible(1);"; // -------------- Needs Hookup Create New Cubemap + Command = "addCubemapWindow.setVisible(1);"; // -------------- Needs Hookup Create New Cubemap hovertime = "1000"; tooltip = "Create New Cubemap"; bitmapAsset = "ToolsModule:new_n_image"; @@ -421,7 +421,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.showDeleteCubemapDialog();"; // -------------- Needs Hookup Delete Cubemap + Command = "CubemapEditor.showDeleteCubemapDialog();"; // -------------- Needs Hookup Delete Cubemap hovertime = "1000"; tooltip = "Delete Cubemap"; bitmapAsset = "ToolsModule:delete_n_image"; @@ -442,7 +442,7 @@ $guiContent = new GuiControl(CubemapEditor) { MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.showSaveCubemapDialog();"; // -------------- Needs Hookup Save Cubemap + Command = "CubemapEditor.showSaveCubemapDialog();"; // -------------- Needs Hookup Save Cubemap hovertime = "1000"; tooltip = "Save Cubemap"; bitmapAsset = "ToolsModule:save_icon_n_image"; @@ -451,4 +451,123 @@ $guiContent = new GuiControl(CubemapEditor) { useMouseEvents = "0"; }; }; + + new GuiWindowCtrl(addCubemapWindow) { + canSaveDynamicFields = "0"; + isContainer = "1"; + Profile = "ToolsGuiWindowProfile"; + HorizSizing = "center"; + VertSizing = "center"; + position = "362 333"; + Extent = "300 99"; + MinExtent = "48 92"; + canSave = "1"; + Visible = "0"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + resizeWidth = "1"; + resizeHeight = "1"; + canMove = "1"; + canClose = "0"; + canMinimize = "0"; + canMaximize = "0"; + minSize = "50 50"; + EdgeSnap = "1"; + text = "Create Cubemap"; + + new GuiTextEditCtrl() { + canSaveDynamicFields = "0"; + internalName = "cubemapName"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "96 35"; + Extent = "196 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + maxLength = "1024"; + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + AltCommand = ""; + passwordMask = "*"; + }; + new GuiTextCtrl() { + canSaveDynamicFields = "0"; + isContainer = "0"; + Profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "12 36"; + Extent = "77 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + maxLength = "1024"; + text = "Cubemap Name"; + }; + new GuiButtonCtrl() { + canSaveDynamicFields = "0"; + isContainer = "0"; + Profile = "ToolsGuiButtonProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "96 68"; + Extent = "126 22"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + text = "Create"; + Command = "CubemapEditor.addCubemap( addCubemapWindow-->cubemapName.getText() );addCubemapWindow.setVisible(0);"; + }; + new GuiButtonCtrl() { + canSaveDynamicFields = "0"; + isContainer = "0"; + Profile = "ToolsGuiButtonProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "228 68"; + Extent = "64 22"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + text = "Cancel"; + Command = "addCubemapWindow.setVisible(0);"; + }; + }; }; diff --git a/Templates/BaseGame/game/tools/gui/cubemapEditor.tscript b/Templates/BaseGame/game/tools/gui/cubemapEditor.tscript new file mode 100644 index 000000000..c4e12efc5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/cubemapEditor.tscript @@ -0,0 +1,367 @@ +function CubemapEditor::onWake(%this) +{ + cubemapEd_availableCubemapList.clear(); +} + +function CubemapEditor::cancelCubemap(%this) +{ + %cubemap = CubemapEditor.currentCubemap; + + %idx = cubemapEd_availableCubemapList.findItemText( %cubemap.getName() ); + cubemapEd_availableCubemapList.setItemText( %idx, notDirtyCubemap.originalName ); + %cubemap.setName( notDirtyCubemap.originalName ); + + CubemapEditor.copyCubemaps( notDirtyCubemap, %cubemap ); + CubemapEditor.copyCubemaps( notDirtyCubemap, matEdCubeMapPreviewMat); + + %cubemap.updateFaces(); + matEdCubeMapPreviewMat.updateFaces(); +} + +function CubemapEditor::showCubemapEditor(%this) +{ + if (cubemapEditor.isVisible()) + return; + + CubemapEditor.currentCubemap = ""; + + cubemapEditor.setVisible(1); + new PersistenceManager(cubemapEdPerMan); + CubemapEditor.setCubemapNotDirty(); + + for( %i = 0; %i < RootGroup.getCount(); %i++ ) + { + if( RootGroup.getObject(%i).getClassName()!$= "CubemapData" ) + continue; + + for( %k = 0; %k < UnlistedCubemaps.count(); %k++ ) + { + %unlistedFound = 0; + if( UnlistedCubemaps.getValue(%k) $= RootGroup.getObject(%i).name ) + { + %unlistedFound = 1; + break; + } + } + + if( %unlistedFound ) + continue; + + cubemapEd_availableCubemapList.addItem( RootGroup.getObject(%i).name ); + } + + singleton CubemapData(notDirtyCubemap); + + // if there was no cubemap, pick the first, select, and bail, these are going to take + // care of themselves in the selected function + if( !isObject( CubemapEditor.currentMaterial.cubemap ) ) + { + if( cubemapEd_availableCubemapList.getItemCount() > 0 ) + { + cubemapEd_availableCubemapList.setSelected(0, true); + return; + } + else + { + // if there are no cubemaps, then create one, select, and bail + %cubemap = CubemapEditor.createNewCubemap(); + cubemapEd_availableCubemapList.addItem( %cubemap.name ); + cubemapEd_availableCubemapList.setSelected(0, true); + return; + } + } + + // do not directly change activeMat! + CubemapEditor.currentCubemap = CubemapEditor.currentMaterial.cubemap.getId(); + %cubemap = CubemapEditor.currentCubemap; + + notDirtyCubemap.originalName = %cubemap.getName(); + CubemapEditor.copyCubemaps( %cubemap, notDirtyCubemap); + CubemapEditor.copyCubemaps( %cubemap, matEdCubeMapPreviewMat); + CubemapEditor.syncCubemap( %cubemap ); +} + +function CubemapEditor::hideCubemapEditor(%this,%cancel) +{ + if(%cancel) + CubemapEditor.cancelCubemap(); + + cubemapEd_availableCubemapList.clearItems(); + cubemapEdPerMan.delete(); + cubemapEditor.setVisible(0); +} + +// create category and update current material if there is one +function CubemapEditor::addCubemap( %this,%cubemapName ) +{ + if( %cubemapName $= "" ) + { + toolsMessageBoxOK( "Error", "Can not create a cubemap without a valid name."); + return; + } + + for(%i = 0; %i < RootGroup.getCount(); %i++) + { + if( %cubemapName $= RootGroup.getObject(%i).getName() ) + { + toolsMessageBoxOK( "Error", "There is already an object with the same name."); + return; + } + } + + // Create and select a new cubemap + %cubemap = CubemapEditor.createNewCubemap( %cubemapName ); + %idx = cubemapEd_availableCubemapList.addItem( %cubemap.name ); + cubemapEd_availableCubemapList.setSelected( %idx, true ); + + // material category text field to blank + addCubemapWindow-->cubemapName.setText(""); +} + +function CubemapEditor::createNewCubemap( %this, %cubemap ) +{ + if( %cubemap $= "" ) + { + for(%i = 0; ; %i++) + { + %cubemap = "newCubemap_" @ %i; + if( !isObject(%cubemap) ) + break; + } + } + + new CubemapData(%cubemap) + { + cubeMapFaceAsset[0] = "ToolsModule:cube_xNeg_image"; + cubeMapFaceAsset[1] = "ToolsModule:cube_xPos_image"; + cubeMapFaceAsset[2] = "ToolsModule:cube_zNeg_image"; + cubeMapFaceAsset[3] = "ToolsModule:cube_zPos_image"; + cubeMapFaceAsset[4] = "ToolsModule:cube_yNeg_image"; + cubeMapFaceAsset[5] = "ToolsModule:cube_yPos_image"; + + parentGroup = RootGroup; + }; + + cubemapEdPerMan.setDirty( %cubemap, "art/materials." @ $TorqueScriptFileExtension ); + cubemapEdPerMan.saveDirty(); + + return %cubemap; +} + +function CubemapEditor::setCubemapDirty(%this) +{ + %propertyText = "Create Cubemap *"; + cubemapEditor.text = %propertyText; + cubemapEditor.dirty = true; + cubemapEditor-->saveCubemap.setActive(true); + + %cubemap = CubemapEditor.currentCubemap; + + // materials created in the materail selector are given that as its filename, so we run another check + if( CubemapEditor.isMatEditorMaterial( %cubemap ) ) + cubemapEdPerMan.setDirty(%cubemap, "art/materials." @ $TorqueScriptFileExtension); + else + cubemapEdPerMan.setDirty(%cubemap); +} + +function CubemapEditor::setCubemapNotDirty(%this) +{ + %propertyText= strreplace("Create Cubemap" , "*" , ""); + cubemapEditor.text = %propertyText; + cubemapEditor.dirty = false; + cubemapEditor-->saveCubemap.setActive(false); + + %cubemap = CubemapEditor.currentCubemap; + cubemapEdPerMan.removeDirty(%cubemap); +} + +function CubemapEditor::showDeleteCubemapDialog(%this) +{ + %idx = cubemapEd_availableCubemapList.getSelectedItem(); + %cubemap = cubemapEd_availableCubemapList.getItemText( %idx ); + %cubemap = %cubemap.getId(); + + if( %cubemap == -1 || !isObject(%cubemap) ) + return; + + if( isObject( %cubemap ) ) + { + toolsMessageBoxYesNoCancel("Delete Cubemap?", + "Are you sure you want to delete

" @ %cubemap.getName() @ "

Cubemap deletion won't take affect until the engine is quit.", + "CubemapEditor.deleteCubemap( " @ %cubemap @ ", " @ %idx @ " );", + "", + "" ); + } +} + +function CubemapEditor::deleteCubemap( %this, %cubemap, %idx ) +{ + cubemapEd_availableCubemapList.deleteItem( %idx ); + + UnlistedCubemaps.add( "unlistedCubemaps", %cubemap.getName() ); + + if( !CubemapEditor.isMatEditorMaterial( %cubemap ) ) + { + cubemapEdPerMan.removeDirty( %cubemap ); + cubemapEdPerMan.removeObjectFromFile( %cubemap ); + } + + if( cubemapEd_availableCubemapList.getItemCount() > 0 ) + { + cubemapEd_availableCubemapList.setSelected(0, true); + } + else + { + // if there are no cubemaps, then create one, select, and bail + %cubemap = CubemapEditor.createNewCubemap(); + cubemapEd_availableCubemapList.addItem( %cubemap.getName() ); + cubemapEd_availableCubemapList.setSelected(0, true); + } +} + +function cubemapEd_availableCubemapList::onSelect( %this, %id, %cubemap ) +{ + %cubemap = %cubemap.getId(); + if( CubemapEditor.currentCubemap $= %cubemap ) + return; + + if( cubemapEditor.dirty ) + { + %savedCubemap = CubemapEditor.currentCubemap; + toolsMessageBoxYesNoCancel("Save Existing Cubemap?", + "Do you want to save changes to

" @ %savedCubemap.getName(), + "CubemapEditor.saveCubemap(" @ true @ ");", + "CubemapEditor.saveCubemapDialogDontSave(" @ %cubemap @ ");", + "CubemapEditor.saveCubemapDialogCancel();" ); + } + else + CubemapEditor.changeCubemap( %cubemap ); +} + +function CubemapEditor::showSaveCubemapDialog( %this ) +{ + %cubemap = CubemapEditor.currentCubemap; + if( !isObject(%cubemap) ) + return; + + toolsMessageBoxYesNoCancel("Save Cubemap?", + "Do you want to save changes to

" @ %cubemap.getName(), + "CubemapEditor.saveCubemap( " @ %cubemap @ " );", + "", + "" ); +} + +function CubemapEditor::saveCubemap( %this, %cubemap ) +{ + notDirtyCubemap.originalName = %cubemap.getName(); + CubemapEditor.copyCubemaps( %cubemap, notDirtyCubemap ); + CubemapEditor.copyCubemaps( %cubemap, matEdCubeMapPreviewMat); + + cubemapEdPerMan.saveDirty(); + + CubemapEditor.setCubemapNotDirty(); +} + +function CubemapEditor::saveCubemapDialogDontSave( %this, %newCubemap) +{ + //deal with old cubemap first + %oldCubemap = CubemapEditor.currentCubemap; + + %idx = cubemapEd_availableCubemapList.findItemText( %oldCubemap.getName() ); + cubemapEd_availableCubemapList.setItemText( %idx, notDirtyCubemap.originalName ); + %oldCubemap.setName( notDirtyCubemap.originalName ); + + CubemapEditor.copyCubemaps( notDirtyCubemap, %oldCubemap); + CubemapEditor.copyCubemaps( notDirtyCubemap, matEdCubeMapPreviewMat); + CubemapEditor.syncCubemap( %oldCubemap ); + + CubemapEditor.changeCubemap( %newCubemap ); +} + +function CubemapEditor::saveCubemapDialogCancel( %this ) +{ + %cubemap = CubemapEditor.currentCubemap; + %idx = cubemapEd_availableCubemapList.findItemText( %cubemap.getName() ); + cubemapEd_availableCubemapList.clearSelection(); + cubemapEd_availableCubemapList.setSelected( %idx, true ); +} + +function CubemapEditor::changeCubemap( %this, %cubemap ) +{ + CubemapEditor.setCubemapNotDirty(); + CubemapEditor.currentCubemap = %cubemap; + + notDirtyCubemap.originalName = %cubemap.getName(); + CubemapEditor.copyCubemaps( %cubemap, notDirtyCubemap); + CubemapEditor.copyCubemaps( %cubemap, matEdCubeMapPreviewMat); + CubemapEditor.syncCubemap( %cubemap ); +} + +function CubemapEditor::editCubemapImage( %this, %face ) +{ + CubemapEditor.setCubemapDirty(); + + %cubemap = CubemapEditor.currentCubemap; + %bitmap = CubemapEditor.openFile("texture"); + if( %bitmap !$= "" && %bitmap !$= "tools/materialEditor/gui/cubemapBtnBorder" ) + { + %cubemap.cubeFace[%face] = %bitmap; + CubemapEditor.copyCubemaps( %cubemap, matEdCubeMapPreviewMat); + CubemapEditor.syncCubemap( %cubemap ); + } +} + +function CubemapEditor::editCubemapName( %this, %newName ) +{ + CubemapEditor.setCubemapDirty(); + + %cubemap = CubemapEditor.currentCubemap; + + %idx = cubemapEd_availableCubemapList.findItemText( %cubemap.getName() ); + cubemapEd_availableCubemapList.setItemText( %idx, %newName ); + %cubemap.setName(%newName); + + CubemapEditor.syncCubemap( %cubemap ); +} + +function CubemapEditor::syncCubemap( %this, %cubemap ) +{ + %xpos = CubemapEditor.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[0]); + if( %xpos !$= "" ) + cubemapEd_XPos.setBitmap( %xpos ); + + %xneg = CubemapEditor.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[1]); + if( %xneg !$= "" ) + cubemapEd_XNeg.setBitmap( %xneg ); + + %yneg = CubemapEditor.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[2]); + if( %yneg !$= "" ) + cubemapEd_YNeG.setBitmap( %yneg ); + + %ypos = CubemapEditor.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[3]); + if( %ypos !$= "" ) + cubemapEd_YPos.setBitmap( %ypos ); + + %zpos = CubemapEditor.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[4]); + if( %zpos !$= "" ) + cubemapEd_ZPos.setBitmap( %zpos ); + + %zneg = CubemapEditor.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[5]); + if( %zneg !$= "" ) + cubemapEd_ZNeg.setBitmap( %zneg ); + + cubemapEd_activeCubemapNameTxt.setText(%cubemap.getName()); + + %cubemap.updateFaces(); + matEdCubeMapPreviewMat.updateFaces(); +} + +function CubemapEditor::copyCubemaps( %this, %copyFrom, %copyTo) +{ + %copyTo.cubeFace[0] = %copyFrom.cubeFace[0]; + %copyTo.cubeFace[1] = %copyFrom.cubeFace[1]; + %copyTo.cubeFace[2] = %copyFrom.cubeFace[2]; + %copyTo.cubeFace[3] = %copyFrom.cubeFace[3]; + %copyTo.cubeFace[4] = %copyFrom.cubeFace[4]; + %copyTo.cubeFace[5] = %copyFrom.cubeFace[5]; +} diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui,EditorGuiGroup.asset.taml deleted file mode 100644 index bb5d886b7..000000000 --- a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui,EditorGuiGroup.asset.taml +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui.asset.taml new file mode 100644 index 000000000..9689f07ea --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui.asset.taml @@ -0,0 +1,5 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui.gui b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui.gui new file mode 100644 index 000000000..d6dc29812 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui.gui @@ -0,0 +1,490 @@ +//--- OBJECT WRITE BEGIN --- +$guiContent = new GuiControl(MaterialEditorGui) { + extent = "2560 1440"; + profile = "GuiNonModalDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + isContainer = "1"; + canSaveDynamicFields = "1"; + currentLayer = "0"; + currentMaterialAsset = "Prototyping:FloorGray"; + currentMeshMode = "EditorShape"; + currentMode = "Material"; + docked = "1"; + fileSpec = "Torque Material Files (materials.tscript)|materials.tscript|All Files (*.*)|*.*|"; + livePreview = "1"; + materialDirty = "0"; + modelFormats = "DTS Files (*.dts)|*.dts"; + originalAssetName = "MaterialEditorGui"; + originalName = "FloorGray"; + panelHidden = "0"; + preventUndo = "1"; + resizing = "0"; + textureFormats = "Image Files (*.png, *.jpg, *.dds, *.bmp, *.gif, *.jng. *.tga)|*.png;*.jpg;*.dds;*.bmp;*.gif;*.jng;*.tga|All Files (*.*)|*.*|"; + + new GuiWindowCollapseCtrl(MaterialEditorGuiWindow) { + Text = " :: Material Editor"; + canMove = "0"; + canClose = "0"; + canMinimize = "0"; + canMaximize = "0"; + canCollapse = "0"; + margin = "5 5 5 5"; + position = "2168 39"; + extent = "392 1303"; + minExtent = "300 150"; + horizSizing = "windowRelative"; + vertSizing = "windowRelative"; + profile = "ToolsGuiWindowProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "InspectorWindow"; + + new GuiBitmapButtonCtrl(MaterialEditorGui_showBtn) { + BitmapAsset = "ToolsModule:panel_show_n_image"; + position = "4 1"; + extent = "18 18"; + minExtent = "8 8"; + profile = "ToolsGuiButtonProfile"; + visible = "0"; + command = "MaterialEditorGui.showSidePanel();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Show Sidepanel"; + hidden = "1"; + }; + new GuiBitmapButtonCtrl(MaterialEditorGui_UnDockBtn) { + BitmapAsset = "ToolsModule:panel_undock_n_image"; + position = "369 0"; + extent = "18 18"; + minExtent = "8 8"; + horizSizing = "left"; + profile = "ToolsGuiButtonProfile"; + command = "MaterialEditorGui.releaseSidePanel();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Detach Sidepanel"; + }; + new GuiBitmapButtonCtrl(MaterialEditorGui_hideBtn) { + BitmapAsset = "ToolsModule:panel_hide_n_image"; + position = "351 0"; + extent = "18 18"; + minExtent = "8 8"; + horizSizing = "left"; + profile = "ToolsGuiButtonProfile"; + command = "MaterialEditorGui.hideSidePanel();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Hide Sidepanel"; + }; + new GuiBitmapButtonCtrl(MaterialEditorGui_DockBtn) { + BitmapAsset = "ToolsModule:panel_dock_n_image"; + position = "369 0"; + extent = "18 18"; + minExtent = "8 8"; + horizSizing = "left"; + profile = "ToolsGuiButtonProfile"; + visible = "0"; + command = "MaterialEditorGui.dockSidePanel();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Dock Sidepanel"; + hidden = "1"; + }; + new GuiSplitContainer() { + orientation = "Horizontal"; + splitPoint = "182 354"; + fixedSize = "692"; + position = "3 24"; + extent = "387 1269"; + horizSizing = "width"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiPanel() { + docking = "Client"; + extent = "387 352"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "Panel1"; + + new GuiContainer(matEd_previewPanel) { + docking = "Client"; + margin = "24 1 3 3"; + position = "3 24"; + extent = "381 327"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiSwatchButtonCtrl(matEd_previewBackground) { + color = "0 0 0 0.2"; + position = "-1 -1"; + extent = "383 329"; + horizSizing = "width"; + vertSizing = "height"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiContainer() { + position = "-1 -1"; + extent = "383 329"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiMaterialPreview(matEd_previewObjectView) { + position = "1 1"; + extent = "380 326"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + isContainer = "0"; + }; + }; + new GuiPopUpMenuCtrl(matEd_quickPreview_Popup) { + Text = "Cube"; + position = "4 0"; + extent = "67 18"; + profile = "ToolsGuiPopUpMenuProfile"; + command = "MaterialEditorGui.updatePreviewObject();"; + tooltipProfile = "GuiToolTipProfile"; + ToolTip = "Changes the Preview Mesh"; + isContainer = "0"; + }; + new GuiSwatchButtonCtrl(matEd_lightColorPicker) { + position = "79 4"; + extent = "14 14"; + command = "getColorF($ThisControl.color, \"MaterialEditorGui.updateLightColor\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Change Normal Light Color"; + }; + new GuiSwatchButtonCtrl(matEd_ambientLightColorPicker) { + position = "97 4"; + extent = "14 14"; + command = "getColorF($ThisControl.color, \"MaterialEditorGui.updateAmbientColor\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Change Ambient Light Color"; + }; + new GuiSwatchButtonCtrl(MaterialPreviewBackgroundPicker) { + color = "0 0 0 0.2"; + position = "113 0"; + extent = "20 20"; + command = "getColorF($thisControl.color, \"MaterialEditorGui.updatePreviewBackground\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Change Background Color (preview)"; + }; + new GuiCheckBoxCtrl() { + Text = "Preview in World"; + position = "266 1"; + extent = "114 18"; + horizSizing = "left"; + profile = "ToolsGuiCheckBoxProfile"; + variable = "MaterialEditorGui.livePreview"; + command = "MaterialEditorGui.updateLivePreview($ThisControl.getValue());"; + tooltipProfile = "GuiToolTipProfile"; + }; + }; + new GuiPanel() { + docking = "Client"; + position = "0 356"; + extent = "387 913"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "panel2"; + + new GuiContainer() { + extent = "388 22"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiBitmapButtonCtrl(MatEd_phoBreadcrumb) { + BitmapAsset = "ToolsModule:folderUp_image"; + position = "-1 0"; + extent = "20 19"; + profile = "GuiDefaultProfile"; + visible = "0"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Go back to previous editor"; + hidden = "1"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:delete_n_image"; + position = "368 1"; + extent = "17 17"; + horizSizing = "left"; + profile = "ToolsGuiButtonProfile"; + command = "MaterialEditorGui.deleteMaterial();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Delete Material from File"; + }; + new GuiBitmapButtonCtrl(MatEd_editMaterial) { + BitmapAsset = "ToolsModule:open_file_n_image"; + position = "249 1"; + extent = "16 16"; + horizSizing = "left"; + profile = "GuiDefaultProfile"; + command = "AssetBrowser.showDialog(\"MaterialAsset\", \"MaterialEditorGui.selectMaterialAsset\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Open Existing Material"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:new_n_image"; + position = "269 1"; + extent = "16 16"; + horizSizing = "left"; + profile = "ToolsGuiDefaultProfile"; + command = "MaterialEditorGui.createNewMaterial();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Create New Material"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:save_icon_n_image"; + position = "289 1"; + extent = "16 16"; + horizSizing = "left"; + profile = "ToolsGuiDefaultProfile"; + command = "MaterialEditorGui.save();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Save Material (ALT S)"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:visible_n_image"; + position = "309 1"; + extent = "16 16"; + horizSizing = "left"; + profile = "ToolsGuiDefaultProfile"; + command = "MaterialEditorGui.lookupMaterialInstances();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Lookup Material Instances"; + }; + new GuiBitmapCtrl() { + BitmapAsset = "ToolsModule:separator_h_image"; + BitmapFile = "tools/gui/images/separator-h.png"; + position = "330 1"; + extent = "2 16"; + minExtent = "2 16"; + horizSizing = "left"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:reset_icon_n_image"; + position = "334 1"; + extent = "17 17"; + horizSizing = "left"; + profile = "ToolsGuiButtonProfile"; + command = "MaterialEditorGui.refreshMaterial();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Revert Material to Saved"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:clear_icon_n_image"; + position = "351 1"; + extent = "17 17"; + horizSizing = "left"; + profile = "ToolsGuiButtonProfile"; + command = "MaterialEditorGui.clearMaterial();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Clear All Material Properties"; + }; + }; + new GuiContainer() { + position = "0 27"; + extent = "388 88"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiContainer(MatEdMaterialMode) { + extent = "392 39"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiTextCtrl() { + Text = "Material"; + position = "10 1"; + extent = "50 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiTextEditCtrl() { + position = "80 0"; + extent = "305 20"; + horizSizing = "width"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "MaterialEditorGui.setMaterialDirty();MaterialEditorGui.updateActiveMaterialName($ThisControl.getText());"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "selMaterialName"; + }; + new GuiTextCtrl() { + position = "70 20"; + extent = "317 16"; + horizSizing = "width"; + profile = "GuiTextProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + }; + new GuiContainer(MatEdTargetMode) { + extent = "394 20"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + visible = "0"; + tooltipProfile = "GuiToolTipProfile"; + hidden = "1"; + + new GuiTextCtrl() { + Text = "Material Slot"; + position = "4 1"; + extent = "74 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; + ToolTip = "List of Material Slots available for selected object (If applicable)"; + }; + new GuiPopUpMenuCtrlEx(SubMaterialSelector) { + Text = "MaterialAsset"; + position = "96 0"; + extent = "292 17"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuProfile"; + active = "0"; + command = "SubMaterialSelector.onSelect();"; + tooltipProfile = "GuiToolTipProfile"; + ToolTip = "Target Material Slot"; + }; + }; + new GuiContainer() { + position = "0 24"; + extent = "394 62"; + horizSizing = "width"; + profile = "GuiDefaultProfile"; + tooltipProfile = "GuiToolTipProfile"; + + new GuiTextCtrl() { + Text = "MapTo"; + position = "6 2"; + extent = "58 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Name of material slot lookup to associate this material to for shapes."; + }; + new GuiTextEditCtrl() { + position = "80 -2"; + extent = "307 20"; + horizSizing = "width"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "MaterialEditorGui.setMaterialDirty();MaterialEditorGui.updateActiveMaterialMapTo($ThisControl.getText());"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Name of material slot lookup to associate this material to for shapes."; + internalName = "selMaterialMapTo"; + }; + new GuiTextCtrl() { + Text = "Inherit From"; + position = "6 25"; + extent = "69 16"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Other material that this one should inherit fields from as its parent."; + profile = "ToolsGuiTextRightProfile"; + }; + new GuiTextEditCtrl() { + position = "80 21"; + extent = "285 20"; + horizSizing = "width"; + profile = "ToolsGuiTextEditProfile"; + altCommand = "MaterialEditorGui.setMaterialDirty();MaterialEditorGui.updateActiveMaterialInheritFrom($ThisControl.getText());"; + tooltipProfile = "GuiToolTipProfile"; + internalName = "selMaterialInheritFrom"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Other material that this one should inherit fields from as its parent."; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:material_image"; + position = "368 24"; + extent = "16 16"; + horizSizing = "left"; + profile = "GuiDefaultProfile"; + command = "AssetBrowser.showDialog(\"MaterialAsset\", \"MaterialEditorGui.updateActiveMaterialInheritFrom\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + ToolTip = "Select Material to set as this material to inherit from."; + }; + new GuiTextCtrl() { + Text = "Layer"; + position = "4 46"; + extent = "56 16"; + profile = "ToolsGuiTextRightProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiPopUpMenuCtrlEx(MaterialEditorLayerSelector) { + Text = "Layer 0"; + position = "80 45"; + extent = "305 17"; + horizSizing = "width"; + profile = "ToolsGuiPopUpMenuProfile"; + command = "MaterialEditorGui.changeLayer( $ThisControl.getText() );"; + tooltipProfile = "GuiToolTipProfile"; + ToolTip = "Material Layer"; + }; + }; + }; + new GuiContainer() { + docking = "None"; + margin = "0 43 0 5"; + anchorTop = "0"; + anchorLeft = "0"; + position = "0 120"; + extent = "382 793"; + minExtent = "64 64"; + horizSizing = "width"; + profile = "ToolsGuiDefaultProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + isContainer = "0"; + + new GuiTextEditCtrl(MaterialEditorGuiFilter) { + placeholderText = "Filter..."; + validate = "MaterialEditorPropInspector.setSearchText($ThisControl.getText());"; + position = "5 0"; + extent = "383 20"; + horizSizing = "width"; + profile = "ToolsGuiTextEditProfile"; + tooltipProfile = "GuiToolTipProfile"; + }; + new GuiBitmapButtonCtrl() { + BitmapAsset = "ToolsModule:clear_icon_n_image"; + position = "371 1"; + extent = "17 17"; + horizSizing = "left"; + profile = "ToolsGuiDefaultProfile"; + command = "MaterialEditorGuiFilter.setText(\"\");MaterialEditorPropInspector.setSearchText(\"\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + }; + new GuiScrollCtrl() { + hScrollBar = "alwaysOff"; + lockHorizScroll = "1"; + docking = "None"; + anchorTop = "0"; + anchorLeft = "0"; + position = "5 22"; + extent = "382 766"; + minExtent = "8 8"; + horizSizing = "width"; + vertSizing = "height"; + profile = "GuiEditorScrollProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + + new GuiInspector(MaterialEditorPropInspector) { + groupFilters = "-Internal -Ungrouped -Editing -Object -Persistence -Dynamic Fields"; + forcedArrayIndex = "0"; + position = "1 1"; + extent = "367 48"; + minExtent = "8 8"; + horizSizing = "width"; + profile = "GuiInspectorProfile"; + tooltipProfile = "ToolsGuiToolTipProfile"; + superClass = "EditorInspectorBase"; + collapseState = "1 1 0 0 0 0 0 0"; + }; + }; + }; + }; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_cubePreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_cubePreview.max deleted file mode 100644 index fa6249ee9..000000000 Binary files a/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_cubePreview.max and /dev/null differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapEd_spherePreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapEd_spherePreview.max deleted file mode 100644 index 9425d3b4f..000000000 Binary files a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapEd_spherePreview.max and /dev/null differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubematEd_cylinderPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/cubematEd_cylinderPreview.max deleted file mode 100644 index 2926befd6..000000000 Binary files a/Templates/BaseGame/game/tools/materialEditor/gui/cubematEd_cylinderPreview.max and /dev/null differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPreviewWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPreviewWindow.ed.gui deleted file mode 100644 index 2442a6aa7..000000000 --- a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPreviewWindow.ed.gui +++ /dev/null @@ -1,456 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -$guiContent = new GuiControl() { - canSaveDynamicFields = "0"; - internalName = "MatEdPreviewWindowContainer"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "height"; - Position = "0 0"; - Extent = "800 600"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - - new GuiWindowCollapseCtrl(MaterialEditorPreviewWindow) { - canSaveDynamicFields = "0"; - internalName = "MatEdPreviewWindow"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiWindowProfile"; - HorizSizing = "windowRelative"; - VertSizing = "windowRelative"; - Position = getWord($pref::Video::mode, 0) - 360 - SPC getWord(EditorGuiToolbar.extent, 1) + 6; - Extent = "360 300"; - MinExtent = "300 150"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "4 4 4 4"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - resizeWidth = "1"; - resizeHeight = "1"; - canMove = "1"; - canClose = "0"; - canMinimize = "0"; - canMaximize = "0"; - closeCommand = "MaterialEditorPreviewWindow.setVisible(false);"; - minSize = "50 50"; - EdgeSnap = "1"; - text = ":: Material Editor - Preview"; - - /*new GuiContainer(MaterialEditorPreviewPane) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; //1 - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - Position = "4 23"; - Extent = "200 221"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - Docking = "Client"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0";*/ - - new GuiContainer(matEd_previewPanel) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "height"; - position = "4 45"; - Extent = "300 300"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Docking = "Client"; - Margin = "24 1 3 3 "; - - - new GuiSwatchButtonCtrl(matEd_previewBackground) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiInspectorSwatchButtonProfile"; - HorizSizing = "width"; - VertSizing = "height"; - position = "-1 -1"; - Extent = "302 302"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - color = "0 0 0 .8"; - //bitmap = "tools/materialEditor/gui/gridTiny2.PNG"; - //wrap = "1"; - }; - new GuiContainer(){ // this is blocking the mouse imput to the swatch imput behind it - HorizSizing = "width"; - VertSizing = "height"; - Position = "-1 -1"; - Extent = "302 302"; - }; - new GuiMaterialPreview(matEd_previewObjectView) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "height"; - position = "1 1"; - Extent = "299 299"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - cameraZRot = "0"; - forceFOV = "0"; - }; - //}; - }; - - new GuiPopUpMenuCtrl(matEd_quickPreview_Popup) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "4 24"; - Extent = "67 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updatePreviewObject();"; - ToolTip = "Changes the Preview Mesh"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Sphere"; - maxLength = "1024"; - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - }; - new GuiSwatchButtonCtrl(MaterialPreviewBackgroundPicker) { // Background Color - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiInspectorSwatchButtonProfile"; - HorizSizing = "left"; - VertSizing = "top"; - position = "330 270"; - Extent = "20 20"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "getColorF($thisControl.color, \"MaterialEditorGui.updatePreviewBackground\");"; - color = "0 0 0 .7"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - ToolTip ="Change Background Color (preview)"; - tooltipprofile = "ToolsGuiToolTipProfile"; - }; - - // Ambient light color picker - new GuiSwatchButtonCtrl(matEd_ambientLightColorPicker) { - canSaveDynamicFields = "0"; - Enabled = "1"; - color = "1 1 1 1"; - isContainer = "0"; - Profile = "GuiInspectorSwatchButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "81 28"; - Extent = "14 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "getColorF($ThisControl.color, \"MaterialEditorGui.updateAmbientColor\");"; - hovertime = "1000"; - groupNum = "-1"; - ToolTip ="Change Ambient Light Color"; - tooltipprofile = "ToolsGuiToolTipProfile"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - // Light color picker - new GuiSwatchButtonCtrl(matEd_lightColorPicker) { - canSaveDynamicFields = "0"; - Enabled = "1"; - color = "1 1 1 1"; - isContainer = "0"; - Profile = "GuiInspectorSwatchButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "75 23"; - Extent = "14 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "getColorF($ThisControl.color, \"MaterialEditorGui.updateLightColor\");"; - hovertime = "1000"; - groupNum = "-1"; - ToolTip ="Change Normal Light Color"; - tooltipprofile = "ToolsGuiToolTipProfile"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - - new GuiCheckboxCtrl(){ - position = "245 25"; - Extent = "98 18"; - HorizSizing = "left"; - profile = "ToolsGuiCheckBoxProfile"; - Variable = "MaterialEditorGui.livePreview"; - Command = "MaterialEditorGui.updateLivePreview($ThisControl.getValue());"; - text = "Preview in World"; - }; - // window / panel buttons - new GuiBitmapButtonCtrl(MaterialEditorGui_UnDockBtn) { - canSaveDynamicFields = "0"; - internalName = ""; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - Position = "330 1"; - Extent = "18 18"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "0"; - Command = "MaterialEditorGui.releaseSidePanel();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Detach Sidepanel"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:panel_undock_n_image"; - text = ""; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - - new GuiBitmapButtonCtrl(MaterialEditorGui_DockBtn) { - canSaveDynamicFields = "0"; - internalName = ""; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - Position = "330 1"; - Extent = "18 18"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "0"; - Command = "MaterialEditorGui.dockSidePanel();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Dock Sidepanel"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:panel_dock_n_image"; - text = ""; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiBitmapButtonCtrl(MaterialEditorGui_HideBtn) { - canSaveDynamicFields = "0"; - internalName = ""; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - Position = "312 1"; - Extent = "18 18"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.hideSidePanel();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Hide Sidepanel"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:panel_hide_n_image"; - text = ""; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiBitmapButtonCtrl(MaterialEditorGui_ShowBtn) { - canSaveDynamicFields = "0"; - internalName = ""; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - Position = "4 1"; - Extent = "18 18"; - MinExtent = "8 8"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.showSidePanel();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Show Sidepanel"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:panel_show_n_image"; - text = ""; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - - }; - - new GuiWindowCtrl(matEd_addCubemapWindow) { - canSaveDynamicFields = "0"; - isContainer = "1"; - Profile = "ToolsGuiWindowProfile"; - HorizSizing = "center"; - VertSizing = "center"; - position = "362 333"; - Extent = "300 99"; - MinExtent = "48 92"; - canSave = "1"; - Visible = "0"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - resizeWidth = "1"; - resizeHeight = "1"; - canMove = "1"; - canClose = "0"; - canMinimize = "0"; - canMaximize = "0"; - minSize = "50 50"; - EdgeSnap = "1"; - text = "Create Cubemap"; - - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "cubemapName"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "96 35"; - Extent = "196 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - maxLength = "1024"; - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - AltCommand = ""; - passwordMask = "*"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "12 36"; - Extent = "77 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - maxLength = "1024"; - text = "Cubemap Name"; - }; - new GuiButtonCtrl() { - canSaveDynamicFields = "0"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "96 68"; - Extent = "126 22"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - text = "Create"; - Command = "MaterialEditorGui.addCubemap( matEd_addCubemapWindow-->cubemapName.getText() );matEd_addCubemapWindow.setVisible(0);"; - }; - new GuiButtonCtrl() { - canSaveDynamicFields = "0"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "228 68"; - Extent = "64 22"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - text = "Cancel"; - Command = "matEd_addCubemapWindow.setVisible(0);"; - }; - }; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui deleted file mode 100644 index 0404faebe..000000000 --- a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui +++ /dev/null @@ -1,5290 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -$guiContent = new GuiControl(MaterialEditorGui,EditorGuiGroup) { - canSaveDynamicFields = "0"; - internalName = "MatEdPropertiesWindowContainer"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "1024 768"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - - new GuiWindowCollapseCtrl(MaterialEditorPropertiesWindow) { - canSaveDynamicFields = "0"; - internalName = "MatEdPropertiesWindow"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiWindowProfile"; - HorizSizing = "windowRelative"; - VertSizing = "windowRelative"; - Extent = "360" SPC getWord($pref::Video::mode, 1) - getWord(MaterialEditorPreviewWindow.extent, 1) - getWord(EditorGuiToolbar.extent, 1) - 65; - MinExtent = "300 316"; - Position = getWord($pref::Video::mode, 0) - 360 - SPC getWord(EditorGuiToolbar.extent, 1) + getWord(MaterialEditorPreviewWindow.extent, 1) + 6; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "4 4 4 4"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - resizeWidth = "1"; - resizeHeight = "1"; - canMove = "1"; - canClose = "0"; - canMinimize = "0"; - canMaximize = "0"; - closeCommand = "MaterialEditorPropertiesWindow.setVisible(false);"; - minSize = "50 50"; - EdgeSnap = "1"; - text = ":: Material Editor - Properties"; - - new GuiContainer(MaterialEditorGuiContent){ // Client group - isContainer = "1"; - Docking = "Client"; - Margin = "3 1 3 3"; - Position = "4 24"; - Extent = "200 668"; - - new GuiContainer(){ // container to prevent transparent collapsing from effecting children. - Position = "0 21"; - Extent = "200 39"; - isContainer = "1"; - HorizSizing = "width"; - Visible = "1"; - - new GuiContainer(MatEdMaterialMode){ // Edit Mode - Position = "0 0"; - Extent = "200 39"; - isContainer = "1"; - HorizSizing = "width"; - Visible = "0"; - - new GuiTextCtrl(){ - Position = "10 1"; - Extent = "50 16"; - Profile = "ToolsGuiTextRightProfile"; - text = "Material:"; - HorizSizing = "right"; - VertSizing = "bottom"; - }; - new GuiTextEditCtrl(){ - internalName = "selMaterialName"; - Profile = "ToolsGuiTextEditProfile"; - AltCommand = "MaterialEditorGui.setMaterialDirty();MaterialEditorGui.updateActiveMaterialName($ThisControl.getText());"; // needs hookup - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "70 0"; - Extent = "125 18"; - text = ""; - }; - new GuiTextCtrl(){ - Position = "10 20"; - Extent = "50 18"; - Profile = "ToolsGuiTextRightProfile"; - text = "Target:"; - HorizSizing = "right"; - VertSizing = "bottom"; - }; - new GuiTextCtrl(){ // mesh name should not include the path - internalName = "selMaterialMapTo"; // will use the first child found with that name if called from a previous parent even if it is invisable. - Position = "70 20"; - Extent = "125 16"; - HorizSizing = "width"; - VertSizing = "bottom"; - text = ""; - }; - }; - new GuiContainer(MatEdTargetMode){ // Selection Mode - Position = "0 0"; - Extent = "202 39"; - isContainer = "1"; - HorizSizing = "width"; - Visible = "1"; - - new GuiBitmapButtonCtrl(){ - Profile = "ToolsGuiButtonProfile"; - Position = "186 23"; - Extent = "17 17"; - HorizSizing = "left"; - tooltip = "Swap material on the object with existing"; - bitmapAsset = "ToolsModule:change_material_btn_n_image"; - command = "MaterialEditorGui.swapMaterial();"; - }; - - new GuiTextEditCtrl(){ - internalName = "selMaterialName"; - Profile = "ToolsGuiTextEditProfile"; - AltCommand = "MaterialEditorGui.setMaterialDirty();MaterialEditorGui.updateActiveMaterialName($ThisControl.getText());"; // needs hookup - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "76 21"; - Extent = "107 18"; - text = "myMaterial 1"; - HorizSizing = "width"; - }; - new GuiTextCtrl(){ // mesh name should not include the path - internalName = "selMaterialMapTo"; - Profile = "ToolsGuiTextRightProfile"; - Position = "1 1"; - Extent = "70 16"; - HorizSizing = "right"; - VertSizing = "bottom"; - text = ""; - }; - new GuiTextCtrl(){ - Profile = "ToolsGuiTextRightProfile"; - Position = "1 21"; - Extent = "70 16"; - HorizSizing = "right"; - VertSizing = "bottom"; - text = "Material"; - }; - new GuiPopupMenuCtrlEx(SubMaterialSelector){ // needs hookup will show the name of the current mesh Maped to - Profile = "ToolsGuiPopUpMenuProfile"; - Position = "76 0"; - Extent = "126 17"; - HorizSizing = "width"; - VertSizing = "bottom"; - text = ""; - tooltip = "Target Material"; - Command = "SubMaterialSelector.onSelect();"; - reverseTextList = "0"; - }; - }; - }; - - // make this shorter //////////////////////////////////////////////////////////////////////////// - new GuiScrollCtrl(matEd_scrollControl) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiScrollProfile"; - HorizSizing = "width"; - VertSizing = "height"; //height - position = "0 65"; - Extent = "202 603"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - willFirstRespond = "1"; - hScrollBar = "alwaysOff"; - vScrollBar = "dynamic"; - lockHorizScroll = "true"; - lockVertScroll = "false"; - constantThumbHeight = "0"; - childMargin = "0 0"; - - new GuiStackControl(MatEd_scrollContents) { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "0"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 0"; - Extent = "187 0"; - MinExtent = "8 2"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - - new GuiPopUpMenuCtrl() { - canSaveDynamicFields = "0"; - internalName = "MaterialLayerCtrl"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuTabProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 0"; - Extent = "112 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.changeLayer( $ThisControl.getText() );"; - ToolTip = "Changes the material layer being edited"; - hovertime = "1000"; - text = "Layer 0"; - maxLength = "1024"; - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - }; - new GuiRolloutCtrl() { - class = "BehaviorQuickEditRollout"; - superclass = LBQuickEditRollout; - Profile = "GuiRolloutProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "185 0"; - Caption = " Basic Texture Maps"; - Margin = "4 4 4 0"; - DragSizable = false; - container = true; - - new GuiStackControl() { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "0"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "1 3"; - Extent = "185 16"; - MinExtent = "16 16"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - - new GuiContainer(){ // Diffuse Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 21"; - Extent = "185 52"; - HorizSizing = "width"; - className = "materialEditorDiffuseMapContainer"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "0"; - internalName = "diffuseMapDisplayBitmap"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"diffuse\", 1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change the Active Diffuse Map for this layer"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "EditorTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 0"; - Extent = "72 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Diffuse Map"; - maxLength = "1024"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - internalName = "diffuseMapNameText"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "56 16"; - Extent = "134 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - }; - new GuiSwatchButtonCtrl() { - canSaveDynamicFields = "0"; - internalName = "colorTintSwatch"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiInspectorSwatchButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "55 33"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "getColorF(materialEd_PreviewMaterial.diffuseColor[MaterialEditorGui.currentLayer], \"MaterialEditorGui.updateColorMultiply\");"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiTextCtrl(){ - profile="ToolsGuiDefaultProfile"; - text = "Color"; - position = "74 34"; - Extent = "30 15"; - }; - new GuiButtonCtrl(){ - profile="ToolsGuiButtonProfile"; - text ="Edit"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "134 34"; - Extent = "40 16"; - buttonType = "PushButton"; - command = "MaterialEditorGui.updateTextureMap(\"diffuse\", 1);"; - - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "177 34"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"diffuse\", 0);"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:delete_n_image"; - }; - }; - new GuiBitmapCtrl(){ - position="6 75"; - extent ="175 2"; - HorizSizing = "width"; - bitmapAsset = "ToolsModule:separator_v_image"; - }; - new GuiContainer(){ // Normal Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 77"; - Extent = "185 52"; - HorizSizing = "width"; - className = "materialEditorNormalMapContainer"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "0"; - internalName = "normalMapDisplayBitmap"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "EditorTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 0"; - Extent = "72 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Normal Map"; - maxLength = "1024"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"normal\", 1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change the active Normal Map for this layer."; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - internalName = "normalMapNameText"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "56 16"; - Extent = "143 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - }; - new GuiButtonCtrl(){ - profile="ToolsGuiButtonProfile"; - text ="Edit"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "134 34"; - Extent = "40 16"; - buttonType = "PushButton"; - command = "MaterialEditorGui.updateTextureMap(\"normal\", 1);"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "177 34"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"normal\", 0);"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:delete_n_image"; - }; - }; - }; - }; - new GuiRolloutCtrl() { // Light Influence Properties Group - class = "BehaviorQuickEditRollout"; - superclass = LBQuickEditRollout; - Profile = "GuiRolloutProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "300 0"; - Caption = " Light Influence Maps"; - Expanded = false; - Margin = "4 4 4 0"; - DragSizable = false; - container = true; - - new GuiStackControl() { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "0"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "1 3"; - Extent = "300 16"; - MinExtent = "16 16"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - - new GuiContainer(){ - profile = "ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 120"; - HorizSizing = "left"; - - new GuiTextCtrl() { - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 4"; - Extent = "100 16"; - text = "Roughness"; - Profile = "ToolsGuiTextRightProfile"; - }; - - new GuiTextCtrl() { - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 26"; - Extent = "100 16"; - text = "Metalness"; - Profile = "ToolsGuiTextRightProfile"; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 4"; - Extent = "180 20"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "RoughnessSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 2"; - Extent = "10 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"Roughness[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"Roughness[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Sets Roughness."; - hovertime = "1000"; - range = "0 1"; - ticks = "0"; - value = "0"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "RoughnessTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "35 0"; - Extent = "30 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"Roughness[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0"; - }; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 26"; - Extent = "180 20"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "MetalnessSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 2"; - Extent = "10 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"Metalness[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"Metalness[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Sets Metalness."; - hovertime = "1000"; - range = "0 1"; - ticks = "0"; - value = "0"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "MetalnessTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "35 0"; - Extent = "30 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"Metalness[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0"; - }; - }; - new GuiContainer(){ // spec Map options - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 60"; - Extent = "290 24"; - HorizSizing = "right"; - - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "isSRGBCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "5 0"; - Extent = "70 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"isSRGb[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Treat as sRGB" NL "(Substance Designer Workaround)"; - hovertime = "1000"; - text = " Is sRGB"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "invertRoughnessCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "120 0"; - Extent = "120 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"invertRoughness[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = " Invert Rougness" NL "(Treat as Roughest = 1.0 instead of 0.0)"; - hovertime = "1000"; - text = " Invert Roughness"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - }; - new GuiBitmapCtrl(){ - position="6 90"; - extent ="175 2"; - HorizSizing = "width"; - bitmapAsset = "ToolsModule:separator_v_image"; - }; - }; - - new GuiContainer(){ // spec Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 280"; - Extent = "185 52"; - HorizSizing = "width"; - className = "materialEditorORMConfigMapContainer"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "0"; - internalName = "ORMConfigMapDisplayBitmap"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "EditorTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 0"; - Extent = "72 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "ORM (Config) Map"; - maxLength = "1024"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change the packed Specular Map for this layer" NL " - Red: Roughness" NL " - Green: Ambient Occlusion" NL " - Blue: Metalness"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - internalName = "ORMConfigMapNameText"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "56 16"; - Extent = "143 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - }; - new GuiButtonCtrl(){ - profile="ToolsGuiButtonProfile"; - text ="Edit"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "134 34"; - Extent = "40 16"; - buttonType = "PushButton"; - Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",1);"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "177 34"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",0);"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:delete_n_image"; - }; - }; - // todo: fix indent - new GuiBitmapCtrl() { - bitmapAsset = "ToolsModule:separator_v_image"; - position = "6 75"; - extent = "175 2"; - minExtent = "8 2"; - horizSizing = "width"; - visible = "1"; - }; - new GuiContainer(){ // save composite Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "0 344"; - Extent = "185 20"; - HorizSizing = "width"; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "70 2"; - Extent = "100 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Save Composite:"; - maxLength = "1024"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:save_icon_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "175 2"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.saveCompositeMap();"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiBitmapCtrl(){ - position = "6 75"; - extent ="192 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - new GuiContainer() { - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 364"; - extent = "185 52"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - className = "materialEditorAOMapContainer"; - - new GuiBitmapCtrl() { - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "aoMapDisplayBitmap"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "AO Map"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 0"; - extent = "85 8"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "EditorTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - tooltip = "Change the AO map for this layer."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 17"; - extent = "193 17"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "aoMapNameText"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Edit"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "134 34"; - extent = "40 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:delete_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "177 34"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"ao\",0);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(aoChanBtn0) { - text = "R"; - groupNum = "2"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "160 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioRedProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setAOChan(0);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(aoChanBtn1) { - text = "G"; - groupNum = "2"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "184 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioGreenProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setAOChan(1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(aoChanBtn2) { - text = "B"; - groupNum = "2"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "208 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioBlueProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setAOChan(2);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(aoChanBtn3) { - text = "A"; - groupNum = "2"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "232 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setAOChan(3);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiContainer() { - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 364"; - extent = "185 52"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - className = "materialEditorRoughnessMapContainer"; - - new GuiBitmapCtrl() { - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "roughMapDisplayBitmap"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Roughness Map"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 0"; - extent = "35 8"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "EditorTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"rough\",1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - tooltip = "Change the Roughness map for this layer."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 17"; - extent = "193 17"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "roughMapNameText"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Edit"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "134 34"; - extent = "40 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"rough\",1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:delete_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "177 34"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"rough\",0);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(roughChanBtn0) { - text = "R"; - groupNum = "1"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "160 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioRedProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setRoughChan(0);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(roughChanBtn1) { - text = "G"; - groupNum = "1"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "184 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioGreenProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setRoughChan(1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(roughChanBtn2) { - text = "B"; - groupNum = "1"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "208 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioBlueProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setRoughChan(2);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(roughChanBtn3) { - text = "A"; - groupNum = "1"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "232 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setRoughChan(3);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiContainer() { - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 364"; - extent = "185 52"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - className = "materialEditorMetalMapContainer"; - - new GuiBitmapCtrl() { - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "metalMapDisplayBitmap"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Metal Map"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 0"; - extent = "35 8"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "EditorTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"metal\",1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - tooltip = "Change the Metalness Map for this layer."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 17"; - extent = "193 17"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "metalMapNameText"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Edit"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "134 34"; - extent = "40 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"metal\",1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:delete_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "177 34"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"metal\",0);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(metalChanBtn0) { - text = "R"; - groupNum = "3"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "160 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioRedProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setMetalChan(0);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(metalChanBtn1) { - text = "G"; - groupNum = "3"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "184 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioGreenProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setMetalChan(1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(metalChanBtn2) { - text = "B"; - groupNum = "3"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "208 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioBlueProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setMetalChan(2);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiRadioCtrl(metalChanBtn3) { - text = "A"; - groupNum = "3"; - buttonType = "RadioButton"; - useMouseEvents = "0"; - position = "232 7"; - extent = "25 10"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiRadioProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.setMetalChan(3);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiBitmapCtrl(){ - position="6 74"; - extent ="175 2"; - HorizSizing = "width"; - bitmapAsset = "ToolsModule:separator_v_image"; - }; - new GuiContainer() { - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 364"; - extent = "185 80"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - className = "materialEditorGlowMapContainer"; - - new GuiBitmapCtrl() { - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "glowMapDisplayBitmap"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Glow Map"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 0"; - extent = "35 8"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "EditorTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"glow\",1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - tooltip = "Change the Glowness Map for this layer."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 17"; - extent = "143 17"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "glowMapNameText"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Edit"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "134 34"; - extent = "40 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"glow\",1);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmapAsset = "ToolsModule:delete_n_image"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "177 34"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"glow\",0);"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - // todo: correct indent - new GuiTextCtrl() { - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 54"; - Extent = "100 24"; - text = "Glow Multiply"; - Profile = "ToolsGuiTextRightProfile"; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 54"; - Extent = "100 30"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "GlowMulSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 6"; - Extent = "5 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"GlowMul[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"GlowMul[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Sets GlowMul."; - hovertime = "1000"; - range = "0 20"; - ticks = "0"; - value = "0"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "GlowMulTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "35 3"; - Extent = "30 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"GlowMul[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0"; - }; - }; - }; - }; - }; - new GuiRolloutCtrl(advancedTextureMapsRollout) { - class = "BehaviorQuickEditRollout"; - superclass = LBQuickEditRollout; - Profile = "GuiRolloutProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "185 0"; - Caption = " Advanced Texture Maps"; - Expanded = false; - Margin = "4 4 4 0"; - DragSizable = false; - container = true; - - new GuiStackControl() { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "0"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "1 3"; - Extent = "185 16"; - MinExtent = "16 16"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - - new GuiContainer(){ // Detail Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 193"; - Extent = "185 52"; - HorizSizing = "width"; - className = "materialEditorDetailMapContainer"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "0"; - internalName = "detailMapDisplayBitmap"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"detail\", 1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change the active Detail Map for this layer."; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - }; - - new GuiTextCtrl() { // Detailmap Scale text - profile="ToolsGuiDefaultProfile"; - position = "56 34"; - Extent = "35 16"; - text ="Scale"; - }; - - new GuiTextEditCtrl() { // Detailmap Scale - profile="ToolsGuiNumericTextEditProfile"; - internalName = "detailScaleTextEdit"; - position = "95 33"; - Extent = "28 18"; - text ="0"; - maxLength = "2"; - AltCommand = "MaterialEditorGui.updateDetailScale($ThisControl.getText());"; - }; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "EditorTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 -3"; - Extent = "72 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Detail Map"; - maxLength = "1024"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - internalName = "detailMapNameText"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "56 16"; - Extent = "143 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - }; - new GuiButtonCtrl(){ - profile="ToolsGuiButtonProfile"; - text ="Edit"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "134 34"; - Extent = "40 16"; - buttonType = "PushButton"; - command = "MaterialEditorGui.updateTextureMap(\"detail\", 1);"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "177 34"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"detail\", 0);"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:delete_n_image"; - }; - }; - new GuiBitmapCtrl(){ - position="6 246"; - extent ="175 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - - new GuiContainer(){ // Detail Normal Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 136"; - Extent = "185 52"; - HorizSizing = "width"; - className = "materialEditorDetailNormalMapContainer"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "0"; - internalName = "detailNormalMapDisplayBitmap"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"detailNormal\", 1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change the active Detail Normal Map for this layer."; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - }; - - new GuiTextCtrl() { // Detail Normal Map Strength text - profile="ToolsGuiDefaultProfile"; - position = "56 34"; - Extent = "50 16"; - text ="Strength"; - }; - - new GuiTextEditCtrl() { // Detail Normal Map Strength - profile="ToolsGuiNumericTextEditProfile"; - internalName = "detailNormalStrengthTextEdit"; - position = "115 33"; - Extent = "28 18"; - text ="0"; - maxLength = "3"; - AltCommand = "MaterialEditorGui.updateDetailNormalStrength($ThisControl.getText());"; - }; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "EditorTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 -3"; - Extent = "72 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Detail Normal Map"; - maxLength = "1024"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - internalName = "detailNormalMapNameText"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "56 16"; - Extent = "143 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - }; - new GuiButtonCtrl(){ - profile="ToolsGuiButtonProfile"; - text ="Edit"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "134 34"; - Extent = "40 16"; - buttonType = "PushButton"; - command = "MaterialEditorGui.updateTextureMap(\"detailNormal\", 1);"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "177 34"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"detailNormal\", 0);"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:delete_n_image"; - }; - }; - new GuiBitmapCtrl(){ - position="6 189"; - extent ="175 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - - new GuiContainer(){ // Overlay Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 136"; - Extent = "185 52"; - HorizSizing = "width"; - className = "materialEditorOverlayMapContainer"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "0"; - internalName = "overlayMapDisplayBitmap"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"overlay\", 1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change the active Overlay Map for this layer."; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "EditorTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 -3"; - Extent = "72 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Overlay Map"; - maxLength = "1024"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - internalName = "overlayMapNameText"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "56 16"; - Extent = "143 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - }; - new GuiButtonCtrl(){ - profile="ToolsGuiButtonProfile"; - text ="Edit"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "134 34"; - Extent = "40 16"; - buttonType = "PushButton"; - command = "MaterialEditorGui.updateTextureMap(\"overlay\", 1);"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "177 34"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"overlay\", 0);"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:delete_n_image"; - }; - }; - new GuiBitmapCtrl(){ - position="6 189"; - extent ="175 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - new GuiContainer(){ // light Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 250"; - Extent = "185 52"; - HorizSizing = "width"; - className = "materialEditorLightMapContainer"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "0"; - internalName = "lightMapDisplayBitmap"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "EditorTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 -3"; - Extent = "72 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Light Map"; - maxLength = "1024"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"light\", 1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change the active Light Map for this layer."; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - internalName = "lightMapNameText"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "56 16"; - Extent = "143 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - }; - new GuiButtonCtrl(){ - profile="ToolsGuiButtonProfile"; - text ="Edit"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "134 34"; - Extent = "40 16"; - buttonType = "PushButton"; - command="MaterialEditorGui.updateTextureMap(\"light\", 1);"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "177 34"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"light\", 0);"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:delete_n_image"; - }; - }; - new GuiBitmapCtrl(){ - position="6 303"; - extent ="175 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - new GuiContainer(){ // tone Map - profile="ToolsGuiDefaultProfile"; - isContainer = "1"; - position = "6 307"; - Extent = "185 52"; - HorizSizing = "width"; - className = "materialEditorToneMapContainer"; - - new GuiBitmapCtrl() { - canSaveDynamicFields = "0"; - internalName = "toneMapDisplayBitmap"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:unknownImage_image"; - wrap = "0"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "EditorTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "56 -3"; - Extent = "72 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Tone Map"; - maxLength = "1024"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 1"; - Extent = "48 48"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"tone\", 1);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change the active Tone Map for this layer."; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; - }; - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - internalName = "toneMapNameText"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "56 16"; - Extent = "143 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - }; - new GuiButtonCtrl(){ - profile="ToolsGuiButtonProfile"; - text ="Edit"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "134 34"; - Extent = "40 16"; - buttonType = "PushButton"; - command="MaterialEditorGui.updateTextureMap(\"tone\", 1);"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "177 34"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateTextureMap(\"tone\", 0);"; - hovertime = "1000"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:delete_n_image"; - }; - }; - }; - }; - new GuiRolloutCtrl(accumulationPropertiesRollout) { - class = "BehaviorQuickEditRollout"; - superclass = LBQuickEditRollout; - Profile = "GuiRolloutProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "300 0"; - Caption = " Accumulation Properties"; - Expanded = false; - Margin = "-1 0 0 0"; - DragSizable = false; - container = true; - - new GuiStackControl() { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "0"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "GuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "1 3"; - Extent = "300 16"; - MinExtent = "16 16"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - - new GuiContainer(){ // enable/disable - profile="ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 24"; - HorizSizing = "width"; - - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "8 7"; - Extent = "180 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateAccuCheckbox($ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Enables the use of Pixel Specular for this layer."; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - text = " Enable Pixel Specular"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - }; - - new GuiContainer(){ // scale - profile="ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 24"; - HorizSizing = "width"; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 3"; - Extent = "100 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Scale"; - maxLength = "1024"; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 3"; - Extent = "100 20"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuScaleSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 2"; - Extent = "10 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"accuScale[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuScale[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, false);"; - tooltipprofile = "GuiDefaultProfile"; - ToolTip = "Sets the scale of the accu map."; - hovertime = "1000"; - range = "0.03125 32"; - ticks = "0"; - value = "1"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuScaleTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "24 0"; - Extent = "30 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuScale[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "1"; - maxLength = "3"; - }; - }; - }; - - new GuiContainer(){ // direction - profile="ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 24"; - HorizSizing = "width"; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 3"; - Extent = "100 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Direction"; - maxLength = "1024"; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 3"; - Extent = "100 20"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuDirectionSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 2"; - Extent = "10 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"accuDirection[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuDirection[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, false);"; - tooltipprofile = "GuiDefaultProfile"; - ToolTip = "Sets the direction of the accu map."; - hovertime = "1000"; - range = "-1 1"; - ticks = "0"; - value = "-1"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuDirectionTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "24 0"; - Extent = "30 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuDirection[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "-1"; - maxLength = "3"; - }; - }; - }; - new GuiContainer(){ // strength - profile="ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 24"; - HorizSizing = "width"; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 3"; - Extent = "100 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Strength"; - maxLength = "1024"; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 3"; - Extent = "100 20"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuStrengthSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 2"; - Extent = "10 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"accuStrength[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuStrength[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, false);"; - tooltipprofile = "GuiDefaultProfile"; - ToolTip = "Sets the strength of the accu map."; - hovertime = "1000"; - range = "0 1"; - ticks = "0"; - value = "0.6"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuStrengthTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "24 0"; - Extent = "30 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuStrength[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0.6"; - maxLength = "3"; - }; - }; - }; - new GuiContainer(){ // coverage - profile="ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 24"; - HorizSizing = "width"; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 3"; - Extent = "100 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Coverage"; - maxLength = "1024"; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 3"; - Extent = "100 20"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuCoverageSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 2"; - Extent = "10 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"accuCoverage[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuCoverage[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, false);"; - tooltipprofile = "GuiDefaultProfile"; - ToolTip = "Sets the coverage of the accu map."; - hovertime = "1000"; - range = "0 2"; - ticks = "0"; - value = "1"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuCoverageTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "24 0"; - Extent = "30 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuCoverage[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "1"; - maxLength = "3"; - }; - }; - }; - new GuiContainer(){ // specular - profile="ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 24"; - HorizSizing = "width"; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 3"; - Extent = "100 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Specular scale"; - maxLength = "1024"; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 3"; - Extent = "100 20"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuSpecularSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "GuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 2"; - Extent = "10 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"accuSpecular[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuSpecular[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue(), true, false);"; - tooltipprofile = "GuiDefaultProfile"; - ToolTip = "Sets the specular scale over the accu map."; - hovertime = "1000"; - range = "0 2"; - ticks = "0"; - value = "1"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "accuSpecularTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "24 0"; - Extent = "30 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"accuSpecular[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "1"; - maxLength = "3"; - }; - }; - }; - new GuiContainer(){ // empty space - profile="ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 10"; - HorizSizing = "width"; - }; - }; - }; - new GuiRolloutCtrl(lightingPropertiesRollout) { - class = "BehaviorQuickEditRollout"; - superclass = LBQuickEditRollout; - Profile = "GuiRolloutProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "300 0"; - Caption = " Lighting Properties"; - Expanded = false; - Margin = "-1 0 0 0"; - DragSizable = false; - container = true; - - new GuiStackControl() { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "0"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "1 3"; - Extent = "300 16"; - MinExtent = "16 16"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - - new GuiContainer(){ // glow emissive - profile = "ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 40"; - HorizSizing = "width"; - - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "glowCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "130 24"; - Extent = "70 20"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"glow[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Determines if this layer will Glow or not."; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - text = " Glow"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "receiveShadowsCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "12 4"; - Extent = "120 20"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"receiveShadows[\" @ MaterialEditorGui.currentLayer @ \"]\",$ThisControl.getValue());"; - ToolTip = "Do we recieve shadows?"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - text = " Receive Shadows"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "ignoreLightingCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "130 4"; - Extent = "150 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"ignoreLighting[\" @ MaterialEditorGui.currentLayer @ \"]\",$ThisControl.getValue());"; - tooltipprofile = "ToolsGuiDefaultProfile"; - ToolTip = "Are we at all influenced by light?"; - hovertime = "1000"; - text = "Ignore Lighting"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - }; - new GuiContainer(){ // parallax - profile = "ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 20"; - Extent = "300 24"; - HorizSizing = "width"; - - new GuiTextCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 3"; - Extent = "100 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Parallax"; - maxLength = "1024"; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "120 3"; - Extent = "180 20"; - HorizSizing = "width"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "parallaxSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 2"; - Extent = "10 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"parallaxScale[\" @ MaterialEditorGui.currentLayer @ \"]\",$ThisControl.getValue(), true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateActiveMaterial(\"parallaxScale[\" @ MaterialEditorGui.currentLayer @ \"]\",$ThisControl.getValue(), true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Parallax Scale"; - hovertime = "1000"; - range = "0 1"; - ticks = "0"; - value = "0"; - }; - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "parallaxTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "24 0"; - Extent = "30 20"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateActiveMaterial(\"parallaxScale[\" @ MaterialEditorGui.currentLayer @ \"]\",$ThisControl.getValue());"; - hovertime = "1000"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0"; - maxLength = "3"; - }; - }; - }; - new GuiContainer(){ - profile = "ToolsGuiTransparentProfile"; - isContainer = "1"; - position = "0 0"; - Extent = "300 84"; - HorizSizing = "width"; - - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "useAnisoCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "12 8"; - Extent = "130 20"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"useAnisotropic[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Enables the use of anisotropic filtering for this layer."; - hovertime = "1000"; - text = " Anisotropic filtering"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "vertLitCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "12 31"; - Extent = "102 20"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"vertLit[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Enables the use of vertex lighting for this layer."; - hovertime = "1000"; - text = " Vertex lit"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "vertLitCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "120 31"; - Extent = "120 20"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"vertColor[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Multiply vertex colors with diffuse colors for this layer."; - hovertime = "1000"; - text = " Vertex colors"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "subSurfaceCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "12 56"; - Extent = "95 20"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"subSurface[\" @ MaterialEditorGui.currentLayer @ \"]\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Enables the use of subsurface scattering for this layer."; - hovertime = "1000"; - text = " Sub Surface"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - }; - }; - }; - new GuiRolloutCtrl(materialAnimationPropertiesRollout) { - class = "BehaviorQuickEditRollout"; - superclass = LBQuickEditRollout; - Profile = "GuiRolloutProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "300 0"; - Caption = " Animation Properties"; - Expanded = false; - Margin = "-1 0 0 0"; - DragSizable = false; - container = true; - - new GuiStackControl() { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "0"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "1 3"; - Extent = "300 16"; - MinExtent = "16 16"; - canSave = "1"; - isDecoy = "0"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - - new GuiContainer(){ // Rotation Animation Properties - - profile="inspectorStyleRolloutInnerProfile"; - isContainer = "1"; - position = "-1 120"; - Extent = "300 100"; - HorizSizing = "width"; - - new GuiCheckboxCtrl() { - canSaveDynamicFields = "0"; - internalName = "RotationAnimation"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiInspectorCheckBoxTitleProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "4 3"; - Extent = "200 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateAnimationFlags();"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = " Rotation Animation"; - maxLength = "1024"; - }; - - new GuiControl(RotAnimAggCtrl){ - class = "AggregateControl"; - position = "0 29"; - Extent = "290 20"; - HorizSizing = "width"; - - new GuiTextCtrl(){ // u - profile = "ToolsGuiTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "11 1"; - Extent = "12 16"; - text = "U"; - }; - - new GuiSliderCtrl() { // u - Profile = "ToolsGuiSliderProfile"; - internalName = "RotationSliderU"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "25 2"; - Extent = "68 15"; - Command = "MaterialEditorGui.updateRotationOffset(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationOffset(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change U Scroll Direction"; - hovertime = "1000"; - range = "-1 0"; - ticks = "1"; - value = "-0.5"; - }; - new GuiTextEditCtrl(){ // u - internalName = "RotationTextEditU"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "98 0"; - Extent = "34 18"; - text = "0"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl);"; - Profile = "ToolsGuiTextEditProfile"; - }; - }; - - new GuiControl(ScrollAnimAggCtrl) { - class = "AggregateControl"; - position = "0 50"; - Extent = "290 20"; - HorizSizing = "width"; - - new GuiTextCtrl(){ // v - profile = "ToolsGuiTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "11 1"; - Extent = "12 16"; - text = "V"; - }; - - new GuiSliderCtrl() { // v - Profile = "ToolsGuiSliderProfile"; - internalName = "RotationSliderV"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "25 2"; - Extent = "68 15"; - Command = "MaterialEditorGui.updateRotationOffset(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationOffset(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change V Scroll Direction"; - hovertime = "1000"; - range = "-1 0"; - ticks = "1"; - value = "-0.5"; - }; - - new GuiTextEditCtrl(){ // v - internalName = "RotationTextEditV"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "98 0"; - Extent = "34 18"; - text = "0"; - Profile = "ToolsGuiTextEditProfile"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationOffset();"; - }; - }; - new GuiTextCtrl(){ // Pivot Point - HorizSizing = "left"; - VertSizing = "bottom"; - position = "98 12"; - Extent = "34 16"; - text = "Pivot"; - profile = "ToolsGuiTextProfile"; - }; - new GuiBitmapCtrl(){ - HorizSizing = "left"; - VertSizing = "bottom"; - position = "136 20"; - Extent = "48 48"; - isContainer = true; - bitmapAsset=""; - - new GuiBitmapCtrl(){ - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 0"; - Extent = "48 48"; - bitmapAsset="ToolsModule:cubemapBtnBorder_n_image"; - }; - - new GuiBitmapCtrl(){ //horizontal bar - internalName = "RotationCrosshair"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "20 20"; - Extent = "7 7"; - MinExtent = "0 0"; - bitmapAsset="ToolsModule:crosshair_blue_image"; - }; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "0 75"; - Extent = "300 35"; - HorizSizing = "width"; - - new GuiTextCtrl(){ // Speed - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "11 0"; - Extent = "100 16"; - text = "Speed"; - }; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "RotationSpeedSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "120 3"; - Extent = "10 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateRotationSpeed(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationSpeed(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Scrolling Speed"; - hovertime = "1000"; - range = "-10 10"; - ticks = "1"; - value = "0"; - }; - - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "RotationSpeedTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "140 1"; - Extent = "34 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationSpeed();"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0"; - maxLength = "1024"; - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - }; - new GuiTextCtrl(){ // space - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 20"; - Extent = "300 20"; - text = " "; - }; - }; - }; - new GuiContainer(){ // Scroll Animation Properties - profile="inspectorStyleRolloutInnerProfile"; - isContainer = "1"; - position = "-1 240"; - Extent = "300 105"; - HorizSizing = "width"; - - new GuiBitmapCtrl(){ - position = "0 5"; - extent ="300 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - - new GuiCheckboxCtrl() { - canSaveDynamicFields = "0"; - internalName = "ScrollAnimation"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiInspectorCheckBoxTitleProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "4 10"; - Extent = "200 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - Command = "MaterialEditorGui.updateAnimationFlags();"; - text = " Scroll Animation"; - maxLength = "1024"; - }; - - new GuiControl(){ - class = "AggregateControl"; - position = "0 29"; - Extent = "290 20"; - HorizSizing = "width"; - - new GuiTextCtrl(){ // u - profile = "ToolsGuiTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "11 1"; - Extent = "12 16"; - text = "U"; - }; - - new GuiSliderCtrl() { // u - Profile = "ToolsGuiSliderProfile"; - internalName = "ScrollSliderU"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "25 2"; - Extent = "68 15"; - Command = "MaterialEditorGui.updateScrollOffset(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollOffset(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change U Scroll Direction"; - hovertime = "1000"; - range = "-1 1"; - ticks = "1"; - value = "0"; - }; - new GuiTextEditCtrl(){ // u - internalName = "ScrollTextEditU"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "98 0"; - Extent = "34 18"; - text = "0"; - Profile = "ToolsGuiTextEditProfile"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollOffset();"; - }; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "0 50"; - Extent = "290 20"; - HorizSizing = "width"; - - new GuiTextCtrl(){ // v - profile = "ToolsGuiTextProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "11 1"; - Extent = "12 16"; - text = "V"; - }; - - new GuiSliderCtrl() { // v - Profile = "ToolsGuiSliderProfile"; - internalName = "ScrollSliderV"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "25 2"; - Extent = "68 15"; - Command = "MaterialEditorGui.updateScrollOffset(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollOffset(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Change V Scroll Direction"; - hovertime = "1000"; - range = "-1 1"; - ticks = "1"; - value = "0"; - }; - new GuiTextEditCtrl(){ // v - internalName = "ScrollTextEditV"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "98 0"; - Extent = "34 18"; - text = "0"; - Profile = "ToolsGuiTextEditProfile"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollOffset();"; - }; - }; - new GuiTextCtrl(){ // Direction Offset - HorizSizing = "left"; - VertSizing = "bottom"; - position = "98 12"; - Extent = "34 16"; - text = "Offset"; - profile = "ToolsGuiTextProfile"; - }; - new GuiBitmapCtrl(){ - HorizSizing = "left"; - VertSizing = "bottom"; - position = "136 20"; - Extent = "48 48"; - isContainer = true; - bitmapAsset=""; - - new GuiBitmapCtrl(){ - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 0"; - Extent = "48 48"; - bitmapAsset="ToolsModule:cubemapBtnBorder_n_image"; - }; - new GuiBitmapCtrl(){ //vertical bar - HorizSizing = "right"; - VertSizing = "bottom"; - position = "20 20"; - Extent = "7 7"; - MinExtent = "7 7"; - bitmapAsset="ToolsModule:crosshair_image"; - }; - new GuiBitmapCtrl(){ //horizontal bar - internalName = "ScrollCrosshair"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "20 20"; - Extent = "7 7"; - MinExtent = "0 0"; - bitmapAsset="ToolsModule:crosshair_blue_image"; - }; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "0 75"; - Extent = "300 35"; - HorizSizing = "width"; - - new GuiTextCtrl(){ // Speed - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "11 0"; - Extent = "100 16"; - text = "Speed"; - }; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "ScrollSpeedSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "120 3"; - Extent = "10 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateScrollSpeed(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollSpeed(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Scrolling Speed"; - hovertime = "1000"; - range = "0 10"; - ticks = "0"; - value = "0"; - }; - - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "ScrollSpeedTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "140 1"; - Extent = "34 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollSpeed();"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0"; - maxLength = "1024"; - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - }; - new GuiTextCtrl(){ // space - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "0 20"; - Extent = "300 20"; - text = " "; - }; - }; - }; - new GuiContainer(){ // Wave Animation Properties - profile="inspectorStyleRolloutInnerProfile"; - isContainer = "1"; - position = "-1 360"; - Extent = "300 85"; - HorizSizing = "width"; - - new GuiBitmapCtrl(){ - position = "0 0"; - extent ="300 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - - new GuiCheckboxCtrl() { - Profile = "ToolsGuiInspectorCheckBoxTitleProfile"; - internalName = "WaveAnimation"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "4 5"; - Extent = "200 16"; - MinExtent = "8 2"; - text = " Wave Animation"; - Command = "MaterialEditorGui.updateAnimationFlags();"; - groupNum = "-1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - }; - - new GuiCheckboxCtrl() { - Profile = "ToolsGuiCheckBoxProfile"; - internalName = "ScaleAnimation"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "200 24"; - Extent = "45 16"; - MinExtent = "8 2"; - text = " Scale"; - Command = "MaterialEditorGui.updateAnimationFlags();"; - groupNum = "-1"; - tooltipprofile = "ToolsGuiToolTipProfile"; - }; - - new GuiTextCtrl() { - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 22"; - Extent = "100 16"; - text = " Wave Type"; - }; - new GuiContainer(){ // Wave Radio Button container - profile = "ToolsGuiDefaultProfile"; - internalName = "WaveButtonContainer"; - position = "120 24"; - Extent = "49 13"; - isContainer = "1"; - - new GuiBitmapButtonCtrl(){ - profile = "ToolsGuiDefaultProfile"; - buttonType = "RadioButton"; - position = "1 0"; - Extent = "13 13"; - bitmapAsset = "ToolsModule:wav_sine_n_image"; - command = "MaterialEditorGui.updateWaveType();"; - tooltip="Sine Wave"; - hovertime = "1000"; - groupNum = "0"; - waveType = "Sin"; - tooltipprofile = "ToolsGuiToolTipProfile"; - }; - new GuiBitmapButtonCtrl(){ - profile = "ToolsGuiDefaultProfile"; - buttonType = "RadioButton"; - position = "17 0"; - Extent = "13 13"; - bitmapAsset = "ToolsModule:wav_triangle_n_image"; - command = "MaterialEditorGui.updateWaveType();"; - tooltip="Triangle Wave"; - hovertime = "1000"; - groupNum = "0"; - waveType = "Triangle"; - tooltipprofile = "ToolsGuiToolTipProfile"; - }; - new GuiBitmapButtonCtrl(){ - profile = "ToolsGuiDefaultProfile"; - buttonType = "RadioButton"; - position = "33 0"; - Extent = "13 13"; - bitmapAsset = "ToolsModule:wav_square_n_image"; - command = "MaterialEditorGui.updateWaveType();"; - tooltip="Square Wave"; - hovertime = "1000"; - groupNum = "0"; - waveType = "Square"; - tooltipprofile = "ToolsGuiToolTipProfile"; - }; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "0 61"; - Extent = "300 20"; - HorizSizing = "width"; - - - new GuiTextCtrl() { - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 2"; - Extent = "100 16"; - text = "Frequency"; - }; - - new GuiTextEditCtrl() { // frequence - canSaveDynamicFields = "0"; - internalName = "WaveTextEditFreq"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "140 1"; - Extent = "34 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateWaveFreq();"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0"; - maxLength = "1024"; - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - }; - new GuiSliderCtrl() { // freqency - canSaveDynamicFields = "0"; - internalName = "WaveSliderFreq"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "120 4"; - Extent = "10 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateWaveFreq(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateWaveFreq(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Changes Wave Frequency"; - hovertime = "1000"; - range = "0 10"; - ticks = "9"; - value = "0"; - }; - - }; - - new GuiControl() { - class = "AggregateControl"; - position = "0 40"; - Extent = "300 20"; - HorizSizing = "width"; - - new GuiTextCtrl() { - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 2"; - Extent = "100 16"; - text = "Amplitude"; - }; - - new GuiTextEditCtrl() { // amplitude - Profile = "ToolsGuiTextEditProfile"; - internalName = "WaveTextEditAmp"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "140 1"; - Extent = "34 18"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateWaveAmp();"; - hovertime = "1000"; - text = "0"; - }; - new GuiSliderCtrl() { // amplitude - canSaveDynamicFields = "0"; - internalName = "WaveSliderAmp"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "120 4"; - Extent = "10 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateWaveAmp(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateWaveAmp(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Changes Wave Amplitude"; - hovertime = "1000"; - range = "0 1"; - ticks = "1"; - value = "0"; - }; - - }; - }; - new GuiContainer(){ // image Sequence Animation Properties - profile="inspectorStyleRolloutInnerProfile"; - isContainer = "1"; - position = "-1 480"; - Extent = "300 80"; - HorizSizing = "width"; - - new GuiBitmapCtrl(){ - position = "0 5"; - extent ="300 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - - new GuiCheckboxCtrl() { - Profile = "ToolsGuiInspectorCheckBoxTitleProfile"; - internalName = "SequenceAnimation"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "4 10"; - Extent = "200 16"; - MinExtent = "8 2"; - text = " Image Sequence"; - Command = "MaterialEditorGui.updateAnimationFlags();"; - groupNum = "-1"; - }; - - - new GuiControl() { - class = "AggregateControl"; - position = "0 28"; - Extent = "300 20"; - HorizSizing = "width"; - - new GuiTextCtrl() { - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 2"; - Extent = "100 16"; - text = "Frames / Sec"; - }; - - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "SequenceTextEditFPS"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "140 1"; - Extent = "34 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateSequenceFPS();"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "0"; - maxLength = "1024"; - }; - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "SequenceSliderFPS"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "120 4"; - Extent = "10 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateSequenceFPS(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateSequenceFPS(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "How many frames to display per second."; - hovertime = "1000"; - range = "0 30"; - ticks = "5"; - value = "0"; - }; - }; - - new GuiControl() { - class = "AggregateControl"; - position = "0 49"; - Extent = "300 20"; - HorizSizing = "width"; - - new GuiTextCtrl() { - profile = "ToolsGuiTextRightProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "1 2"; - Extent = "100 16"; - text = "Frames"; - }; - - new GuiTextEditCtrl() { // size - Profile = "ToolsGuiTextEditProfile"; - internalName = "SequenceTextEditSSS"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "140 1"; - Extent = "34 18"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateSequenceSSS();"; - hovertime = "1000"; - text = "0"; - }; - new GuiSliderCtrl() { //size - canSaveDynamicFields = "0"; - internalName = "SequenceSliderSSS"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "120 4"; - Extent = "10 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateSequenceSSS(true, true);"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateSequenceSSS(true, false);"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "How many frames in the sequence."; - hovertime = "1000"; - range = "0 100"; - ticks = "9"; - value = "0"; - }; - }; - }; - }; - }; - new GuiRolloutCtrl(materialAdvancedPropertiesRollout) { // Advanced Properties Group - class = "BehaviorQuickEditRollout"; - superclass = LBQuickEditRollout; - Profile = "GuiRolloutProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "202 0"; - Caption = " Advanced (all layers)"; - Expanded = false; - Margin = "4 4 4 0"; - DragSizable = false; - container = true; - - new GuiStackControl() { - StackingType = "Vertical"; - HorizStacking = "Left to Right"; - VertStacking = "Top to Bottom"; - Padding = "0"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "1 3"; - Extent = "202 16"; - - new GuiContainer(){ // Transparentcy Properties - Profile = "ToolsGuiDefaultProfile"; - isContainer = "1"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "210 89"; - - new GuiPopUpMenuCtrl() { - internalName = "blendingTypePopUp"; - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "3 2"; - Extent = "83 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"translucentBlendOp\",$ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Determines the type of blending to be applied on the transparent object."; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "LerpAlpha"; - maxLength = "1024"; - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "alphaTestCheckBox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "3 39"; - Extent = "106 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"alphaTest\",$ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "When enabled, caused pixels under a specific alpha threshold to get discarded rather than be computed. Only valid for transparent objects."; - hovertime = "1000"; - text = "Alpha Threshold"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - - new GuiControl() { - class = "AggregateControl"; - HorizSizing = "width"; - position = "115 39"; - Extent = "175 20"; - - new GuiSliderCtrl() { - canSaveDynamicFields = "0"; - internalName = "alphaRefSlider"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiSliderProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "0 3"; - Extent = "45 14"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"alphaRef\",$ThisControl.getValue(), true, true );"; - AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"alphaRef\",$ThisControl.getValue(), true, false );"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Sets the minimum transparency value that a pixel must have to be calculated. Anything below this value will simply not be rendered at all."; - hovertime = "1000"; - range = "0 255"; - ticks = "0"; - value = "0"; - }; - - new GuiTextEditCtrl() { - canSaveDynamicFields = "0"; - internalName = "alphaRefTextEdit"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "49 0"; - Extent = "27 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateActiveMaterial(\"alphaRef\",$ThisControl.getValue());"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "100"; - maxLength = "1024"; - }; - }; - - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "transZWriteCheckBox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "3 23"; - Extent = "130 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"translucentZWrite\",$ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Can be used to help force a proper Z-Ordering when Z-Ordering issues occur. Only valid for materials with Transparency."; - hovertime = "1000"; - text = "Transparent Z-Write"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "translucentCheckbox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "89 3"; - Extent = "107 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"translucent\",$ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Sets material to use transparent blending modes."; - hovertime = "1000"; - text = " Transparency"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "castShadows"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "3 55"; - Extent = "112 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"castShadows\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Object casts shadows."; - hovertime = "1000"; - text = "Cast Shadows"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "castDynamicShadows"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "3 70"; - Extent = "115 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"castDynamicShadows\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Object casts dynamic shadows."; - hovertime = "1000"; - text = "Dynamic Shadows"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - new GuiCheckBoxCtrl() { - canSaveDynamicFields = "0"; - internalName = "doubleSidedCheckBox"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiCheckBoxProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "105 55"; - Extent = "90 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"doubleSided\",$ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - ToolTip = "Determines if this material will be rendered from both sides of the polygon, or just the \'front facing\' side. "; - hovertime = "1000"; - text = "Double Sided"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - useInactiveState = "0"; - }; - }; - new GuiContainer(){ // Reflection Properties - Profile = "ToolsGuiDefaultProfile"; - isContainer = "1"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 95"; - Extent = "212 25"; - visible = "0"; - - new GuiBitmapCtrl(){ - position="2 2"; - extent ="192 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - // Reflection Properties Text - new GuiTextCtrl(matEd_reflectionPropertiesText) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "91 6"; - Extent = "80 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Reflection"; - maxLength = "1024"; - }; - - new GuiPopUpMenuCtrl() { - canSaveDynamicFields = "0"; - internalName = "reflectionTypePopUp"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "width"; - VertSizing = "bottom"; - position = "3 6"; - Extent = "75 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.updateReflectionType($ThisControl.getText());"; - ToolTip = "Determines the type of blending to be applied on the transparent object."; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "None"; - maxLength = "1024"; - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - }; - new GuiButtonCtrl(matEd_cubemapEditBtn){ - internalName = "matEd_cubemapEditBtn"; - profile ="ToolsGuiButtonProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "143 6 28"; - Extent = "33 18"; - Command = "MaterialEditorGui.showCubemapEditor();"; - text = "Edit"; - }; - }; - new GuiContainer(){ // Behavior Properties - Profile = "ToolsGuiDefaultProfile"; - isContainer = "1"; - HorizSizing = "width"; - VertSizing = "bottom"; - Position = "0 122"; - Extent = "212 100"; - - new GuiBitmapCtrl(){ - position="2 2"; - extent ="192 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - new GuiTextCtrl() { - text = "Effect Colors[0:1]"; - position = "1 6"; - extent = "100 15"; - profile = "ToolsGuiDefaultProfile"; - }; - new GuiSwatchButtonCtrl() { - color = "1 1 1 1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "100 6"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiInspectorSwatchButtonProfile"; - visible = "1"; - active = "1"; - command = "getColorF(materialEd_PreviewMaterial.effectColor[0], \"MaterialEditorGui.updateEffectColor0\");"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "effectColor0Swatch"; - }; - new GuiSwatchButtonCtrl() { - color = "1 1 1 1"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "120 6"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiInspectorSwatchButtonProfile"; - visible = "1"; - active = "1"; - command = "getColorF(materialEd_PreviewMaterial.effectColor[1], \"MaterialEditorGui.updateEffectColor1\");"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "effectColor1Swatch"; - }; - new GuiCheckBoxCtrl() { - text = "Show Footprints"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "1 24"; - extent = "115 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiCheckBoxProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"showFootprints\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - tooltip = "Enables Player footprints on surfaces that use this Material."; - hovertime = "1000"; - isContainer = "0"; - internalName = "showFootprintsCheckbox"; - }; - new GuiCheckBoxCtrl() { - text = "Show Dust"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "120 24"; - extent = "80 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiCheckBoxProfile"; - visible = "1"; - active = "1"; - Command = "MaterialEditorGui.updateActiveMaterial(\"showDust\", $ThisControl.getValue());"; - tooltipprofile = "ToolsGuiToolTipProfile"; - tooltip = "Enables dust particles on surfaces that use this Material."; - hovertime = "1000"; - isContainer = "0"; - internalName = "showDustCheckbox"; - }; - new GuiTextCtrl() { - text = "Footstep sound"; - position = "1 43"; - extent = "100 15"; - profile = "ToolsGuiDefaultProfile"; - }; - new GuiPopUpMenuCtrl() { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "100 42"; - extent = "85 18"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiPopUpMenuProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.updateBehaviorSound(\"Footstep\", $ThisControl.getText());"; - tooltipProfile = "ToolsGuiToolTipProfile"; - tooltip = "Determines the footstep sound to use when the Player walks on this Material."; - hovertime = "1000"; - isContainer = "0"; - internalName = "footstepSoundPopUp"; - }; - new GuiTextCtrl() { - text = "Impact sound"; - position = "1 63"; - extent = "100 15"; - profile = "ToolsGuiDefaultProfile"; - }; - new GuiPopUpMenuCtrl() { - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "100 62"; - extent = "85 18"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiPopUpMenuProfile"; - visible = "1"; - active = "1"; - command = "MaterialEditorGui.updateBehaviorSound(\"Impact\", $ThisControl.getText());"; - tooltipProfile = "ToolsGuiToolTipProfile"; - tooltip = "Determines the impact sound to use when an object collides with this Material."; - hovertime = "1000"; - isContainer = "0"; - internalName = "impactSoundPopUp"; - }; - new GuiBitmapCtrl(){ - position="2 90"; - extent ="192 2"; - HorizSizing = "width"; - bitmapAsset ="ToolsModule:separator_v_image"; - }; - }; - }; - }; - }; - - }; - new GuiBitmapButtonCtrl(MatEd_phoBreadcrumb) { //Go back to previous editor - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "-1 0"; - Extent = "20 19"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "0"; - //Command = "materialSelector.showDialog(\"MaterialEditorGui.switchMaterial\");"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:folderUp_image"; - tooltip = "Go back to previous editor"; - tooltipprofile = "ToolsGuiToolTipProfile"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiBitmapButtonCtrl(MatEd_editMaterial) { //Select and Edit an Existing Material - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "66 1"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "AssetBrowser.showDialog(\"MaterialAsset\", \"MaterialEditorGui.selectMaterialAsset\");"; - hovertime = "1000"; - bitmapAsset = "ToolsModule:open_file_n_image"; - tooltip = "Open Existing Material"; - tooltipprofile = "ToolsGuiToolTipProfile"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - // New Button - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "86 1"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.createNewMaterial();"; - hovertime = "1000"; - groupNum = "-1"; - text =""; - tooltip = "Create New Material"; - tooltipprofile = "ToolsGuiToolTipProfile"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:new_n_image"; - }; - // Save Button - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "106 1"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.save();"; - hovertime = "1000"; - groupNum = "-1"; - text =""; - tooltip = "Save Material (ALT S)"; - tooltipprofile = "ToolsGuiToolTipProfile"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:save_icon_n_image"; - }; - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiDefaultProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "126 1"; - Extent = "16 16"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.lookupMaterialInstances();"; - hovertime = "1000"; - groupNum = "-1"; - text =""; - tooltip = "Lookup Material Instances"; - tooltipprofile = "ToolsGuiToolTipProfile"; - buttonType = "PushButton"; - useMouseEvents = "0"; - bitmapAsset = "ToolsModule:visible_n_image"; - }; - new GuiBitmapCtrl(){ - position = "147 1"; - Extent = "2 16"; - minExtent = "2 16"; - HorizSizing = "left"; - VertSizing = "bottom"; - bitmapAsset = "ToolsModule:separator_h_image"; - }; - // Revert Material - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "151 1"; - Extent = "17 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.refreshMaterial();"; - hovertime = "1000"; - tooltip = "Revert Material to Saved"; - tooltipprofile = "ToolsGuiToolTipProfile"; - text = ""; - bitmapAsset = "ToolsModule:reset_icon_n_image"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - // Clear Material - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "168 1"; - Extent = "17 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.clearMaterial();"; - hovertime = "1000"; - tooltip = "Clear All Material Properties"; - tooltipprofile = "ToolsGuiToolTipProfile"; - text = ""; - bitmapAsset = "ToolsModule:clear_icon_n_image"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - // Delete Material - new GuiBitmapButtonCtrl() { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "left"; - VertSizing = "bottom"; - position = "185 1"; - Extent = "17 17"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = ""; - hovertime = "1000"; - tooltip = "Delete Material from File"; - tooltipprofile = "ToolsGuiToolTipProfile"; - text = ""; - bitmapAsset = "ToolsModule:delete_n_image"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - Command = "MaterialEditorGui.deleteMaterial();"; - }; - }; - }; -}; - -// Here are all of the other gui elements that were included in the original gui============================================ -// EDIT: Instead of showing the faded bitmap, were going to just go ahead and push the controls; that way they are sitting -// on top of the editor gui, while being nonmodal -new GuiControl(matEdNonModalGroup, EditorGuiGroup) { - canSaveDynamicFields = "0"; - Profile = "ToolsGuiOverlayProfile"; - Enabled = "1"; - isContainer = "1"; - HorizSizing = "right"; - VertSizing = "bottom"; - Position = "0 0"; - Extent = "1024 768"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - - new GuiWindowCtrl(matEdSaveDialog) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiWindowProfile"; - HorizSizing = "center"; - VertSizing = "center"; - position = "197 221"; - Extent = "336 104"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "0"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - resizeWidth = "0"; - resizeHeight = "0"; - canMove = "0"; - canClose = "0"; - canMinimize = "0"; - canMaximize = "0"; - minSize = "50 50"; - EdgeSnap = "1"; - text = "Material Not Saved!"; - - new GuiButtonCtrl(matEd_notSavedWindow_Save) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "8 69"; - Extent = "121 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "matEdSaveDialog.dialogSave();"; - hovertime = "1000"; - text = "Save"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiTextCtrl(matEd_materialNotSavedText) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextCenterProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "7 35"; - Extent = "318 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "This material has unsaved changes. Do you wish to save?"; - maxLength = "1024"; - }; - new GuiButtonCtrl(matEd_notSavedWindow_DontSave) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "157 69"; - Extent = "80 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "matEdSaveDialog.dialogDontSave();"; - hovertime = "1000"; - text = "Don\'t Save"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiButtonCtrl(matEd_notSavedWindow_Cancel) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "245 69"; - Extent = "80 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "matEdSaveDialog.dialogCancel();"; - hovertime = "1000"; - text = "Cancel"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - }; - new GuiWindowCtrl(matEd_changeCategoryDialog) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiWindowProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "288 144"; - Extent = "248 133"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "0"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - resizeWidth = "0"; - resizeHeight = "0"; - canMove = "0"; - canClose = "0"; - canMinimize = "0"; - canMaximize = "0"; - minSize = "50 50"; - EdgeSnap = "1"; - text = "Change Material Category"; - - new GuiPopUpMenuCtrl(matEd_changeCategory_categoryList) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiPopUpMenuProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 32"; - Extent = "183 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - maxLength = "1024"; - maxPopupHeight = "200"; - sbUsesNAColor = "0"; - reverseTextList = "0"; - bitmapBounds = "16 16"; - }; - new GuiButtonCtrl(matEd_changeCategory_okayBtn) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 97"; - Extent = "137 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.okayChangeCategoryDialog();"; - hovertime = "1000"; - text = "Update Category"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiButtonCtrl(matEd_changeCategory_cancelBtn) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "159 97"; - Extent = "80 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.cancelChangeCategoryDialog();"; - hovertime = "1000"; - text = "Cancel"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiButtonCtrl(matEd_changeCategory_addCatBtn) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "200 60"; - Extent = "39 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.addCategory();"; - hovertime = "1000"; - text = "New"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiTextEditCtrl(matEd_changeCategory_catNameEntry) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextEditProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "10 60"; - Extent = "183 18"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - maxLength = "1024"; - historySize = "0"; - password = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - }; - new GuiWindowCtrl(matEd_changeCategory_ErrorDialog) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "1"; - Profile = "ToolsGuiWindowProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "8 18"; - Extent = "232 113"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "0"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - resizeWidth = "0"; - resizeHeight = "0"; - canMove = "0"; - canClose = "0"; - canMinimize = "0"; - canMaximize = "0"; - minSize = "50 50"; - EdgeSnap = "1"; - text = "Category Change Error"; - - new GuiButtonCtrl(matEd_changeCategory_Error_Button) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiButtonProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "72 81"; - Extent = "80 24"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - Command = "MaterialEditorGui.okChangeCategoryErrorDialog();"; - hovertime = "1000"; - text = "Ok"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - }; - new GuiTextCtrl(matEd_changeCategory_error_Text) { - canSaveDynamicFields = "0"; - Enabled = "1"; - isContainer = "0"; - Profile = "ToolsGuiTextCenterProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - position = "8 31"; - Extent = "215 40"; - MinExtent = "8 2"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - Margin = "0 0 0 0"; - Padding = "0 0 0 0"; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - text = "Text goes here!"; - maxLength = "1024"; - }; - }; - }; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cubePreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cubePreview.max deleted file mode 100644 index 6feb85fc4..000000000 Binary files a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cubePreview.max and /dev/null differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_pyramidPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_pyramidPreview.max deleted file mode 100644 index 06b4b48d1..000000000 Binary files a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_pyramidPreview.max and /dev/null differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_spherePreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_spherePreview.max deleted file mode 100644 index 71485ac86..000000000 Binary files a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_spherePreview.max and /dev/null differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusKnotPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusKnotPreview.max deleted file mode 100644 index 4e2bfec10..000000000 Binary files a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusKnotPreview.max and /dev/null differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusPreview.max b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusPreview.max deleted file mode 100644 index 4e004500d..000000000 Binary files a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_torusPreview.max and /dev/null differ diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_d.png b/Templates/BaseGame/game/tools/materialEditor/images/change-material-btn_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/change-material-btn_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_h.png b/Templates/BaseGame/game/tools/materialEditor/images/change-material-btn_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/change-material-btn_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_n.png b/Templates/BaseGame/game/tools/materialEditor/images/change-material-btn_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/change-material-btn_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/change-material-btn_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/change_material_btn_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/change_material_btn_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/change_material_btn_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/change_material_btn_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/change_material_btn_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/change_material_btn_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat.jpg b/Templates/BaseGame/game/tools/materialEditor/images/cubeMapEd_previewMat.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/cubeMapEd_previewMat.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cubeMapEd_previewMat_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cubeMapEd_previewMat_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg.jpg b/Templates/BaseGame/game/tools/materialEditor/images/cube_xNeg.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/cube_xNeg.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cube_xNeg_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cube_xNeg_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos.jpg b/Templates/BaseGame/game/tools/materialEditor/images/cube_xPos.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/cube_xPos.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cube_xPos_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cube_xPos_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg.jpg b/Templates/BaseGame/game/tools/materialEditor/images/cube_yNeg.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/cube_yNeg.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cube_yNeg_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cube_yNeg_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos.jpg b/Templates/BaseGame/game/tools/materialEditor/images/cube_yPos.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/cube_yPos.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cube_yPos_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cube_yPos_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg.jpg b/Templates/BaseGame/game/tools/materialEditor/images/cube_zNeg.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/cube_zNeg.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cube_zNeg_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cube_zNeg_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos.jpg b/Templates/BaseGame/game/tools/materialEditor/images/cube_zPos.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/cube_zPos.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cube_zPos_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cube_zPos_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d.png b/Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h.png b/Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i.png b/Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_i.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i.png rename to Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_i.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_i_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_i_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n.png b/Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/cubemapBtnBorder_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/gridTiny2.PNG b/Templates/BaseGame/game/tools/materialEditor/images/gridTiny2.PNG similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/gridTiny2.PNG rename to Templates/BaseGame/game/tools/materialEditor/images/gridTiny2.PNG diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/gui_gridTiny2_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/gui_gridTiny2_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/gui_gridTiny2_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/gui_gridTiny2_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d.jpg b/Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_d.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_d.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h.jpg b/Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_h.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_h.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n.jpg b/Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_n.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_n.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderButt_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderPreview.max b/Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderPreview.max similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderPreview.max rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_cylinderPreview.max diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat.jpg b/Templates/BaseGame/game/tools/materialEditor/images/matEd_mappedMat.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_mappedMat.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/matEd_mappedMat_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_mappedMat_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d.jpg b/Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_d.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_d.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h.jpg b/Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_h.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_h.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n.jpg b/Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_n.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_n.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/matEd_sphereButt_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d.png b/Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h.png b/Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n.png b/Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/materialSelectorIcon_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_d.png b/Templates/BaseGame/game/tools/materialEditor/images/mesh-selector-btn_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/mesh-selector-btn_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_h.png b/Templates/BaseGame/game/tools/materialEditor/images/mesh-selector-btn_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/mesh-selector-btn_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_n.png b/Templates/BaseGame/game/tools/materialEditor/images/mesh-selector-btn_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/mesh-selector-btn_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/mesh-selector-btn_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/mesh_selector_btn_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/mesh_selector_btn_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/mesh_selector_btn_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/mesh_selector_btn_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/mesh_selector_btn_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/mesh_selector_btn_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new-material_d.png b/Templates/BaseGame/game/tools/materialEditor/images/new-material_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/new-material_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/new-material_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new-material_h.png b/Templates/BaseGame/game/tools/materialEditor/images/new-material_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/new-material_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/new-material_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new-material_n.png b/Templates/BaseGame/game/tools/materialEditor/images/new-material_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/new-material_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/new-material_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new_material_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/new_material_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/new_material_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/new_material_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new_material_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/new_material_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/new_material_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/new_material_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new_material_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/new_material_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/new_material_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/new_material_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/screenFaded.png b/Templates/BaseGame/game/tools/materialEditor/images/screenFaded.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/screenFaded.png rename to Templates/BaseGame/game/tools/materialEditor/images/screenFaded.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/screenFaded_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/screenFaded_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/screenFaded_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/screenFaded_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/scrollBox.jpg b/Templates/BaseGame/game/tools/materialEditor/images/scrollBox.jpg similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/scrollBox.jpg rename to Templates/BaseGame/game/tools/materialEditor/images/scrollBox.jpg diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/scrollBox_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/scrollBox_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/scrollBox_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/scrollBox_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/unknownImage.png b/Templates/BaseGame/game/tools/materialEditor/images/unknownImage.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/unknownImage.png rename to Templates/BaseGame/game/tools/materialEditor/images/unknownImage.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/unknownImage_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/unknownImage_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/unknownImage_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/unknownImage_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn.png b/Templates/BaseGame/game/tools/materialEditor/images/unsavedWarn.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn.png rename to Templates/BaseGame/game/tools/materialEditor/images/unsavedWarn.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/unsavedWarn_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/unsavedWarn_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-none_d.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-none_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-none_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-none_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-none_h.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-none_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-none_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-none_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-none_i.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-none_i.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-none_i.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-none_i.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-none_n.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-none_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-none_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-none_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_d.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-sine_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-sine_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_h.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-sine_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-sine_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_i.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-sine_i.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_i.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-sine_i.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_n.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-sine_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-sine_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-sine_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-square_d.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-square_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-square_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-square_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-square_h.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-square_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-square_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-square_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-square_i.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-square_i.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-square_i.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-square_i.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-square_n.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-square_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-square_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-square_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_d.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-triangle_d.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_d.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-triangle_d.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_h.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-triangle_h.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_h.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-triangle_h.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_i.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-triangle_i.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_i.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-triangle_i.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_n.png b/Templates/BaseGame/game/tools/materialEditor/images/wav-triangle_n.png similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav-triangle_n.png rename to Templates/BaseGame/game/tools/materialEditor/images/wav-triangle_n.png diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_none_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_none_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_none_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_none_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_none_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_none_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_none_i_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_none_i_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_none_i_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_none_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_none_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_none_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_sine_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_sine_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_sine_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_sine_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_sine_i_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_i_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_sine_i_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_sine_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_sine_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_square_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_square_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_square_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_square_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_square_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_square_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_square_i_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_square_i_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_square_i_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_square_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_square_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_square_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_triangle_d_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_d_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_triangle_d_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_triangle_h_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_h_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_triangle_h_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_triangle_i_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_i_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_triangle_i_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/images/wav_triangle_n_image.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_n_image.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/images/wav_triangle_n_image.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/main.tscript b/Templates/BaseGame/game/tools/materialEditor/main.tscript index 9ff894266..dffcee964 100644 --- a/Templates/BaseGame/game/tools/materialEditor/main.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/main.tscript @@ -26,30 +26,19 @@ function initializeMaterialEditor() { echo(" % - Initializing Material Editor"); - // Load Preview Window - exec("~/materialEditor/gui/guiMaterialPreviewWindow.ed.gui"); - - // Load Properties Window - exec("~/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui"); - //Material Instance viewer exec("~/materialEditor/gui/materialInstancesView.ed.gui"); + exec("./gui/MaterialEditorGui.gui"); + // Load Client Scripts. exec("./scripts/materialEditor.ed." @ $TorqueScriptFileExtension); exec("./scripts/materialEditorUndo.ed." @ $TorqueScriptFileExtension); exec("./scripts/materialInstanceView.ed." @ $TorqueScriptFileExtension); - //exec("./gui/profiles.ed." @ $TorqueScriptFileExtension); - MaterialEditorPreviewWindow.setVisible( false ); - //matEd_cubemapEditor.setVisible( false ); - matEd_addCubemapWindow.setVisible( false ); - MaterialEditorPropertiesWindow.setVisible( false ); - - MainSceneTabPanel.add( MaterialEditorPreviewWindow ); - MainSceneTabPanel.add( matEd_cubemapEditor ); - MainSceneTabPanel.add( matEd_addCubemapWindow ); - MainSceneTabPanel.add( MaterialEditorPropertiesWindow ); + exec("./scripts/materialAnimationFieldTypes." @ $TorqueScriptFileExtension); + exec("./scripts/bakeCompositeButtonFieldType." @ $TorqueScriptFileExtension); + exec("./scripts/ORMSliderFieldType." @ $TorqueScriptFileExtension); } function destroyMaterialEditor() @@ -131,8 +120,8 @@ function MaterialEditorPlugin::onActivated( %this ) materialAdvancedPropertiesRollout.Expanded = false; WorldEditorPlugin.onActivated(); - EditorGui-->MatEdPropertiesWindow.setVisible( true ); - EditorGui-->MatEdPreviewWindow.setVisible( true ); + //EditorGui-->MatEdPropertiesWindow.setVisible( true ); + //EditorGui-->MatEdPreviewWindow.setVisible( true ); EditorGui-->WorldEditorToolbar.setVisible( true ); MaterialEditorGui.currentObject = $Tools::materialEditorList; @@ -143,6 +132,8 @@ function MaterialEditorPlugin::onActivated( %this ) // Do resize the windows at start MaterialEditorGui.onWake(); + Canvas.pushDialog(MaterialEditorGui); + Parent::onActivated(%this); } @@ -158,10 +149,11 @@ function MaterialEditorPlugin::onDeactivated( %this ) WorldEditorPlugin.onDeactivated(); + Canvas.popDialog(MaterialEditorGui); MaterialEditorGui.quit(); - EditorGui-->MatEdPropertiesWindow.setVisible( false ); - EditorGui-->MatEdPreviewWindow.setVisible( false ); + //EditorGui-->MatEdPropertiesWindow.setVisible( false ); + //EditorGui-->MatEdPreviewWindow.setVisible( false ); EditorGui-->WorldEditorToolbar.setVisible( false ); %this.map.pop(); diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/ORMSliderFieldType.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/ORMSliderFieldType.tscript new file mode 100644 index 000000000..1118dbf28 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/ORMSliderFieldType.tscript @@ -0,0 +1,149 @@ +function GuiInspectorGroup::buildMatORMSliderField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + echo("GuiInspectorGroup::buildMatORMSliderField()"); + %extent = 200; + + %fieldCtrl = %this.createInspectorField(); + + %extent = %this.stack.getExtent(); + + %width = mRound(%extent/2); + %height = 20; + %inset = 10; + + %fieldCtrl.setHeightOverride(true, %height); + + %minRange = getWord(%fieldDataVals,0); + %maxRange = getWord(%fieldDataVals,1); + %tickCount = getWord(%fieldDataVals,2); + %doSnap = getWord(%fieldDataVals,3); + + if(%doSnap $= "") + %doSnap = 0; + + %editControl = new GuiControl() + { + class = "guiMatORMSliderField"; + Position = %fieldCtrl.edit.position; + Extent = %fieldCtrl.edit.extent; + }; + + %editText = new GuiTextEditCtrl() { + class = "guiMatORMSliderFieldText"; + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + Position = "0 0"; + Extent = %fieldCtrl.edit.extent.x * 0.2 SPC %fieldCtrl.edit.extent.y; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiTextEditProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + text = %fieldDefaultVal; + }; + + %editSlider = new GuiSliderCtrl() { + class = "guiMatORMSliderFieldSlider"; + range = %minRange SPC %maxRange; + ticks = %tickCount; + value = %fieldDefaultVal; + snap = %doSnap; + renderTicks = "true"; + isContainer = "0"; + Profile = "GuiSliderProfile"; + HorizSizing = "width"; + VertSizing = "bottom"; + Position = (%fieldCtrl.edit.extent.x * 0.2) + 5 SPC 0; + Extent = (%fieldCtrl.edit.extent.x * 0.8) - 5 SPC %fieldCtrl.edit.extent.y; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "$thisControl.onDragComplete();"; + tooltipprofile = "GuiToolTipProfile"; + tooltip = ""; //%tooltip; + hovertime = "1000"; + canSaveDynamicFields = "0"; + ownerObject = %ownerObj; + fieldName = %fieldName; + callbackName = %callbackName; + }; + + %editText.sliderControl = %editSlider; + %editSlider.textControl = %editText; + + %editControl.add(%editText); + %editControl.add(%editSlider); + + //set the field value + if(getSubStr(%this.fieldName, 0, 1) $= "$") + { + if(%fieldName $= "") + %editControl.setValue(%fieldName); + } + else if(isObject(%ownerObj)) + { + //regular variable + %setCommand = %editControl @ ".setValue(" @ %ownerObj @ "." @ %fieldName @ ");"; + eval(%setCommand); + } + + %fieldCtrl.setCaption(%fieldLabel); + %fieldCtrl.setEditControl(%editControl); + + %this.addInspectorField(%fieldCtrl); +} + +function guiMatORMSliderFieldField::onResize(%this) +{ +} + +function guiMatORMSliderFieldText::onReturn(%this) +{ + %value = %this.getText(); + %this.sliderControl.setValue(%value); + %this.sliderControl.onDragComplete(); +} + +function guiMatORMSliderFieldSlider::onDragComplete( %this ) +{ + %value = %this.getValue(); + %this.textControl.setText(%value); + + if(getSubStr(%this.fieldName, 0, 1) $= "$") + { + //ah, a global var, just do it straight, then + %setCommand = %this.fieldName @ " = \"" @ %value @ "\";"; + } + else if(isObject(%this.ownerObject)) + { + //regular variable + %setCommand = %this.ownerObject @ "." @ %this.fieldName @ " = \"" @ %value @ "\";"; + } + else if(%this.callbackName !$= "") + { + %setCommand = %this.callbackName @ "(\"" @ %this.fieldName @ "\",\"" @ %value @"\");"; + } + + eval(%setCommand); +} + +function guiMatORMSliderFieldSlider::onMouseDragged(%this) +{ + %this.onDragComplete(); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/bakeCompositeButtonFieldType.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/bakeCompositeButtonFieldType.tscript new file mode 100644 index 000000000..dcb0d24e8 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/bakeCompositeButtonFieldType.tscript @@ -0,0 +1,31 @@ +function GuiInspectorGroup::buildBakeCompositeButtonField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %fieldCtrl = %this.createInspectorField(); + + %extent = %this.stack.getExtent(); + + %width = mRound(%extent/2); + + %button = new GuiButtonCtrl() { + canSaveDynamicFields = "0"; + Profile = "ToolsGuiButtonProfile"; + HorizSizing = "width"; + VertSizing = "bottom"; + Position = "16 3"; + Extent = %width SPC 18; + MinExtent = "8 2"; + canSave = "0"; + Visible = "1"; + hovertime = "100"; + tooltip = ""; //%tooltip; + tooltipProfile = "EditorToolTipProfile"; + text = "Bake"; + maxLength = "1024"; + command = "MaterialEditorGui.saveCompositeMap();"; + }; + + %fieldCtrl.setCaption(%fieldLabel); + %fieldCtrl.setEditControl(%button); + + %this.addInspectorField(%fieldCtrl); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialAnimationFieldTypes.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialAnimationFieldTypes.tscript new file mode 100644 index 000000000..80d458ecb --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialAnimationFieldTypes.tscript @@ -0,0 +1,939 @@ +function GuiInspectorGroup::buildMaterialRotAnimationField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %container = new GuiContainer() + { + profile="inspectorStyleRolloutInnerProfile"; + isContainer = "1"; + position = "-1 120"; + Extent = 300 SPC 100; + HorizSizing = "width"; + + new GuiCheckboxCtrl() { + canSaveDynamicFields = "0"; + internalName = "RotationAnimation"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiInspectorCheckBoxTitleProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "4 3"; + Extent = "200 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "MaterialEditorGui.updateAnimationFlags();"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + text = " Rotation Animation"; + maxLength = "1024"; + }; + + new GuiControl(){ + class = "AggregateControl"; + position = "0 29"; + Extent = "290 20"; + HorizSizing = "width"; + internalName = "RotAnimAggCtrl"; + + new GuiTextCtrl(){ // u + profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "11 1"; + Extent = "12 16"; + text = "U"; + }; + + new GuiSliderCtrl() { // u + Profile = "ToolsGuiSliderProfile"; + internalName = "RotationSliderU"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "25 2"; + Extent = "180 15"; + Command = "MaterialEditorGui.updateRotationOffset(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationOffset(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Change U Scroll Direction"; + hovertime = "1000"; + range = "-1 0"; + ticks = "1"; + value = "-0.5"; + }; + new GuiTextEditCtrl(){ // u + internalName = "RotationTextEditU"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "210 0"; + Extent = "34 18"; + text = "0"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl);"; + Profile = "ToolsGuiTextEditProfile"; + }; + }; + + new GuiControl() { + class = "AggregateControl"; + position = "0 50"; + Extent = "290 20"; + HorizSizing = "width"; + + new GuiTextCtrl(){ // v + profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "11 1"; + Extent = "12 16"; + text = "V"; + }; + + new GuiSliderCtrl() { // v + Profile = "ToolsGuiSliderProfile"; + internalName = "RotationSliderV"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "25 2"; + Extent = "180 15"; + Command = "MaterialEditorGui.updateRotationOffset(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationOffset(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Change V Scroll Direction"; + hovertime = "1000"; + range = "-1 0"; + ticks = "1"; + value = "-0.5"; + }; + + new GuiTextEditCtrl(){ // v + internalName = "RotationTextEditV"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "210 0"; + Extent = "34 18"; + text = "0"; + Profile = "ToolsGuiTextEditProfile"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationOffset();"; + }; + }; + new GuiTextCtrl(){ // Pivot Point + HorizSizing = "left"; + VertSizing = "bottom"; + position = "211 12"; + Extent = "34 16"; + text = "Pivot"; + profile = "ToolsGuiTextProfile"; + }; + new GuiBitmapCtrl(){ + HorizSizing = "left"; + VertSizing = "bottom"; + position = "248 20"; + Extent = "48 48"; + isContainer = true; + bitmapAsset=""; + + new GuiBitmapCtrl(){ + HorizSizing = "right"; + VertSizing = "bottom"; + position = "0 0"; + Extent = "48 48"; + bitmapAsset="ToolsModule:cubemapBtnBorder_n_image"; + }; + + new GuiBitmapCtrl(){ //horizontal bar + internalName = "RotationCrosshair"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "20 20"; + Extent = "7 7"; + MinExtent = "0 0"; + bitmapAsset="ToolsModule:crosshair_blue_image"; + }; + }; + + new GuiControl() { + class = "AggregateControl"; + position = "0 75"; + Extent = "300 35"; + HorizSizing = "width"; + + new GuiTextCtrl(){ // Speed + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "11 0"; + Extent = "40 16"; + text = "Speed"; + }; + + new GuiSliderCtrl() { + canSaveDynamicFields = "0"; + internalName = "RotationSpeedSlider"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiSliderProfile"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "58 3"; + Extent = "148 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "MaterialEditorGui.updateRotationSpeed(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationSpeed(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Scrolling Speed"; + hovertime = "1000"; + range = "-10 10"; + ticks = "1"; + value = "0"; + }; + + new GuiTextEditCtrl() { + canSaveDynamicFields = "0"; + internalName = "RotationSpeedTextEdit"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "210 1"; + Extent = "34 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateRotationSpeed();"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + text = "0"; + maxLength = "1024"; + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + }; + new GuiTextCtrl(){ // space + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "0 20"; + Extent = "300 20"; + text = " "; + }; + }; + }; + + %container.resize(0,0,%this-->stack.extent.x, 100); + + %this-->stack.add(%container); +} + +function MaterialEditorGui::updateRotationOffset(%this, %isSlider, %onMouseUp) +{ + %layer = MaterialEditorGui.currentLayer; + %X = MaterialEditorGuiWindow-->RotationTextEditU.getText(); + %Y = MaterialEditorGuiWindow-->RotationTextEditV.getText(); + MaterialEditorPropertiesWindow-->RotationCrosshair.setPosition(45*mAbs(%X)-2, 45*mAbs(%Y)-2); + + MaterialEditorGui.updateActiveMaterial("rotPivotOffset[" @ %layer @ "]", %X SPC %Y,%isSlider,%onMouseUp); +} + +function MaterialEditorGui::updateRotationSpeed(%this, %isSlider, %onMouseUp) +{ + %layer = MaterialEditorGui.currentLayer; + %speed = MaterialEditorGuiWindow-->RotationSpeedTextEdit.getText(); + MaterialEditorGui.updateActiveMaterial("rotSpeed[" @ %layer @ "]",%speed,%isSlider,%onMouseUp); +} + +function GuiInspectorGroup::buildMaterialScrollAnimationField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %container = new GuiContainer(){ // Scroll Animation Properties + profile="inspectorStyleRolloutInnerProfile"; + isContainer = "1"; + position = "-1 240"; + Extent = "300 105"; + HorizSizing = "width"; + + new GuiBitmapCtrl(){ + position = "0 5"; + extent ="300 2"; + HorizSizing = "width"; + bitmapAsset ="ToolsModule:separator_v_image"; + }; + + new GuiCheckboxCtrl() { + canSaveDynamicFields = "0"; + internalName = "ScrollAnimation"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiInspectorCheckBoxTitleProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "4 10"; + Extent = "200 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + Command = "MaterialEditorGui.updateAnimationFlags();"; + text = " Scroll Animation"; + maxLength = "1024"; + }; + + new GuiControl(){ + class = "AggregateControl"; + position = "0 29"; + Extent = "290 20"; + HorizSizing = "width"; + + new GuiTextCtrl(){ // u + profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "11 1"; + Extent = "12 16"; + text = "U"; + }; + + new GuiSliderCtrl() { // u + Profile = "ToolsGuiSliderProfile"; + internalName = "ScrollSliderU"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "25 2"; + Extent = "180 15"; + Command = "MaterialEditorGui.updateScrollOffset(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollOffset(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Change U Scroll Direction"; + hovertime = "1000"; + range = "-1 1"; + ticks = "1"; + value = "0"; + }; + new GuiTextEditCtrl(){ // u + internalName = "ScrollTextEditU"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "210 0"; + Extent = "34 18"; + text = "0"; + Profile = "ToolsGuiTextEditProfile"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollOffset();"; + }; + }; + + new GuiControl() { + class = "AggregateControl"; + position = "0 50"; + Extent = "290 20"; + HorizSizing = "width"; + + new GuiTextCtrl(){ // v + profile = "ToolsGuiTextProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "11 1"; + Extent = "12 16"; + text = "V"; + }; + + new GuiSliderCtrl() { // v + Profile = "ToolsGuiSliderProfile"; + internalName = "ScrollSliderV"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "25 2"; + Extent = "180 15"; + Command = "MaterialEditorGui.updateScrollOffset(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollOffset(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Change V Scroll Direction"; + hovertime = "1000"; + range = "-1 1"; + ticks = "1"; + value = "0"; + }; + new GuiTextEditCtrl(){ // v + internalName = "ScrollTextEditV"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "210 0"; + Extent = "34 18"; + text = "0"; + Profile = "ToolsGuiTextEditProfile"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollOffset();"; + }; + }; + new GuiTextCtrl(){ // Direction Offset + HorizSizing = "left"; + VertSizing = "bottom"; + position = "211 12"; + Extent = "34 16"; + text = "Offset"; + profile = "ToolsGuiTextProfile"; + }; + new GuiBitmapCtrl(){ + HorizSizing = "left"; + VertSizing = "bottom"; + position = "248 20"; + Extent = "48 48"; + isContainer = true; + bitmapAsset=""; + + new GuiBitmapCtrl(){ + HorizSizing = "right"; + VertSizing = "bottom"; + position = "0 0"; + Extent = "48 48"; + bitmapAsset="ToolsModule:cubemapBtnBorder_n_image"; + }; + new GuiBitmapCtrl(){ //vertical bar + HorizSizing = "right"; + VertSizing = "bottom"; + position = "20 20"; + Extent = "7 7"; + MinExtent = "7 7"; + bitmapAsset="ToolsModule:crosshair_image"; + }; + new GuiBitmapCtrl(){ //horizontal bar + internalName = "ScrollCrosshair"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "20 20"; + Extent = "7 7"; + MinExtent = "0 0"; + bitmapAsset="ToolsModule:crosshair_blue_image"; + }; + }; + + new GuiControl() { + class = "AggregateControl"; + position = "0 75"; + Extent = "300 35"; + HorizSizing = "width"; + + new GuiTextCtrl(){ // Speed + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "11 0"; + Extent = "40 16"; + text = "Speed"; + }; + + new GuiSliderCtrl() { + canSaveDynamicFields = "0"; + internalName = "ScrollSpeedSlider"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiSliderProfile"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "58 3"; + Extent = "148 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "MaterialEditorGui.updateScrollSpeed(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollSpeed(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Scrolling Speed"; + hovertime = "1000"; + range = "0 10"; + ticks = "0"; + value = "0"; + }; + + new GuiTextEditCtrl() { + canSaveDynamicFields = "0"; + internalName = "ScrollSpeedTextEdit"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "210 1"; + Extent = "34 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl);MaterialEditorGui.updateScrollSpeed();"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + text = "0"; + maxLength = "1024"; + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + }; + new GuiTextCtrl(){ // space + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "0 20"; + Extent = "300 20"; + text = " "; + }; + }; + }; + + %this-->stack.add(%container); +} + +function MaterialEditorGui::updateScrollOffset(%this, %isSlider, %onMouseUp) +{ + %layer = MaterialEditorGui.currentLayer; + %X = MaterialEditorGuiWindow-->ScrollTextEditU.getText(); + %Y = MaterialEditorGuiWindow-->ScrollTextEditV.getText(); + MaterialEditorGuiWindow-->ScrollCrosshair.setPosition( -(23 * %X)+20, -(23 * %Y)+20); + + MaterialEditorGui.updateActiveMaterial("scrollDir[" @ %layer @ "]",%X SPC %Y,%isSlider,%onMouseUp); +} + +function MaterialEditorGui::updateScrollSpeed(%this, %isSlider, %onMouseUp) +{ + %layer = MaterialEditorGui.currentLayer; + %speed = MaterialEditorGuiWindow-->ScrollSpeedTextEdit.getText(); + MaterialEditorGui.updateActiveMaterial("scrollSpeed[" @ %layer @ "]",%speed,%isSlider,%onMouseUp); +} + +function GuiInspectorGroup::buildMaterialWaveAnimationField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %container = new GuiContainer(){ // Wave Animation Properties + profile="inspectorStyleRolloutInnerProfile"; + isContainer = "1"; + position = "-1 360"; + Extent = "300 85"; + HorizSizing = "width"; + + new GuiBitmapCtrl(){ + position = "0 0"; + extent ="300 2"; + HorizSizing = "width"; + bitmapAsset ="ToolsModule:separator_v_image"; + }; + + new GuiCheckboxCtrl() { + Profile = "ToolsGuiInspectorCheckBoxTitleProfile"; + internalName = "WaveAnimation"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "4 5"; + Extent = "200 16"; + MinExtent = "8 2"; + text = " Wave Animation"; + Command = "MaterialEditorGui.updateAnimationFlags();"; + groupNum = "-1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + }; + + new GuiCheckboxCtrl() { + Profile = "ToolsGuiCheckBoxProfile"; + internalName = "ScaleAnimation"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "180 24"; + Extent = "55 16"; + MinExtent = "8 2"; + text = " Scale"; + Command = "MaterialEditorGui.updateAnimationFlags();"; + groupNum = "-1"; + tooltipprofile = "ToolsGuiToolTipProfile"; + }; + + new GuiTextCtrl() { + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "1 22"; + Extent = "100 16"; + text = " Wave Type"; + }; + new GuiContainer(){ // Wave Radio Button container + profile = "ToolsGuiDefaultProfile"; + internalName = "WaveButtonContainer"; + position = "120 24"; + Extent = "49 13"; + isContainer = "1"; + + new GuiBitmapButtonCtrl(){ + profile = "ToolsGuiDefaultProfile"; + buttonType = "RadioButton"; + position = "1 0"; + Extent = "13 13"; + bitmapAsset = "ToolsModule:wav_sine_n_image"; + command = "MaterialEditorGui.updateWaveType();"; + tooltip="Sine Wave"; + hovertime = "1000"; + groupNum = "0"; + waveType = "Sin"; + tooltipprofile = "ToolsGuiToolTipProfile"; + }; + new GuiBitmapButtonCtrl(){ + profile = "ToolsGuiDefaultProfile"; + buttonType = "RadioButton"; + position = "17 0"; + Extent = "13 13"; + bitmapAsset = "ToolsModule:wav_triangle_n_image"; + command = "MaterialEditorGui.updateWaveType();"; + tooltip="Triangle Wave"; + hovertime = "1000"; + groupNum = "0"; + waveType = "Triangle"; + tooltipprofile = "ToolsGuiToolTipProfile"; + }; + new GuiBitmapButtonCtrl(){ + profile = "ToolsGuiDefaultProfile"; + buttonType = "RadioButton"; + position = "33 0"; + Extent = "13 13"; + bitmapAsset = "ToolsModule:wav_square_n_image"; + command = "MaterialEditorGui.updateWaveType();"; + tooltip="Square Wave"; + hovertime = "1000"; + groupNum = "0"; + waveType = "Square"; + tooltipprofile = "ToolsGuiToolTipProfile"; + }; + }; + + new GuiControl() { + class = "AggregateControl"; + position = "0 61"; + Extent = "300 20"; + HorizSizing = "width"; + + + new GuiTextCtrl() { + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "1 2"; + Extent = "100 16"; + text = "Frequency"; + }; + + new GuiTextEditCtrl() { // frequence + canSaveDynamicFields = "0"; + internalName = "WaveTextEditFreq"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "260 1"; + Extent = "34 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateWaveFreq();"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + text = "0"; + maxLength = "1024"; + historySize = "0"; + password = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + }; + new GuiSliderCtrl() { // freqency + canSaveDynamicFields = "0"; + internalName = "WaveSliderFreq"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiSliderProfile"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "120 4"; + Extent = "137 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "MaterialEditorGui.updateWaveFreq(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateWaveFreq(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Changes Wave Frequency"; + hovertime = "1000"; + range = "0 10"; + ticks = "9"; + value = "0"; + }; + + }; + + new GuiControl() { + class = "AggregateControl"; + position = "0 40"; + Extent = "300 20"; + HorizSizing = "width"; + + new GuiTextCtrl() { + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "1 2"; + Extent = "100 16"; + text = "Amplitude"; + }; + + new GuiTextEditCtrl() { // amplitude + Profile = "ToolsGuiTextEditProfile"; + internalName = "WaveTextEditAmp"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "260 1"; + Extent = "34 18"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateWaveAmp();"; + hovertime = "1000"; + text = "0"; + }; + new GuiSliderCtrl() { // amplitude + canSaveDynamicFields = "0"; + internalName = "WaveSliderAmp"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiSliderProfile"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "120 4"; + Extent = "137 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "MaterialEditorGui.updateWaveAmp(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateWaveAmp(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Changes Wave Amplitude"; + hovertime = "1000"; + range = "0 1"; + ticks = "1"; + value = "0"; + }; + + }; + }; + + %this-->stack.add(%container); +} + +function MaterialEditorGui::updateWaveType(%this) +{ + for( %radioButton = 0; %radioButton < MaterialEditorGuiWindow-->WaveButtonContainer.getCount(); %radioButton++ ) + { + if( MaterialEditorGuiWindow-->WaveButtonContainer.getObject(%radioButton).getValue() == 1 ) + %type = MaterialEditorGuiWindow-->WaveButtonContainer.getObject(%radioButton).waveType; + } + + %layer = MaterialEditorGui.currentLayer; + MaterialEditorGui.updateActiveMaterial("waveType[" @ %layer @ "]", %type); +} + +function MaterialEditorGui::updateWaveAmp(%this, %isSlider, %onMouseUp) +{ + %layer = MaterialEditorGui.currentLayer; + %amp = MaterialEditorGuiWindow-->WaveTextEditAmp.getText(); + MaterialEditorGui.updateActiveMaterial("waveAmp[" @ %layer @ "]", %amp, %isSlider, %onMouseUp); +} + +function MaterialEditorGui::updateWaveFreq(%this, %isSlider, %onMouseUp) +{ + %layer = MaterialEditorGui.currentLayer; + %freq = MaterialEditorGuiWindow-->WaveTextEditFreq.getText(); + MaterialEditorGui.updateActiveMaterial("waveFreq[" @ %layer @ "]", %freq, %isSlider, %onMouseUp); +} + +function GuiInspectorGroup::buildMaterialSequenceAnimationField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %callbackName, %ownerObj) +{ + %container = new GuiContainer(){ // image Sequence Animation Properties + profile="inspectorStyleRolloutInnerProfile"; + isContainer = "1"; + position = "-1 480"; + Extent = "300 80"; + HorizSizing = "width"; + + new GuiBitmapCtrl(){ + position = "0 5"; + extent ="300 2"; + HorizSizing = "width"; + bitmapAsset ="ToolsModule:separator_v_image"; + }; + + new GuiCheckboxCtrl() { + Profile = "ToolsGuiInspectorCheckBoxTitleProfile"; + internalName = "SequenceAnimation"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "4 10"; + Extent = "200 16"; + MinExtent = "8 2"; + text = " Image Sequence"; + Command = "MaterialEditorGui.updateAnimationFlags();"; + groupNum = "-1"; + }; + + + new GuiControl() { + class = "AggregateControl"; + position = "0 28"; + Extent = "300 20"; + HorizSizing = "width"; + + new GuiTextCtrl() { + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "1 2"; + Extent = "100 16"; + text = "Frames / Sec"; + }; + + new GuiTextEditCtrl() { + canSaveDynamicFields = "0"; + internalName = "SequenceTextEditFPS"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiTextEditProfile"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "260 1"; + Extent = "34 18"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateSequenceFPS();"; + hovertime = "1000"; + Margin = "0 0 0 0"; + Padding = "0 0 0 0"; + AnchorTop = "1"; + AnchorBottom = "0"; + AnchorLeft = "1"; + AnchorRight = "0"; + text = "0"; + maxLength = "1024"; + }; + new GuiSliderCtrl() { + canSaveDynamicFields = "0"; + internalName = "SequenceSliderFPS"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiSliderProfile"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "120 4"; + Extent = "137 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "MaterialEditorGui.updateSequenceFPS(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateSequenceFPS(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "How many frames to display per second."; + hovertime = "1000"; + range = "0 30"; + ticks = "5"; + value = "0"; + }; + }; + + new GuiControl() { + class = "AggregateControl"; + position = "0 49"; + Extent = "300 20"; + HorizSizing = "width"; + + new GuiTextCtrl() { + profile = "ToolsGuiTextRightProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "1 2"; + Extent = "100 16"; + text = "Frames"; + }; + + new GuiTextEditCtrl() { // size + Profile = "ToolsGuiTextEditProfile"; + internalName = "SequenceTextEditSSS"; + HorizSizing = "left"; + VertSizing = "bottom"; + position = "260 1"; + Extent = "34 18"; + Command = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateSequenceSSS();"; + hovertime = "1000"; + text = "0"; + }; + new GuiSliderCtrl() { //size + canSaveDynamicFields = "0"; + internalName = "SequenceSliderSSS"; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiSliderProfile"; + HorizSizing = "width"; + VertSizing = "bottom"; + position = "120 4"; + Extent = "137 16"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "MaterialEditorGui.updateSequenceSSS(true, true);"; + AltCommand = "$ThisControl.getParent().updateFromChild($ThisControl); MaterialEditorGui.updateSequenceSSS(true, false);"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "How many frames in the sequence."; + hovertime = "1000"; + range = "0 100"; + ticks = "9"; + value = "0"; + }; + }; + }; + + %this-->stack.add(%container); +} + +function MaterialEditorGui::updateSequenceFPS(%this, %isSlider, %onMouseUp) +{ + %layer = MaterialEditorGui.currentLayer; + %fps = MaterialEditorGuiWindow-->SequenceTextEditFPS.getText(); + MaterialEditorGui.updateActiveMaterial("sequenceFramePerSec[" @ %layer @ "]", %fps, %isSlider, %onMouseUp); +} + +function MaterialEditorGui::updateSequenceSSS(%this, %isSlider, %onMouseUp) +{ + %layer = MaterialEditorGui.currentLayer; + %sss = 1 / MaterialEditorGuiWindow-->SequenceTextEditSSS.getText(); + MaterialEditorGui.updateActiveMaterial("sequenceSegmentSize[" @ %layer @ "]", %sss, %isSlider, %onMouseUp); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript index 7dca80cba..897e81074 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript @@ -77,52 +77,6 @@ function MaterialEditorGui::open(%this) // These guis are also pushed onto Canvas, which means they shouldn't be parented // by editorgui materialSelector.setVisible(0); - matEdSaveDialog.setVisible(0); - - MaterialEditorPropertiesWindow-->matEd_cubemapEditBtn.setVisible(0); - - //Setup our dropdown menu contents. - //Blending Modes - MaterialEditorPropertiesWindow-->blendingTypePopUp.clear(); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(None,0); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(preMul,1); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(LerpAlpha,2); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(Mul,3); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(Add,4); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(AddAlpha,5); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(Sub,6); - MaterialEditorPropertiesWindow-->blendingTypePopUp.setSelected( 0, false ); - - //Reflection Types - MaterialEditorPropertiesWindow-->reflectionTypePopUp.clear(); - MaterialEditorPropertiesWindow-->reflectionTypePopUp.add("None",0); - MaterialEditorPropertiesWindow-->reflectionTypePopUp.add("cubemap",1); - MaterialEditorPropertiesWindow-->reflectionTypePopUp.setSelected( 0, false ); - - //Sounds - MaterialEditorPropertiesWindow-->footstepSoundPopup.clear(); - MaterialEditorPropertiesWindow-->impactSoundPopup.clear(); - - %sounds = "" TAB "" TAB "" TAB "" TAB ""; // Default sounds - - %assetQuery = new AssetQuery(); - AssetDatabase.findAssetType(%assetQuery, "SoundAsset"); - - %count = %assetQuery.getCount(); - // Get custom sound assets - for(%i=0; %i < %count; %i++) - { - %assetId = %assetQuery.getAsset(%i); - %sounds = %sounds TAB %assetId; - } - - %count = getFieldCount(%sounds); - for (%i = 0; %i < %count; %i++) - { - %name = getField(%sounds, %i); - MaterialEditorPropertiesWindow-->footstepSoundPopup.add(%name); - MaterialEditorPropertiesWindow-->impactSoundPopup.add(%name); - } //Preview Models matEd_quickPreview_Popup.clear(); @@ -135,15 +89,14 @@ function MaterialEditorGui::open(%this) matEd_quickPreview_Popup.setSelected( 0, false ); matEd_quickPreview_Popup.selected = matEd_quickPreview_Popup.getText(); - MaterialEditorPropertiesWindow-->MaterialLayerCtrl.clear(); - MaterialEditorPropertiesWindow-->MaterialLayerCtrl.add("Layer 0",0); - MaterialEditorPropertiesWindow-->MaterialLayerCtrl.add("Layer 1",1); - MaterialEditorPropertiesWindow-->MaterialLayerCtrl.add("Layer 2",2); - MaterialEditorPropertiesWindow-->MaterialLayerCtrl.add("Layer 3",3); - MaterialEditorPropertiesWindow-->MaterialLayerCtrl.setSelected( 0, false ); + MaterialEditorLayerSelector.clear(); + MaterialEditorLayerSelector.add("Layer 0",0); + MaterialEditorLayerSelector.add("Layer 1",1); + MaterialEditorLayerSelector.add("Layer 2",2); + MaterialEditorLayerSelector.add("Layer 3",3); + MaterialEditorLayerSelector.setSelected( 0, false ); //Sift through the RootGroup and find all loaded material items. - MaterialEditorGui.updateAllFields(); MaterialEditorGui.updatePreviewObject(); // If no selected object; go to material mode. And edit the last selected material @@ -156,6 +109,8 @@ function MaterialEditorGui::open(%this) else MaterialEditorGui.prepareActiveMaterial( "", true ); + MaterialEditorGui.refreshSchedule = MaterialEditorGui.schedule(32, "guiSync", materialEd_previewMaterial); + MaterialEditorGui.preventUndo = false; } @@ -254,8 +209,7 @@ function MaterialEditorGui::selectMaterialAsset(%this, %assetId) function MaterialEditorGui::onWake(%this) { - %fixedWindow = MaterialEditorPreviewWindow; - %fluidWindow = MaterialEditorPropertiesWindow; + %fixedWindow = MaterialEditorGuiWindow; if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1) { @@ -282,30 +236,14 @@ function MaterialEditorGui::maxSize(%this, %window) // prevent onResize after a resize %this.resizing = false; - %fixedWindow = MaterialEditorPreviewWindow; - %fluidWindow = MaterialEditorPropertiesWindow; + %fluidWindow = MaterialEditorGuiWindow; %offset = -1; // tweak the vertical offset so that it aligns neatly - %top = EditorGuiToolbar.extent.y + %offset; - %bottom = %top + 59; - %maxHeight = Canvas.extent.y - %top - %bottom; - - // --- Fixed window (top) ------------------------------------------------ - // put it back if it moved - %fixedWindow.position.x = Canvas.extent.x - %fixedWindow.extent.x; - %fixedWindow.position.y = %top; - - // don't go beyond the canvas - if(%fixedWindow.extent.y > %maxHeight) - %fixedWindow.extent.y = %maxHeight - %fluidWindow.extent.y; + %toolbarGlobalPos = EditorGuiToolbar.getGlobalPosition(); + %top = %toolbarGlobalPos.y + EditorGuiToolbar.extent.y + %offset; + %bottom = %top + 15; - %position = %fixedWindow.position.x SPC %fixedWindow.position.y; - %extent = %window.extent.x SPC %fixedWindow.extent.y; - %fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y); - - // --- Fluid window (bottom) --------------------------------------------- - // position is relative to the top window - %position = %fixedWindow.position.x SPC %fixedWindow.extent.y + %top; - %extent = %window.extent.x SPC Canvas.extent.y - %fixedWindow.extent.y - %bottom; + %position = Canvas.extent.x - %fluidWindow.extent.x SPC %top; + %extent = %window.extent.x SPC Canvas.extent.y - EWorldEditorStatusBarInfo.extent.y - %bottom; %fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y); // --- AssetBrowser window ---------------------------------------------- @@ -334,26 +272,10 @@ function MaterialEditorGui::maxSize(%this, %window) windowConsoleControl.resize(0, %consolePosY, %consoleWidth, %consoleHeight); } } - } + } } -function MaterialEditorPreviewWindow::onMouseDragged(%this) -{ - %parent = MaterialEditorGui; - - if(%parent.panelHidden == true) - { - %parent.showSidePanel(); - } - - if(%parent.resizing == false && %parent.docked == true) - { - %parent.resizing = true; - %parent.maxSize(%this); - } -} - -function MaterialEditorPropertiesWindow::onMouseDragged(%this) +function MaterialEditorGuiWindow::onMouseDragged(%this) { %parent = MaterialEditorGui; @@ -371,8 +293,8 @@ function MaterialEditorPropertiesWindow::onMouseDragged(%this) function MaterialEditorGui::onResize(%this, %newPosition, %newExtent) { - // Window to focus on (mostly the fluid window) - %window = MaterialEditorPreviewWindow; + // Window to focus on + %window = MaterialEditorGuiWindow; if(%window.panelHidden == true) { @@ -383,33 +305,28 @@ function MaterialEditorGui::onResize(%this, %newPosition, %newExtent) { // Only resize once %this.resizing = true; - %this.maxSize(%window); + %this.maxSize(); } } function MaterialEditorGui::dockSidePanel() { %parent = MaterialEditorGui; - %fixedWindow = MaterialEditorPreviewWindow; - %fluidWindow = MaterialEditorPropertiesWindow; + %fixedWindow = MaterialEditorGuiWindow; if(%parent.docked == true) return; // Move and resize the window(s) %parent.resizing = true; - %parent.maxSize(%fluidWindow); + %parent.maxSize(); %parent.docked = true; - %fluidWindow.onMouseDragged(); // Lock the windows in place %fixedWindow.canCollapse = "0"; %fixedWindow.canMove = "0"; - %fluidWindow.canCollapse = "0"; - %fluidWindow.canMove = "0"; - MaterialEditorGui_UnDockBtn.Visible = "1"; MaterialEditorGui_DockBtn.Visible = "0"; @@ -420,8 +337,7 @@ function MaterialEditorGui::dockSidePanel() function MaterialEditorGui::releaseSidePanel() { %parent = MaterialEditorGui; - %fixedWindow = MaterialEditorPreviewWindow; - %fluidWindow = MaterialEditorPropertiesWindow; + %fixedWindow = MaterialEditorGuiWindow; if(%parent.docked == false) return; @@ -430,9 +346,6 @@ function MaterialEditorGui::releaseSidePanel() %fixedWindow.canCollapse = "1"; %fixedWindow.canMove = "1"; - %fluidWindow.canCollapse = "1"; - %fluidWindow.canMove = "1"; - MaterialEditorGui_UnDockBtn.Visible = "0"; MaterialEditorGui_DockBtn.Visible = "1"; @@ -443,10 +356,6 @@ function MaterialEditorGui::releaseSidePanel() %position = %fixedWindow.position.x - 6 SPC %fixedWindow.position.y + 6; %extent = %fixedWindow.extent.x SPC %fixedWindow.extent.y; %fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y); - - %position = %fluidWindow.position.x - 6 SPC %fluidWindow.position.y + 6; - %extent = %fluidWindow.extent.x SPC %fluidWindow.extent.y - 12; - %fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y); %parent.docked = false; %parent.resizing = false; @@ -455,31 +364,24 @@ function MaterialEditorGui::releaseSidePanel() function MaterialEditorGui::hideSidePanel() { %parent = MaterialEditorGui; - %fixedWindow = MaterialEditorPreviewWindow; - %fluidWindow = MaterialEditorPropertiesWindow; + %fixedWindow = MaterialEditorGuiWindow; MaterialEditorGui_showBtn.Visible = "1"; MaterialEditorGui_hideBtn.Visible = "0"; // hide the content of the panels %fixedWindow.titleText = %fixedWindow.text; - %fluidWindow.titleText = %fluidWindow.text; %fixedWindow.text = ""; matEd_previewPanel.Visible = "0"; matEd_quickPreview_Popup.Visible = "0"; - %fluidWindow.text = ""; MaterialEditorGuiContent.Visible = "0"; // Let's do a resize so that the panel is collapsed to the side %position = Canvas.extent.x - 24 SPC %fixedWindow.position.y; %extent = %fixedWindow.extent.x SPC %fixedWindow.extent.y; %fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y); - - %position = Canvas.extent.x - 24 SPC %fluidWindow.position.y; - %extent = %fluidWindow.extent.x SPC %fluidWindow.extent.y; - %fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y); %parent.panelHidden = true; } @@ -487,8 +389,7 @@ function MaterialEditorGui::hideSidePanel() function MaterialEditorGui::showSidePanel() { %parent = MaterialEditorGui; - %fixedWindow = MaterialEditorPreviewWindow; - %fluidWindow = MaterialEditorPropertiesWindow; + %fixedWindow = MaterialEditorGuiWindow; MaterialEditorGui_showBtn.Visible = "0"; MaterialEditorGui_hideBtn.Visible = "1"; @@ -499,11 +400,10 @@ function MaterialEditorGui::showSidePanel() matEd_previewPanel.Visible = "1"; matEd_quickPreview_Popup.Visible = "1"; - %fluidWindow.text = %fluidWindow.titleText; MaterialEditorGuiContent.Visible = "1"; %parent.resizing = true; - %parent.maxSize(%fluidWindow); + %parent.maxSize(); %parent.panelHidden = false; } @@ -513,6 +413,7 @@ function MaterialEditorGui::showSidePanel() //============================================================================== // SubMaterial(Material Target) -- Supports different ways to grab the +// SubMaterial(Material Target) -- Supports different ways to grab the // material from the dropdown list. We're here either because- // 1. We have switched over from another editor with an object locked in the // $Tools::materialEditorList variable @@ -659,11 +560,6 @@ function MaterialEditorGui::prepareActiveObject( %this, %override ) //============================================================================== // Helper functions to help create categories and manage category lists -function MaterialEditorGui::updateAllFields(%this) -{ - matEd_cubemapEd_availableCubemapList.clear(); -} - function MaterialEditorGui::updatePreviewObject(%this) { %newModel = matEd_quickPreview_Popup.getValue(); @@ -672,32 +568,32 @@ function MaterialEditorGui::updatePreviewObject(%this) { case "sphere": matEd_quickPreview_Popup.selected = %newModel; - matEd_previewObjectView.setModel("tools/materialEditor/gui/spherepreview.dts"); + matEd_previewObjectView.setModel("ToolsModule:spherepreview"); matEd_previewObjectView.setOrbitDistance(4); case "cube": matEd_quickPreview_Popup.selected = %newModel; - matEd_previewObjectView.setModel("tools/materialEditor/gui/cubepreview.dts"); + matEd_previewObjectView.setModel("ToolsModule:cubepreview"); matEd_previewObjectView.setOrbitDistance(5); case "pyramid": matEd_quickPreview_Popup.selected = %newModel; - matEd_previewObjectView.setModel("tools/materialEditor/gui/pyramidpreview.dts"); + matEd_previewObjectView.setModel("ToolsModule:pyramidpreview"); matEd_previewObjectView.setOrbitDistance(5); case "cylinder": matEd_quickPreview_Popup.selected = %newModel; - matEd_previewObjectView.setModel("tools/materialEditor/gui/cylinderpreview.dts"); + matEd_previewObjectView.setModel("ToolsModule:cylinderpreview"); matEd_previewObjectView.setOrbitDistance(4.2); case "torus": matEd_quickPreview_Popup.selected = %newModel; - matEd_previewObjectView.setModel("tools/materialEditor/gui/toruspreview.dts"); + matEd_previewObjectView.setModel("ToolsModule:toruspreview"); matEd_previewObjectView.setOrbitDistance(4.2); case "knot": matEd_quickPreview_Popup.selected = %newModel; - matEd_previewObjectView.setModel("tools/materialEditor/gui/torusknotpreview.dts"); + matEd_previewObjectView.setModel("ToolsModule:torusknotpreview"); } } @@ -765,7 +661,6 @@ function MaterialEditorGui::setActiveMaterial( %this, %material ) // Copy materials over to other references MaterialEditorGui.copyMaterials( MaterialEditorGui.currentMaterial, materialEd_previewMaterial ); MaterialEditorGui.copyMaterials( MaterialEditorGui.currentMaterial, notDirtyMaterial ); - MaterialEditorGui.guiSync( materialEd_previewMaterial ); // Necessary functionality in order to render correctly materialEd_previewMaterial.flush(); @@ -774,6 +669,11 @@ function MaterialEditorGui::setActiveMaterial( %this, %material ) MaterialEditorGui.currentMaterial.reload(); MaterialEditorGui.setMaterialNotDirty(); + + MaterialEditorPropInspector.groupFilters = "-General -Internal -Ungrouped -Editing -Object -Persistence -Dynamic Fields"; + + MaterialEditorPropInspector.inspect(materialEd_previewMaterial); + MaterialEditorGui.refreshSchedule = MaterialEditorGui.schedule(32, "guiSync", materialEd_previewMaterial ); } function MaterialEditorGui::isMatEditorMaterial(%this, %material) @@ -785,10 +685,7 @@ function MaterialEditorGui::isMatEditorMaterial(%this, %material) function MaterialEditorGui::setMaterialNotDirty(%this) { - %propertyText = ":: Material Editor - Properties"; - %previewText = ":: Material Editor - Preview"; - MaterialEditorPropertiesWindow.text = %propertyText; - MaterialEditorPreviewWindow.text = %previewText; + MaterialEditorGuiWindow.text = " :: Material Editor"; MaterialEditorGui.materialDirty = false; matEd_PersistMan.removeDirty(MaterialEditorGui.currentMaterial); @@ -796,10 +693,7 @@ function MaterialEditorGui::setMaterialNotDirty(%this) function MaterialEditorGui::setMaterialDirty(%this) { - %propertyText = ":: Material Editor - Properties *"; - %previewText = ":: Material Editor - Preview *"; - MaterialEditorPropertiesWindow.text = %propertyText; - MaterialEditorPreviewWindow.text = %previewText; + MaterialEditorGuiWindow.text = " :: Material Editor *"; MaterialEditorGui.materialDirty = true; @@ -1015,278 +909,178 @@ function MaterialEditorGui::copyMaterials( %this, %copyFrom, %copyTo) } -function MaterialEditorGui::guiSync( %this, %material ) +function MaterialEditorGui::guiSync( %this ) { %this.preventUndo = true; + //Setup our headers + %this-->selMaterialName.setText(MaterialEditorGui.currentMaterial.name); + %this-->selMaterialMapTo.setText(MaterialEditorGui.currentMaterial.mapTo); + %this-->selMaterialInheritFrom.setText(MaterialEditorGui.currentMaterial.inheritFrom); + if( MaterialEditorGui.currentMode $= "material" ) - { - MatEdMaterialMode-->selMaterialName.setText(MaterialEditorGui.currentMaterial.name); - MatEdMaterialMode-->selMaterialMapTo.setText(MaterialEditorGui.currentMaterial.mapTo); - } + SubMaterialSelector.setActive(false); else + SubMaterialSelector.setActive(true); + + //Streamline fields to our selected layer + MaterialEditorPropInspector.setForcedArrayIndex(MaterialEditorGui.currentLayer); + + // Dynamic elements + //do some presentation adjustments + %ormMapPresent = MaterialEditorGui.currentMaterial.ORMConfigMapAsset[MaterialEditorGui.currentLayer] !$= ""; + + %hasAOMap = MaterialEditorGui.currentMaterial.AOMapAsset[MaterialEditorGui.currentLayer] !$= ""; + %hasRoughMap = MaterialEditorGui.currentMaterial.RoughMapAsset[MaterialEditorGui.currentLayer] !$= ""; + %hasMetalMap = MaterialEditorGui.currentMaterial.MetalMapAsset[MaterialEditorGui.currentLayer] !$= ""; + + %group = MaterialEditorPropInspector.findExistentGroup("Light Influence Maps"); + if(isObject(%group)) { - if( MaterialEditorGui.currentObject.isMethod("getModelFile") ) + if(%ormMapPresent) { - %sourcePath = MaterialEditorGui.currentObject.getModelFile(); - if( %sourcePath !$= "" ) - { - MatEdTargetMode-->selMaterialMapTo.ToolTip = %sourcePath; - %sourceName = fileName(%sourcePath); - MatEdTargetMode-->selMaterialMapTo.setText(%sourceName); - MatEdTargetMode-->selMaterialName.setText(MaterialEditorGui.currentMaterial.name); - } + %group.hideField("isSRGb",false); + %group.hideField("AOMapAsset"); + %group.hideField("aoChan"); + %group.hideField("RoughMapAsset"); + %group.hideField("roughness"); + %group.hideField("roughnessChan"); + %group.hideField("MetalMapAsset"); + %group.hideField("metalness"); + %group.hideField("metalChan"); + %group.hideField("save"); } else { - %info = MaterialEditorGui.currentObject.getClassName(); - MatEdTargetMode-->selMaterialMapTo.ToolTip = %info; - MatEdTargetMode-->selMaterialMapTo.setText(%info); - MatEdTargetMode-->selMaterialName.setText(MaterialEditorGui.currentMaterial.name); + %group.hideField("isSRGb"); + + %hideSliders = (%hasAOMap || %hasRoughMap || %hasMetalMap); + + %group.hideField("aoChan", !%hideSliders); + + %group.hideField("roughness", %hideSliders); + %group.hideField("roughnessChan", !%hideSliders); + + %group.hideField("metalness", %hideSliders); + %group.hideField("metalChan", !%hideSliders); + + %group.hideField("AOMapAsset",false); + %group.hideField("RoughMapAsset",false); + %group.hideField("MetalMapAsset",false); } - } - - MaterialEditorPropertiesWindow-->alphaRefTextEdit.setText((%material).alphaRef); - MaterialEditorPropertiesWindow-->alphaRefSlider.setValue((%material).alphaRef); - MaterialEditorPropertiesWindow-->doubleSidedCheckBox.setValue((%material).doubleSided); - MaterialEditorPropertiesWindow-->transZWriteCheckBox.setValue((%material).translucentZWrite); - MaterialEditorPropertiesWindow-->alphaTestCheckBox.setValue((%material).alphaTest); - MaterialEditorPropertiesWindow-->castShadows.setValue((%material).castShadows); - MaterialEditorPropertiesWindow-->castDynamicShadows.setValue((%material).castDynamicShadows); - MaterialEditorPropertiesWindow-->translucentCheckbox.setValue((%material).translucent); - switch$((%material).translucentBlendOp) - { - case "None": %selectedNum = 0; - case "preMul": %selectedNum = 1; - case "LerpAlpha": %selectedNum = 2; - case "Mul": %selectedNum = 3; - case "": %selectedNum = 4; - case "AddAlpha": %selectedNum = 5; - case "Sub": %selectedNum = 6; - } - MaterialEditorPropertiesWindow-->blendingTypePopUp.setSelected(%selectedNum); - - if((%material).cubemap !$= "") - { - MaterialEditorPropertiesWindow-->matEd_cubemapEditBtn.setVisible(1); - MaterialEditorPropertiesWindow-->reflectionTypePopUp.setSelected(1); - } - else if((%material).dynamiccubemap) - { - MaterialEditorPropertiesWindow-->matEd_cubemapEditBtn.setVisible(0); - MaterialEditorPropertiesWindow-->reflectionTypePopUp.setSelected(2); - } - else if((%material).planarReflection) - { - MaterialEditorPropertiesWindow-->matEd_cubemapEditBtn.setVisible(0); - MaterialEditorPropertiesWindow-->reflectionTypePopUp.setSelected(3); - } - else - { - MaterialEditorPropertiesWindow-->matEd_cubemapEditBtn.setVisible(0); - MaterialEditorPropertiesWindow-->reflectionTypePopUp.setSelected(0); - } - - MaterialEditorPropertiesWindow-->effectColor0Swatch.color = (%material).effectColor[0]; - MaterialEditorPropertiesWindow-->effectColor1Swatch.color = (%material).effectColor[1]; - MaterialEditorPropertiesWindow-->showFootprintsCheckbox.setValue((%material).showFootprints); - MaterialEditorPropertiesWindow-->showDustCheckbox.setValue((%material).showDust); - MaterialEditorGui.updateSoundPopup("Footstep", (%material).footstepSoundId, (%material).customFootstepSound); - MaterialEditorGui.updateSoundPopup("Impact", (%material).impactSoundId, (%material).customImpactSound); - - //layer specific controls are located here - %layer = MaterialEditorGui.currentLayer; - - //Diffuse - %diffuseMap = (%material).getDiffuseMap(%layer); - %diffuseMapText = %diffuseMap !$= "" && %diffuseMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getDiffuseMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( %diffuseMapText ); - MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( getAssetPreviewImage(%diffuseMap) ); - - //Normal - %normalMap = (%material).getNormalMap(%layer); - %normalMapText = %normalMap !$= "" && %normalMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getNormalMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->normalMapNameText.setText( %normalMapText ); - MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( getAssetPreviewImage(%normalMap) ); - - //ORM Config - %ormMap = (%material).getORMConfigMap(%layer); - %hasOrmMap = (%ormMap !$= "" && %ormMap !$=$MaterialEditor::emptyMaterialImage); - %ormMapText = %hasOrmMap ? (%material).getORMConfigMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText(%ormMapText ); - MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( getAssetPreviewImage(%ormMap) ); - - //show or hide depending on if we have a map assigned here - MaterialEditorPropertiesWindow-->RoughnessTextEdit.setVisible(!%hasOrmMap); - MaterialEditorPropertiesWindow-->RoughnessSlider.setVisible(!%hasOrmMap); - MaterialEditorPropertiesWindow-->MetalnessTextEdit.setVisible(!%hasOrmMap); - MaterialEditorPropertiesWindow-->MetalnessSlider.setVisible(!%hasOrmMap); - - if(%hasOrmMap) - { - MaterialEditorPropertiesWindow-->isSRGBCheckbox.setValue((%material).isSRGB[%layer]); - MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setValue((%material).invertRoughness[%layer]); - } - else - { - MaterialEditorPropertiesWindow-->RoughnessSlider.setValue((%material).roughness, true); - MaterialEditorPropertiesWindow-->MetalnessSlider.setValue((%material).metalness, true); - } - MaterialEditorPropertiesWindow-->isSRGBCheckbox.setVisible(%hasOrmMap); - MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setVisible(%hasOrmMap); - - //AOMap - %aoMap = (%material).getAOMap(%layer); - %aoMapText = %aoMap !$= "" && %aoMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getAOMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->aoMapNameText.setText( %aoMapText ); - MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( getAssetPreviewImage(%aoMap) ); - - //RoughMap - %roughMap = (%material).getRoughMap(%layer); - %roughMapText = %roughMap !$= "" && %roughMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getRoughMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->roughMapNameText.setText( %roughMapText ); - MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( getAssetPreviewImage(%roughMap) ); - - //MetalMap - %metalMap = (%material).getMetalMap(%layer); - %metalMapText = %metalMap !$= "" && %metalMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getMetalMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->metalMapNameText.setText( %metalMapText ); - MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( getAssetPreviewImage(%metalMap) ); - - //GlowMap - %glowMap = (%material).getGlowMap(%layer); - %glowMapText = %glowMap !$= "" && %glowMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getGlowMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->glowMapNameText.setText( %glowMapText ); - MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( getAssetPreviewImage(%glowMap) ); + %group.refresh(); - //Overlay - %overlayMap = (%material).getOverlayMap(%layer); - %overlayMapText = %overlayMap !$= "" && %overlayMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getOverlayMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->overlayMapNameText.setText( %overlayMapText ); - MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( getAssetPreviewImage(%overlayMap) ); - - //Detail - %detailMap = (%material).getDetailMap(%layer); - %detailMapText = %detailMap !$= "" && %detailMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getDetailMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->detailMapNameText.setText( %detailMapText ); - MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( getAssetPreviewImage(%detailMap) ); - - //Detail Normal - %detailNormalMap = (%material).getDetailNormalMap(%layer); - %detailNormalMapText = %detailNormalMap !$= "" && %detailNormalMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getDetailNormalMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( %detailNormalMapText ); - MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( getAssetPreviewImage(%detailNormalMap) ); - - //Light - %lightMap = (%material).getLightMap(%layer); - %lightMapText = %lightMap !$= "" && %lightMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getLightMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->lightMapNameText.setText( %lightMapText ); - MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( getAssetPreviewImage(%lightMap) ); - - //Tone - %toneMap = (%material).getToneMap(%layer); - %toneMapText = %toneMap !$= "" && %toneMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getToneMapAsset(%layer) : "None"; - MaterialEditorPropertiesWindow-->toneMapNameText.setText( %toneMapText ); - MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( getAssetPreviewImage(%toneMap) ); - - MaterialEditorPropertiesWindow-->accuScaleTextEdit.setText((%material).accuScale[%layer]); - MaterialEditorPropertiesWindow-->accuScaleTextEdit.setText((%material).accuScale[%layer]); - MaterialEditorPropertiesWindow-->accuDirectionTextEdit.setText((%material).accuDirection[%layer]); - MaterialEditorPropertiesWindow-->accuDirectionTextEdit.setText((%material).accuDirection[%layer]); - MaterialEditorPropertiesWindow-->accuStrengthTextEdit.setText((%material).accuStrength[%layer]); - MaterialEditorPropertiesWindow-->accuStrengthTextEdit.setText((%material).accuStrength[%layer]); - MaterialEditorPropertiesWindow-->accuCoverageTextEdit.setText((%material).accuCoverage[%layer]); - MaterialEditorPropertiesWindow-->accuCoverageTextEdit.setText((%material).accuCoverage[%layer]); - MaterialEditorPropertiesWindow-->accuSpecularTextEdit.setText((%material).accuSpecular[%layer]); - MaterialEditorPropertiesWindow-->accuSpecularTextEdit.setText((%material).accuSpecular[%layer]); - - MaterialEditorPropertiesWindow-->detailScaleTextEdit.setText( getWord((%material).detailScale[%layer], 0) ); - MaterialEditorPropertiesWindow-->detailNormalStrengthTextEdit.setText( getWord((%material).detailNormalMapStrength[%layer], 0) ); - - MaterialEditorPropertiesWindow-->colorTintSwatch.color = (%material).diffuseColor[%layer]; - MaterialEditorPropertiesWindow-->specularColorSwatch.color = (%material).specular[%layer]; - - MaterialEditorPropertiesWindow-->glowMulTextEdit.setText((%material).glowMul[%layer]); - MaterialEditorPropertiesWindow-->glowMulSlider.setValue((%material).glowMul[%layer]); - MaterialEditorPropertiesWindow-->glowCheckbox.setValue((%material).glow[%layer]); - MaterialEditorPropertiesWindow-->receiveShadowsCheckbox.setValue((%material).receiveShadows[%layer]); - MaterialEditorPropertiesWindow-->ignoreLightingCheckbox.setValue((%material).ignoreLighting[%layer]); - MaterialEditorPropertiesWindow-->parallaxTextEdit.setText((%material).parallaxScale[%layer]); - MaterialEditorPropertiesWindow-->parallaxSlider.setValue((%material).parallaxScale[%layer]); - - MaterialEditorPropertiesWindow-->useAnisoCheckbox.setValue((%material).useAnisotropic[%layer]); - MaterialEditorPropertiesWindow-->vertLitCheckbox.setValue((%material).vertLit[%layer]); - MaterialEditorPropertiesWindow-->vertColorSwatch.color = (%material).vertColor[%layer]; - MaterialEditorPropertiesWindow-->subSurfaceCheckbox.setValue((%material).subSurface[%layer]); - - // Animation properties - MaterialEditorPropertiesWindow-->RotationAnimation.setValue(0); - MaterialEditorPropertiesWindow-->ScrollAnimation.setValue(0); - MaterialEditorPropertiesWindow-->WaveAnimation.setValue(0); - MaterialEditorPropertiesWindow-->ScaleAnimation.setValue(0); - MaterialEditorPropertiesWindow-->SequenceAnimation.setValue(0); - - %flags = (%material).getAnimFlags(%layer); - %wordCount = getWordCount( %flags ); - for(%i = 0; %i != %wordCount; %i++) - { - switch$(getWord( %flags, %i)) - { - case "$rotate": MaterialEditorPropertiesWindow-->RotationAnimation.setValue(1); - case "$scroll": MaterialEditorPropertiesWindow-->ScrollAnimation.setValue(1); - case "$wave": MaterialEditorPropertiesWindow-->WaveAnimation.setValue(1); - case "$scale": MaterialEditorPropertiesWindow-->ScaleAnimation.setValue(1); - case "$sequence": MaterialEditorPropertiesWindow-->SequenceAnimation.setValue(1); - } + %group.addField("BakeComposite", "BakeCompositeButton", "Performs a bake operation of the ORM maps into a single composite texture asset."); + + %ormMapField = %group.findField("AOMapAsset[0]"); + %bakeBtnField = %group.findField("BakeComposite"); + + %group-->stack.reorderChild(%bakeBtnField, %ormMapField); } - MaterialEditorPropertiesWindow-->RotationTextEditU.setText( getWord((%material).rotPivotOffset[%layer], 0) ); - MaterialEditorPropertiesWindow-->RotationTextEditV.setText( getWord((%material).rotPivotOffset[%layer], 1) ); - MaterialEditorPropertiesWindow-->RotationSpeedTextEdit.setText( (%material).rotSpeed[%layer] ); - MaterialEditorPropertiesWindow-->RotationSliderU.setValue( getWord((%material).rotPivotOffset[%layer], 0) ); - MaterialEditorPropertiesWindow-->RotationSliderV.setValue( getWord((%material).rotPivotOffset[%layer], 1) ); - MaterialEditorPropertiesWindow-->RotationSpeedSlider.setValue( (%material).rotSpeed[%layer] ); - MaterialEditorPropertiesWindow-->RotationCrosshair.setPosition( 45*mAbs(getWord((%material).rotPivotOffset[%layer], 0))-2, 45*mAbs(getWord((%material).rotPivotOffset[%layer], 1))-2 ); - - MaterialEditorPropertiesWindow-->ScrollTextEditU.setText( getWord((%material).scrollDir[%layer], 0) ); - MaterialEditorPropertiesWindow-->ScrollTextEditV.setText( getWord((%material).scrollDir[%layer], 1) ); - MaterialEditorPropertiesWindow-->ScrollSpeedTextEdit.setText( (%material).scrollSpeed[%layer] ); - MaterialEditorPropertiesWindow-->ScrollSliderU.setValue( getWord((%material).scrollDir[%layer], 0) ); - MaterialEditorPropertiesWindow-->ScrollSliderV.setValue( getWord((%material).scrollDir[%layer], 1) ); - MaterialEditorPropertiesWindow-->ScrollSpeedSlider.setValue( (%material).scrollSpeed[%layer] ); - MaterialEditorPropertiesWindow-->ScrollCrosshair.setPosition( -(23 * getWord((%material).scrollDir[%layer], 0))+20, -(23 * getWord((%material).scrollDir[%layer], 1))+20); - - %waveType = (%material).waveType[%layer]; - for( %radioButton = 0; %radioButton < MaterialEditorPropertiesWindow-->WaveButtonContainer.getCount(); %radioButton++ ) + %animflags = MaterialEditorGui.currentMaterial.animFlags[MaterialEditorGui.currentLayer]; + %group = MaterialEditorPropInspector.findExistentGroup("Animation Properties"); + if(isObject(%group)) { - if( %waveType $= MaterialEditorPropertiesWindow-->WaveButtonContainer.getObject(%radioButton).waveType ) - MaterialEditorPropertiesWindow-->WaveButtonContainer.getObject(%radioButton).setStateOn(1); + %hideScroll = true; + //if (strstr(%animflags, "Scroll")>=0) + // %hideScroll = false; + %group.hideField("scrollDir",%hideScroll); + %group.hideField("scrollSpeed",%hideScroll); + + %group.addField("scrollProperties", "MaterialScrollAnimation", "Controls the scroll animation properties of this material"); + + %hideRotate = true; + //if (strstr(%animflags, "Rotate")>=0) + // %hideRotate = false; + %group.hideField("rotSpeed",%hideRotate); + %group.hideField("rotPivotOffset",%hideRotate); + + %group.addField("scrollProperties", "MaterialRotAnimation", "Controls the scroll animation properties of this material"); + + %hideWave = true; + //if (strstr(%animflags, "Wave")>=0) + // %hideWave = false; + %group.hideField("waveType",%hideWave); + %group.hideField("waveFreq",%hideWave); + %group.hideField("waveAmp",%hideWave); + + %group.addField("scrollProperties", "MaterialWaveAnimation", "Controls the scroll animation properties of this material"); + + %showScale = false; + //if (strstr(%animflags, "Scale")>=0) + // %showScale = true; + + %hideSequence = true; + //if (strstr(%animflags, "Sequence")>=0) + // %hideSequence = false; + %group.hideField("sequenceFramePerSec",%hideSequence); + %group.hideField("sequenceSegmentSize",%hideSequence); + + %group.addField("scrollProperties", "MaterialSequenceAnimation", "Controls the scroll animation properties of this material"); } - MaterialEditorPropertiesWindow-->WaveTextEditAmp.setText( (%material).waveAmp[%layer] ); - MaterialEditorPropertiesWindow-->WaveTextEditFreq.setText( (%material).waveFreq[%layer] ); - MaterialEditorPropertiesWindow-->WaveSliderAmp.setValue( (%material).waveAmp[%layer] ); - MaterialEditorPropertiesWindow-->WaveSliderFreq.setValue( (%material).waveFreq[%layer] ); - - %numFrames = mRound( 1 / (%material).sequenceSegmentSize[%layer] ); - - MaterialEditorPropertiesWindow-->SequenceTextEditFPS.setText( (%material).sequenceFramePerSec[%layer] ); - MaterialEditorPropertiesWindow-->SequenceTextEditSSS.setText( %numFrames ); - MaterialEditorPropertiesWindow-->SequenceSliderFPS.setValue( (%material).sequenceFramePerSec[%layer] ); - MaterialEditorPropertiesWindow-->SequenceSliderSSS.setValue( %numFrames ); + MaterialEditorPropInspector.loadCollapseState(); - // Accumulation - MaterialEditorPropertiesWindow-->accuCheckbox.setValue((%material).accuEnabled[%layer]); + cancel(MaterialEditorGui.refreshSchedule); - MaterialEditorPropertiesWindow-->accuCheckbox.setValue((%material).accuEnabled[%layer]); - - %this.getRoughChan((%material).RoughnessChan[%layer]); - %this.getAOChan((%material).AOChan[%layer]); - %this.getMetalChan((%material).metalChan[%layer]); %this.preventUndo = false; } +function MaterialEditorGui::deArrayFieldsInRollout(%this, %rollout, %index) +{ + echo("===================================="); + echo("Processing group for array index: " @ %index); + + %stack = %rollout.getObject(0); + %count = %stack.getCount(); + + if(!isObject(deArrayObjects)) + { + new ArrayObject(deArrayObjects){}; + } + + for(%i=0; %i < %count; %i++) + { + %fieldArrayGroup = %stack.getObject(%i); + %fieldArrayStack = %fieldArrayGroup.getObject(0); + echo("Field Array: " @ %fieldArrayGroup.caption @ ", ID: " @ %fieldArrayGroup @ ", type: " @ %fieldArrayGroup.getClassName()); + + %fieldCaption = %fieldArrayGroup.caption; + %newFieldCaption = getSubStr(%fieldCaption, 0, strLen(%fieldCaption) - 4); + + echo(" New Caption: " @ %newFieldCaption); + + %curLayerField = %fieldArrayStack.getObject(%index); + + echo(" Field Obj for cur layer: " @ %curLayerField); + + %stack.add(%curLayerField); + %curLayerField.setCaption(%newFieldCaption); + + deArrayObjects.add(%stack, %fieldArrayGroup); + + echo(" ---"); + } + + echo("Cleaning up field array groups"); + + for(%i=0; %i < deArrayObjects.count(); %i++) + { + %group = deArrayObjects.getKey(%i); + %obj = deArrayObjects.getValue(%i); + + echo("Removing: " @ %obj @ " from group: " @ %group); + + %group.remove(%obj); + } + + echo("===================================="); + + deArrayObjects.empty(); +} + //======================================= function MaterialEditorGui::getRoughChan(%this, %channel) { @@ -1373,6 +1167,56 @@ function MaterialEditorGui::updateActiveMaterialName(%this, %name) // to find and update all these references so they don't break when we rename the // Material. MaterialEditorGui.updateMaterialReferences( getRootScene(), %action.oldName, %action.newName ); + + //Give a bit of time for the updates to happen before we refresh the GUI + MaterialEditorGui.schedule(500, "syncGUI"); +} + +function MaterialEditorGui::updateActiveMaterialMapTo(%this, %name) +{ + %action = %this.createUndo(ActionUpdateActiveMaterialMapTo, "Update Active Material MapTo"); + %action.material = MaterialEditorGui.currentMaterial; + %action.object = MaterialEditorGui.currentObject; + %action.oldName = MaterialEditorGui.currentMaterial.mapTo; + %action.newName = %name; + MaterialEditorGui.submitUndo( %action ); + + MaterialEditorGui.currentMaterial.mapTo = %name; + + materialEd_previewMaterial.flush(); + materialEd_previewMaterial.reload(); + MaterialEditorGui.currentMaterial.flush(); + MaterialEditorGui.currentMaterial.reload(); + + //Give a bit of time for the updates to happen before we refresh the GUI + MaterialEditorGui.schedule(500, "syncGUI"); +} + +function MaterialEditorGui::updateActiveMaterialInheritFrom(%this, %name) +{ + if(AssetDatabase.isDeclaredAsset(%name)) + { + %assetDef = AssetDatabase.acquireAsset(%name); + if(isObject(%assetDef)) + %name = %assetDef.materialDefinitionName; + } + + %action = %this.createUndo(ActionUpdateActiveMaterialInheritFrom, "Update Active Material InheritFrom"); + %action.material = MaterialEditorGui.currentMaterial; + %action.object = MaterialEditorGui.currentObject; + %action.oldName = MaterialEditorGui.currentMaterial.inheritFrom; + %action.newName = %name; + MaterialEditorGui.submitUndo( %action ); + + MaterialEditorGui.currentMaterial.inheritFrom = %name; + + materialEd_previewMaterial.flush(); + materialEd_previewMaterial.reload(); + MaterialEditorGui.currentMaterial.flush(); + MaterialEditorGui.currentMaterial.reload(); + + //Give a bit of time for the updates to happen before we refresh the GUI + MaterialEditorGui.schedule(500, "syncGUI"); } function MaterialEditorGui::updateMaterialReferences( %this, %obj, %oldName, %newName ) @@ -1432,162 +1276,13 @@ function MaterialEditorGui::updateReflectionType( %this, %type ) } } -// Per-Layer Material Options - -// For update maps -// %action : 1 = change map -// %action : 0 = remove map - -function MaterialEditorGui::updateTextureMap( %this, %type, %action ) -{ - %layer = MaterialEditorGui.currentLayer; - - %this.updatingTextureType = %type; - - %bitmapCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapDisplayBitmap", true ); - %textCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapNameText", true ); - - if( %action ) - { - AssetBrowser.showDialog("ImageAsset", %this@".doUpdateTextureMap"); - } - else - { - %textCtrl.setText("None"); - %bitmapCtrl.setBitmap($MaterialEditor::emptyMaterialImage); - MaterialEditorGui.updateActiveMaterial(%type @ "Map[" @ %layer @ "]",""); - MaterialEditorGui.updateActiveMaterial(%type @ "MapAsset[" @ %layer @ "]",""); - } - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - -function MaterialEditorGui::doUpdateTextureMap( %this, %assetId ) -{ - if(%assetId !$= "") - { - %layer = MaterialEditorGui.currentLayer; - - %type = %this.updatingTextureType; - - %bitmapCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapDisplayBitmap", true ); - %textCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapNameText", true ); - - %texture = getAssetPreviewImage(%assetId); - - if( %texture !$= "" && %texture !$= $MaterialEditor::emptyMaterialImage) - { - %bitmapCtrl.setBitmap(%texture); - - %bitmap = %bitmapCtrl.getBitmap(); - %bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/",""); - %bitmapCtrl.setBitmap(%bitmap); - %textCtrl.setText(%assetId); - MaterialEditorGui.updateActiveMaterial(%type @ "Map[" @ %layer @ "]",""); - MaterialEditorGui.updateActiveMaterial(%type @ "MapAsset[" @ %layer @ "]", %assetId); - } - } - - %this.updatingTextureType = ""; - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - -function MaterialEditorGui::updateDetailScale(%this,%newScale) -{ - %layer = MaterialEditorGui.currentLayer; - - %detailScale = %newScale SPC %newScale; - MaterialEditorGui.updateActiveMaterial("detailScale[" @ %layer @ "]", %detailScale); - } - -function MaterialEditorGui::updateDetailNormalStrength(%this,%newStrength) -{ - %layer = MaterialEditorGui.currentLayer; - - %detailStrength = %newStrength; - MaterialEditorGui.updateActiveMaterial("detailNormalMapStrength[" @ %layer @ "]", %detailStrength); -} - -function MaterialEditorGui::updateRotationOffset(%this, %isSlider, %onMouseUp) -{ - %layer = MaterialEditorGui.currentLayer; - %X = MaterialEditorPropertiesWindow-->RotationTextEditU.getText(); - %Y = MaterialEditorPropertiesWindow-->RotationTextEditV.getText(); - MaterialEditorPropertiesWindow-->RotationCrosshair.setPosition(45*mAbs(%X)-2, 45*mAbs(%Y)-2); - - MaterialEditorGui.updateActiveMaterial("rotPivotOffset[" @ %layer @ "]", %X SPC %Y,%isSlider,%onMouseUp); -} - -function MaterialEditorGui::updateRotationSpeed(%this, %isSlider, %onMouseUp) -{ - %layer = MaterialEditorGui.currentLayer; - %speed = MaterialEditorPropertiesWindow-->RotationSpeedTextEdit.getText(); - MaterialEditorGui.updateActiveMaterial("rotSpeed[" @ %layer @ "]",%speed,%isSlider,%onMouseUp); -} - -function MaterialEditorGui::updateScrollOffset(%this, %isSlider, %onMouseUp) -{ - %layer = MaterialEditorGui.currentLayer; - %X = MaterialEditorPropertiesWindow-->ScrollTextEditU.getText(); - %Y = MaterialEditorPropertiesWindow-->ScrollTextEditV.getText(); - MaterialEditorPropertiesWindow-->ScrollCrosshair.setPosition( -(23 * %X)+20, -(23 * %Y)+20); - - MaterialEditorGui.updateActiveMaterial("scrollDir[" @ %layer @ "]",%X SPC %Y,%isSlider,%onMouseUp); -} - -function MaterialEditorGui::updateScrollSpeed(%this, %isSlider, %onMouseUp) -{ - %layer = MaterialEditorGui.currentLayer; - %speed = MaterialEditorPropertiesWindow-->ScrollSpeedTextEdit.getText(); - MaterialEditorGui.updateActiveMaterial("scrollSpeed[" @ %layer @ "]",%speed,%isSlider,%onMouseUp); -} - -function MaterialEditorGui::updateWaveType(%this) -{ - for( %radioButton = 0; %radioButton < MaterialEditorPropertiesWindow-->WaveButtonContainer.getCount(); %radioButton++ ) - { - if( MaterialEditorPropertiesWindow-->WaveButtonContainer.getObject(%radioButton).getValue() == 1 ) - %type = MaterialEditorPropertiesWindow-->WaveButtonContainer.getObject(%radioButton).waveType; - } - - %layer = MaterialEditorGui.currentLayer; - MaterialEditorGui.updateActiveMaterial("waveType[" @ %layer @ "]", %type); -} - -function MaterialEditorGui::updateWaveAmp(%this, %isSlider, %onMouseUp) -{ - %layer = MaterialEditorGui.currentLayer; - %amp = MaterialEditorPropertiesWindow-->WaveTextEditAmp.getText(); - MaterialEditorGui.updateActiveMaterial("waveAmp[" @ %layer @ "]", %amp, %isSlider, %onMouseUp); -} - -function MaterialEditorGui::updateWaveFreq(%this, %isSlider, %onMouseUp) -{ - %layer = MaterialEditorGui.currentLayer; - %freq = MaterialEditorPropertiesWindow-->WaveTextEditFreq.getText(); - MaterialEditorGui.updateActiveMaterial("waveFreq[" @ %layer @ "]", %freq, %isSlider, %onMouseUp); -} - -function MaterialEditorGui::updateSequenceFPS(%this, %isSlider, %onMouseUp) -{ - %layer = MaterialEditorGui.currentLayer; - %fps = MaterialEditorPropertiesWindow-->SequenceTextEditFPS.getText(); - MaterialEditorGui.updateActiveMaterial("sequenceFramePerSec[" @ %layer @ "]", %fps, %isSlider, %onMouseUp); -} - -function MaterialEditorGui::updateSequenceSSS(%this, %isSlider, %onMouseUp) -{ - %layer = MaterialEditorGui.currentLayer; - %sss = 1 / MaterialEditorPropertiesWindow-->SequenceTextEditSSS.getText(); - MaterialEditorGui.updateActiveMaterial("sequenceSegmentSize[" @ %layer @ "]", %sss, %isSlider, %onMouseUp); -} - function MaterialEditorGui::updateAnimationFlags(%this) { MaterialEditorGui.setMaterialDirty(); %single = true; %flags = ""; - if(MaterialEditorPropertiesWindow-->RotationAnimation.getValue() == true) + if(MaterialEditorGuiWindow-->RotationAnimation.getValue() == true) { if(%single == true) %flags = %flags @ "$Rotate"; @@ -1596,7 +1291,7 @@ function MaterialEditorGui::updateAnimationFlags(%this) %single = false; } - if(MaterialEditorPropertiesWindow-->ScrollAnimation.getValue() == true) + if(MaterialEditorGuiWindow-->ScrollAnimation.getValue() == true) { if(%single == true) %flags = %flags @ "$Scroll"; @@ -1605,7 +1300,7 @@ function MaterialEditorGui::updateAnimationFlags(%this) %single = false; } - if(MaterialEditorPropertiesWindow-->WaveAnimation.getValue() == true) + if(MaterialEditorGuiWindow-->WaveAnimation.getValue() == true) { if(%single == true) %flags = %flags @ "$Wave"; @@ -1614,7 +1309,7 @@ function MaterialEditorGui::updateAnimationFlags(%this) %single = false; } - if(MaterialEditorPropertiesWindow-->ScaleAnimation.getValue() == true) + if(MaterialEditorGuiWindow-->ScaleAnimation.getValue() == true) { if(%single == true) %flags = %flags @ "$Scale"; @@ -1623,7 +1318,7 @@ function MaterialEditorGui::updateAnimationFlags(%this) %single = false; } - if(MaterialEditorPropertiesWindow-->SequenceAnimation.getValue() == true) + if(MaterialEditorGuiWindow-->SequenceAnimation.getValue() == true) { if(%single == true) %flags = %flags @ "$Sequence"; @@ -1682,35 +1377,6 @@ function MaterialEditorGui::syncGuiColor(%this, %guiCtrl, %propname, %color) MaterialEditorGui.updateActiveMaterial(%propName, %color); } -//These two functions are focused on object/layer specific functionality -function MaterialEditorGui::updateColorMultiply(%this,%color) -{ - %propName = "diffuseColor[" @ MaterialEditorGui.currentLayer @ "]"; - %this.syncGuiColor(MaterialEditorPropertiesWindow-->colorTintSwatch, %propName, %color); -} - -function MaterialEditorGui::updateSpecular(%this, %color) -{ - %propName = "specular[" @ MaterialEditorGui.currentLayer @ "]"; - %this.syncGuiColor(MaterialEditorPropertiesWindow-->specularColorSwatch, %propName, %color); -} - -function MaterialEditorGui::updateSubSurfaceColor(%this, %color) -{ - %propName = "subSurfaceColor[" @ MaterialEditorGui.currentLayer @ "]"; - %this.syncGuiColor(MaterialEditorPropertiesWindow-->subSurfaceColorSwatch, %propName, %color); -} - -function MaterialEditorGui::updateEffectColor0(%this, %color) -{ - %this.syncGuiColor(MaterialEditorPropertiesWindow-->effectColor0Swatch, "effectColor[0]", %color); -} - -function MaterialEditorGui::updateEffectColor1(%this, %color) -{ - %this.syncGuiColor(MaterialEditorPropertiesWindow-->effectColor1Swatch, "effectColor[1]", %color); -} - function MaterialEditorGui::updateBehaviorSound(%this, %type, %sound) { %defaultId = -1; @@ -1782,373 +1448,9 @@ function MaterialEditorGui::selectCubemap(%this) return; MaterialEditorGui.updateActiveMaterial( "cubemap", %cubemap.name ); - MaterialEditorGui.hideCubemapEditor(); + CubemapEditor.hideCubemapEditor(); } -function MaterialEditorGui::cancelCubemap(%this) -{ - %cubemap = MaterialEditorGui.currentCubemap; - - %idx = matEd_cubemapEd_availableCubemapList.findItemText( %cubemap.getName() ); - matEd_cubemapEd_availableCubemapList.setItemText( %idx, notDirtyCubemap.originalName ); - %cubemap.setName( notDirtyCubemap.originalName ); - - MaterialEditorGui.copyCubemaps( notDirtyCubemap, %cubemap ); - MaterialEditorGui.copyCubemaps( notDirtyCubemap, matEdCubeMapPreviewMat); - - %cubemap.updateFaces(); - matEdCubeMapPreviewMat.updateFaces(); -} - -function MaterialEditorGui::showCubemapEditor(%this) -{ - if (matEd_cubemapEditor.isVisible()) - return; - - MaterialEditorGui.currentCubemap = ""; - - matEd_cubemapEditor.setVisible(1); - new PersistenceManager(matEd_cubemapEdPerMan); - MaterialEditorGui.setCubemapNotDirty(); - - for( %i = 0; %i < RootGroup.getCount(); %i++ ) - { - if( RootGroup.getObject(%i).getClassName()!$= "CubemapData" ) - continue; - - for( %k = 0; %k < UnlistedCubemaps.count(); %k++ ) - { - %unlistedFound = 0; - if( UnlistedCubemaps.getValue(%k) $= RootGroup.getObject(%i).name ) - { - %unlistedFound = 1; - break; - } - } - - if( %unlistedFound ) - continue; - - matEd_cubemapEd_availableCubemapList.addItem( RootGroup.getObject(%i).name ); - } - - singleton CubemapData(notDirtyCubemap); - - // if there was no cubemap, pick the first, select, and bail, these are going to take - // care of themselves in the selected function - if( !isObject( MaterialEditorGui.currentMaterial.cubemap ) ) - { - if( matEd_cubemapEd_availableCubemapList.getItemCount() > 0 ) - { - matEd_cubemapEd_availableCubemapList.setSelected(0, true); - return; - } - else - { - // if there are no cubemaps, then create one, select, and bail - %cubemap = MaterialEditorGui.createNewCubemap(); - matEd_cubemapEd_availableCubemapList.addItem( %cubemap.name ); - matEd_cubemapEd_availableCubemapList.setSelected(0, true); - return; - } - } - - // do not directly change activeMat! - MaterialEditorGui.currentCubemap = MaterialEditorGui.currentMaterial.cubemap.getId(); - %cubemap = MaterialEditorGui.currentCubemap; - - notDirtyCubemap.originalName = %cubemap.getName(); - MaterialEditorGui.copyCubemaps( %cubemap, notDirtyCubemap); - MaterialEditorGui.copyCubemaps( %cubemap, matEdCubeMapPreviewMat); - MaterialEditorGui.syncCubemap( %cubemap ); -} - -function MaterialEditorGui::hideCubemapEditor(%this,%cancel) -{ - if(%cancel) - MaterialEditorGui.cancelCubemap(); - - matEd_cubemapEd_availableCubemapList.clearItems(); - matEd_cubemapEdPerMan.delete(); - matEd_cubemapEditor.setVisible(0); -} - -// create category and update current material if there is one -function MaterialEditorGui::addCubemap( %this,%cubemapName ) -{ - if( %cubemapName $= "" ) - { - toolsMessageBoxOK( "Error", "Can not create a cubemap without a valid name."); - return; - } - - for(%i = 0; %i < RootGroup.getCount(); %i++) - { - if( %cubemapName $= RootGroup.getObject(%i).getName() ) - { - toolsMessageBoxOK( "Error", "There is already an object with the same name."); - return; - } - } - - // Create and select a new cubemap - %cubemap = MaterialEditorGui.createNewCubemap( %cubemapName ); - %idx = matEd_cubemapEd_availableCubemapList.addItem( %cubemap.name ); - matEd_cubemapEd_availableCubemapList.setSelected( %idx, true ); - - // material category text field to blank - matEd_addCubemapWindow-->cubemapName.setText(""); -} - -function MaterialEditorGui::createNewCubemap( %this, %cubemap ) -{ - if( %cubemap $= "" ) - { - for(%i = 0; ; %i++) - { - %cubemap = "newCubemap_" @ %i; - if( !isObject(%cubemap) ) - break; - } - } - - new CubemapData(%cubemap) - { - cubeMapFaceAsset[0] = "ToolsModule:cube_xNeg_image"; - cubeMapFaceAsset[1] = "ToolsModule:cube_xPos_image"; - cubeMapFaceAsset[2] = "ToolsModule:cube_zNeg_image"; - cubeMapFaceAsset[3] = "ToolsModule:cube_zPos_image"; - cubeMapFaceAsset[4] = "ToolsModule:cube_yNeg_image"; - cubeMapFaceAsset[5] = "ToolsModule:cube_yPos_image"; - - parentGroup = RootGroup; - }; - - matEd_cubemapEdPerMan.setDirty( %cubemap, "art/materials." @ $TorqueScriptFileExtension ); - matEd_cubemapEdPerMan.saveDirty(); - - return %cubemap; -} - -function MaterialEditorGui::setCubemapDirty(%this) -{ - %propertyText = "Create Cubemap *"; - matEd_cubemapEditor.text = %propertyText; - matEd_cubemapEditor.dirty = true; - matEd_cubemapEditor-->saveCubemap.setActive(true); - - %cubemap = MaterialEditorGui.currentCubemap; - - // materials created in the materail selector are given that as its filename, so we run another check - if( MaterialEditorGui.isMatEditorMaterial( %cubemap ) ) - matEd_cubemapEdPerMan.setDirty(%cubemap, "art/materials." @ $TorqueScriptFileExtension); - else - matEd_cubemapEdPerMan.setDirty(%cubemap); -} - -function MaterialEditorGui::setCubemapNotDirty(%this) -{ - %propertyText= strreplace("Create Cubemap" , "*" , ""); - matEd_cubemapEditor.text = %propertyText; - matEd_cubemapEditor.dirty = false; - matEd_cubemapEditor-->saveCubemap.setActive(false); - - %cubemap = MaterialEditorGui.currentCubemap; - matEd_cubemapEdPerMan.removeDirty(%cubemap); -} - -function MaterialEditorGui::showDeleteCubemapDialog(%this) -{ - %idx = matEd_cubemapEd_availableCubemapList.getSelectedItem(); - %cubemap = matEd_cubemapEd_availableCubemapList.getItemText( %idx ); - %cubemap = %cubemap.getId(); - - if( %cubemap == -1 || !isObject(%cubemap) ) - return; - - if( isObject( %cubemap ) ) - { - toolsMessageBoxYesNoCancel("Delete Cubemap?", - "Are you sure you want to delete

" @ %cubemap.getName() @ "

Cubemap deletion won't take affect until the engine is quit.", - "MaterialEditorGui.deleteCubemap( " @ %cubemap @ ", " @ %idx @ " );", - "", - "" ); - } -} - -function MaterialEditorGui::deleteCubemap( %this, %cubemap, %idx ) -{ - matEd_cubemapEd_availableCubemapList.deleteItem( %idx ); - - UnlistedCubemaps.add( "unlistedCubemaps", %cubemap.getName() ); - - if( !MaterialEditorGui.isMatEditorMaterial( %cubemap ) ) - { - matEd_cubemapEdPerMan.removeDirty( %cubemap ); - matEd_cubemapEdPerMan.removeObjectFromFile( %cubemap ); - } - - if( matEd_cubemapEd_availableCubemapList.getItemCount() > 0 ) - { - matEd_cubemapEd_availableCubemapList.setSelected(0, true); - } - else - { - // if there are no cubemaps, then create one, select, and bail - %cubemap = MaterialEditorGui.createNewCubemap(); - matEd_cubemapEd_availableCubemapList.addItem( %cubemap.getName() ); - matEd_cubemapEd_availableCubemapList.setSelected(0, true); - } -} - -function matEd_cubemapEd_availableCubemapList::onSelect( %this, %id, %cubemap ) -{ - %cubemap = %cubemap.getId(); - if( MaterialEditorGui.currentCubemap $= %cubemap ) - return; - - if( matEd_cubemapEditor.dirty ) - { - %savedCubemap = MaterialEditorGui.currentCubemap; - toolsMessageBoxYesNoCancel("Save Existing Cubemap?", - "Do you want to save changes to

" @ %savedCubemap.getName(), - "MaterialEditorGui.saveCubemap(" @ true @ ");", - "MaterialEditorGui.saveCubemapDialogDontSave(" @ %cubemap @ ");", - "MaterialEditorGui.saveCubemapDialogCancel();" ); - } - else - MaterialEditorGui.changeCubemap( %cubemap ); -} - -function MaterialEditorGui::showSaveCubemapDialog( %this ) -{ - %cubemap = MaterialEditorGui.currentCubemap; - if( !isObject(%cubemap) ) - return; - - toolsMessageBoxYesNoCancel("Save Cubemap?", - "Do you want to save changes to

" @ %cubemap.getName(), - "MaterialEditorGui.saveCubemap( " @ %cubemap @ " );", - "", - "" ); -} - -function MaterialEditorGui::saveCubemap( %this, %cubemap ) -{ - notDirtyCubemap.originalName = %cubemap.getName(); - MaterialEditorGui.copyCubemaps( %cubemap, notDirtyCubemap ); - MaterialEditorGui.copyCubemaps( %cubemap, matEdCubeMapPreviewMat); - - matEd_cubemapEdPerMan.saveDirty(); - - MaterialEditorGui.setCubemapNotDirty(); -} - -function MaterialEditorGui::saveCubemapDialogDontSave( %this, %newCubemap) -{ - //deal with old cubemap first - %oldCubemap = MaterialEditorGui.currentCubemap; - - %idx = matEd_cubemapEd_availableCubemapList.findItemText( %oldCubemap.getName() ); - matEd_cubemapEd_availableCubemapList.setItemText( %idx, notDirtyCubemap.originalName ); - %oldCubemap.setName( notDirtyCubemap.originalName ); - - MaterialEditorGui.copyCubemaps( notDirtyCubemap, %oldCubemap); - MaterialEditorGui.copyCubemaps( notDirtyCubemap, matEdCubeMapPreviewMat); - MaterialEditorGui.syncCubemap( %oldCubemap ); - - MaterialEditorGui.changeCubemap( %newCubemap ); -} - -function MaterialEditorGui::saveCubemapDialogCancel( %this ) -{ - %cubemap = MaterialEditorGui.currentCubemap; - %idx = matEd_cubemapEd_availableCubemapList.findItemText( %cubemap.getName() ); - matEd_cubemapEd_availableCubemapList.clearSelection(); - matEd_cubemapEd_availableCubemapList.setSelected( %idx, true ); -} - -function MaterialEditorGui::changeCubemap( %this, %cubemap ) -{ - MaterialEditorGui.setCubemapNotDirty(); - MaterialEditorGui.currentCubemap = %cubemap; - - notDirtyCubemap.originalName = %cubemap.getName(); - MaterialEditorGui.copyCubemaps( %cubemap, notDirtyCubemap); - MaterialEditorGui.copyCubemaps( %cubemap, matEdCubeMapPreviewMat); - MaterialEditorGui.syncCubemap( %cubemap ); -} - -function MaterialEditorGui::editCubemapImage( %this, %face ) -{ - MaterialEditorGui.setCubemapDirty(); - - %cubemap = MaterialEditorGui.currentCubemap; - %bitmap = MaterialEditorGui.openFile("texture"); - if( %bitmap !$= "" && %bitmap !$= "tools/materialEditor/gui/cubemapBtnBorder" ) - { - %cubemap.cubeFace[%face] = %bitmap; - MaterialEditorGui.copyCubemaps( %cubemap, matEdCubeMapPreviewMat); - MaterialEditorGui.syncCubemap( %cubemap ); - } -} - -function MaterialEditorGui::editCubemapName( %this, %newName ) -{ - MaterialEditorGui.setCubemapDirty(); - - %cubemap = MaterialEditorGui.currentCubemap; - - %idx = matEd_cubemapEd_availableCubemapList.findItemText( %cubemap.getName() ); - matEd_cubemapEd_availableCubemapList.setItemText( %idx, %newName ); - %cubemap.setName(%newName); - - MaterialEditorGui.syncCubemap( %cubemap ); -} - -function MaterialEditorGui::syncCubemap( %this, %cubemap ) -{ - %xpos = MaterialEditorGui.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[0]); - if( %xpos !$= "" ) - matEd_cubemapEd_XPos.setBitmap( %xpos ); - - %xneg = MaterialEditorGui.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[1]); - if( %xneg !$= "" ) - matEd_cubemapEd_XNeg.setBitmap( %xneg ); - - %yneg = MaterialEditorGui.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[2]); - if( %yneg !$= "" ) - matEd_cubemapEd_YNeG.setBitmap( %yneg ); - - %ypos = MaterialEditorGui.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[3]); - if( %ypos !$= "" ) - matEd_cubemapEd_YPos.setBitmap( %ypos ); - - %zpos = MaterialEditorGui.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[4]); - if( %zpos !$= "" ) - matEd_cubemapEd_ZPos.setBitmap( %zpos ); - - %zneg = MaterialEditorGui.searchForTexture(%cubemap.getName(), %cubemap.cubeFace[5]); - if( %zneg !$= "" ) - matEd_cubemapEd_ZNeg.setBitmap( %zneg ); - - matEd_cubemapEd_activeCubemapNameTxt.setText(%cubemap.getName()); - - %cubemap.updateFaces(); - matEdCubeMapPreviewMat.updateFaces(); -} - -function MaterialEditorGui::copyCubemaps( %this, %copyFrom, %copyTo) -{ - %copyTo.cubeFace[0] = %copyFrom.cubeFace[0]; - %copyTo.cubeFace[1] = %copyFrom.cubeFace[1]; - %copyTo.cubeFace[2] = %copyFrom.cubeFace[2]; - %copyTo.cubeFace[3] = %copyFrom.cubeFace[3]; - %copyTo.cubeFace[4] = %copyFrom.cubeFace[4]; - %copyTo.cubeFace[5] = %copyFrom.cubeFace[5]; -} - - //============================================================================== // showSaveDialog logic @@ -2296,7 +1598,7 @@ function MaterialEditorGui::onCreateNewMaterialAsset(%this, %newAssetId) //get the new asset definition %assetDef = AssetDatabase.acquireAsset(%newAssetId); if(isObject(%assetDef)) - AssetBrowser.editMaterialAsset(%assetDef); + AssetBrowser.editAsset(%assetDef); } function MaterialEditorGui::deleteMaterial( %this ) @@ -2454,6 +1756,7 @@ function MaterialEditorGui::refreshMaterial(%this) } MaterialEditorGui.setMaterialNotDirty(); + MaterialEditorPropInspector.refreshMaterial(); } //============================================================================== @@ -2595,72 +1898,6 @@ function MaterialEditorGui::changeMaterial(%this, %fromMaterial, %toMaterial) MaterialEditorGui.submitUndo( %action ); } -//============================================================================== -// Image thumbnail right-clicks. - -// not yet functional -function MaterialEditorMapThumbnail::onRightClick( %this ) -{ - if( !isObject( "MaterialEditorMapThumbnailPopup" ) ) - new PopupMenu( MaterialEditorMapThumbnailPopup ) - { - superClass = "MenuBuilder"; - isPopup = true; - - item[ 0 ] = "Open File" TAB "" TAB "openFile( MaterialEditorMapThumbnailPopup.filePath );"; - item[ 1 ] = "Open Folder" TAB "" TAB "openFolder( filePath( MaterialEditorMapThumbnailPopup.filePath ) );"; - - filePath = ""; - }; - - // Find the text control containing the filename. - - %textCtrl = %this.parentGroup.findObjectByInternalName( %this.fileNameTextCtrl, true ); - if( !%textCtrl ) - return; - - %fileName = %textCtrl.getText(); - %fullPath = makeFullPath( %fileName, getMainDotCsDir() ); - - // Construct a full path. - - %isValid = isFile( %fullPath ); - if( !%isValid ) - { - if( isFile( %fileName ) ) - { - %fullPath = %fileName; - %isValid = true; - } - else - { - // Try material-relative path. - - %material = MaterialEditorGui.currentMaterial; - if( isObject( %material ) ) - { - %materialPath = filePath( makeFullPath( %material.getFilename(), getMainDotCsDir() ) ); - %fullPath = makeFullPath( %fileName, %materialPath ); - %isValid = isFile( %fullPath ); - } - } - } - - %popup = MaterialEditorMapThumbnailPopup; - %popup.enableItem( 0, %isValid ); - %popup.enableItem( 1, %isValid ); - %popup.filePath = %fullPath; - - %popup.showPopup( Canvas ); -} - -// Accumulation -function MaterialEditorGui::updateAccuCheckbox(%this, %value) -{ - MaterialEditorGui.updateActiveMaterial("accuEnabled[" @ MaterialEditorGui.currentLayer @ "]", %value); - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - // channel in selectors function MaterialEditorGui::setRoughChan(%this, %value) { @@ -2682,41 +1919,64 @@ function MaterialEditorGui::setMetalChan(%this, %value) function MaterialEditorGui::saveCompositeMap(%this) { - %saveAs = ""; - %dlg = new SaveFileDialog() - { - Filters = "PNG File (*.png)|*.png"; - DefaultPath = EditorSettings.value("data/"); - ChangePath = false; - OverwritePrompt = true; - }; - - %ret = %dlg.Execute(); - if(%ret) - { - // Immediately override/set the levelsDirectory - EditorSettings.setValue( "art/shapes/textures", collapseFilename(filePath( %dlg.FileName )) ); - %saveAs = %dlg.FileName; - } - - if( fileExt( %saveAs ) !$= ".png" ) - %saveAs = %saveAs @ ".png"; - - %material = %this.currentMaterial; - %layer = %this.currentLayer; + %source0 = 1; + %sourceChan0 = ""; - %aoMap = %material.getAOMap(%layer); - %roughMap = %material.getRoughMap(%layer); - %metalMap = %material.getMetalMap(%layer); - - %ao = %material.AOChan[%layer]; - %roughness = %material.RoughnessChan[%layer]; - %metal = %material.metalChan[%layer]; - - %channelKey = %ao SPC %roughness SPC %metal SPC 3; - error("Storing: \"" @ %aoMap @"\" \""@ %roughMap @"\" \""@ %metalMap @"\" \""@ %channelKey @"\" \""@ %saveAs @"\""); - saveCompositeTexture(%aoMap,%roughMap,%metalMap,"",%channelKey, %saveAs); - %dlg.delete(); + %source1 = 1; + %sourceChan1 = ""; + + %source2 = 0; + %sourceChan2 = ""; + + %source3 = 1; + %sourceChan3 = ""; + + if(MaterialEditorGui.currentMaterial.AOMapAsset[MaterialEditorGui.currentLayer] !$= "") + { + %source0 = MaterialEditorGui.currentMaterial.AOMapAsset[MaterialEditorGui.currentLayer]; + %sourceChan0 = MaterialEditorGui.currentMaterial.AOChan[MaterialEditorGui.currentLayer]; + } + /*else + { + %source0 = 1; + %sourceChan0 = ""; + }*/ + + if(MaterialEditorGui.currentMaterial.RoughMapAsset[MaterialEditorGui.currentLayer] !$= "") + { + %source1 = MaterialEditorGui.currentMaterial.RoughMapAsset[MaterialEditorGui.currentLayer]; + %sourceChan1 = MaterialEditorGui.currentMaterial.RoughnessChan[MaterialEditorGui.currentLayer]; + } + /*else + { + %source1 = MaterialEditorGui.currentMaterial.roughness[MaterialEditorGui.currentLayer]; + %sourceChan1 = ""; + }*/ + + if(MaterialEditorGui.currentMaterial.MetalMapAsset[MaterialEditorGui.currentLayer] !$= "") + { + %source2 = MaterialEditorGui.currentMaterial.MetalMapAsset[MaterialEditorGui.currentLayer]; + %sourceChan2 = MaterialEditorGui.currentMaterial.MetalChan[MaterialEditorGui.currentLayer]; + } + /*else + { + %source2 = MaterialEditorGui.currentMaterial.metalness[MaterialEditorGui.currentLayer]; + %sourceChan2 = ""; + }*/ + + CompositeTextureEditor.buildComposite(%source0, %source1, %source2, %source3, %sourceChan0, %sourceChan1, %sourceChan2, %sourceChan3, "MaterialEditorGui.finishedSavingCompositeMap"); + + return; +} + +function MaterialEditorGui::finishedSavingCompositeMap(%this, %assetId) +{ + MaterialEditorGui.updateActiveMaterial(ORMConfigMapAsset @ "[" @ MaterialEditorGui.currentLayer @ "]", %assetId); + MaterialEditorGui.updateActiveMaterial(AOMapAsset @ "[" @ MaterialEditorGui.currentLayer @ "]", ""); + MaterialEditorGui.updateActiveMaterial(RoughMapAsset @ "[" @ MaterialEditorGui.currentLayer @ "]", ""); + MaterialEditorGui.updateActiveMaterial(MetalMapAsset @ "[" @ MaterialEditorGui.currentLayer @ "]", ""); + + %this.refreshSchedule = %this.schedule(32, "guiSync"); } function MaterialEditorGui::swapMaterial(%this) @@ -2728,85 +1988,86 @@ function MaterialEditorGui::doSwapMaterial(%this, %materialAsset) MaterialEditorGui.showMaterialChangeSaveDialog(%materialAsset); } -// -// -function matEdDragNDropMapAssignment(%type, %payload) +function MaterialEditorPropInspector::onInspectorFieldModified(%this, %object, %fieldName, %arrayIndex, %oldValue, %newValue) { - %assetType = %payload.assetType; - if(%assetType !$= "ImageAsset") - return; + if(%arrayIndex !$= "" && %arrayIndex !$= "(null)") + MaterialEditorGui.updateActiveMaterial(%fieldName @ "[" @ %arrayIndex @ "]", %newValue); + else + MaterialEditorGui.updateActiveMaterial(%fieldName, %newValue); - %module = %payload.moduleName; - %assetName = %payload.assetName; - %assetId = %module @ ":" @ %assetName; - - MaterialEditorGui.updatingTextureType = %type; - MaterialEditorGui.guiSync( materialEd_previewMaterial ); - - MaterialEditorGui.doUpdateTextureMap( %assetId ); - Canvas.popDialog(EditorDragAndDropLayer); - if(EditorSettings.value("AssetManagement/Assets/closeBrowserOnDragAction", false)) + MaterialEditorGui.refreshSchedule = MaterialEditorGui.schedule(32, "guiSync"); +} + +function MaterialEditorPropInspector::getScrollbar(%this) +{ + %scrollParent = %this; + if (!%scrollParent.isMemberOfClass("GuiScrollCtrl")) + { + while(%scrollParent.getParent() && !%scrollParent.isMemberOfClass("GuiScrollCtrl")) + { + %scrollParent = %scrollParent.getParent(); + } + } + return %scrollParent; +} + +function MaterialEditorPropInspector::onPreInspectObject(%this, %obj) +{ + %this.saveCollapseState(); + %this.saveScrollState(); +} + +function MaterialEditorPropInspector::onPostInspectObject(%this, %obj) +{ + %this.loadCollapseState(); + %this.loadScrollState(); +} + +function MaterialEditorPropInspector::saveScrollState(%this) +{ + %this.scrollPos = %this.getScrollbar().getScrollPosition(); + //echo(%this.getName() @ "::saveScrollState" SPC %this.scrollPos); +} + +function MaterialEditorPropInspector::loadScrollState(%this) +{ + if (%this.scrollPos $= "") + return; + %this.getScrollbar().setScrollPosition(%this.scrollPos.x, %this.scrollPos.y); + //echo(%this.getName() @ "::loadScrollState" SPC %this.scrollPos); +} + + +function MaterialEditorPropInspector::saveCollapseState(%this) +{ + %groupCount = %this.getInspectedGroupCount(); + if (%groupCount == 0) + return; + %this.collapseState = ""; + for(%grp=0; %grp<%groupCount; %grp++) { - AssetBrowser.hideDialog(); + %this.collapseState = %this.collapseState SPC %this.getInspectedGroup(%grp).isExpanded(); + } + %this.collapseState = trim(%this.collapseState); + //echo(%this.getName() @ "::saveCollapsState" SPC %groupCount SPC %this.collapseState); +} + +function MaterialEditorPropInspector::loadCollapseState(%this) +{ + if (%this.collapseState $= "") return; + %groupCount = %this.getInspectedGroupCount(); + //echo(%this.getName() @ "::loadCollapsState" SPC %groupCount SPC %this.collapseState); + for(%grp=0; %grp<%groupCount; %grp++) + { + if (getword(%this.collapseState,%grp)) + %this.getInspectedGroup(%grp).instantExpand(); + else + %this.getInspectedGroup(%grp).instantCollapse(); } } -function materialEditorDiffuseMapContainer::onControlDropped( %this, %payload, %position ) +function MaterialEditorPropInspector::onFieldRightClick(%this, %fieldCtrl) { - matEdDragNDropMapAssignment("Diffuse", %payload); -} - -function materialEditorNormalMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("Normal", %payload); -} - -function materialEditorORMConfigMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("ORMConfig", %payload); -} - -function materialEditorRoughnessMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("Roughness", %payload); -} - -function materialEditorAOMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("AO", %payload); -} - -function materialEditorMetalMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("Metal", %payload); -} - -function materialEditorGlowMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("Glow", %payload); -} - -function materialEditorDetailMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("Detail", %payload); -} - -function materialEditorDetailNormalMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("DetailNormal", %payload); -} - -function materialEditorOverlayMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("Overlay", %payload); -} - -function materialEditorLightMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("Light", %payload); -} - -function materialEditorToneMapContainer::onControlDropped( %this, %payload, %position ) -{ - matEdDragNDropMapAssignment("Tone", %payload); + echo("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); + echo(%fieldCtrl.getFieldName()); } \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/nuMaterialEditor.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/nuMaterialEditor.tscript new file mode 100644 index 000000000..dcf5979cd --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/nuMaterialEditor.tscript @@ -0,0 +1,249 @@ +//Generic methods +function GuiInspector::getWindow(%this) +{ + %windowParent = %this; + if (!%windowParent.isMemberOfClass("GuiWindowCtrl")) + { + while(%windowParent.getParent() && !%windowParent.isMemberOfClass("GuiWindowCtrl")) + { + %windowParent = %windowParent.getParent(); + } + } + return %windowParent; +} + +function MaterialEditorPropInspector::getScrollbar(%this) +{ + %scrollParent = %this; + if (!%scrollParent.isMemberOfClass("GuiScrollCtrl")) + { + while(%scrollParent.getParent() && !%scrollParent.isMemberOfClass("GuiScrollCtrl")) + { + %scrollParent = %scrollParent.getParent(); + } + } + return %scrollParent; +} + +function MaterialEditorPropInspector::onPreInspectObject(%this, %obj) +{ + echo("MaterialEditorPropInspector::onPreInspectObject()"); + %this.saveCollapseState(); + %this.saveScrollState(); +} + +function MaterialEditorPropInspector::onPostInspectObject(%this, %obj) +{ + echo("MaterialEditorPropInspector::onPostInspectObject()"); + %this.loadCollapseState(); + %this.loadScrollState(); +} + +function MaterialEditorPropInspector::saveScrollState(%this) +{ + %this.scrollPos = %this.getScrollbar().getScrollPosition(); + //echo(%this.getName() @ "::saveScrollState" SPC %this.scrollPos); +} + +function MaterialEditorPropInspector::loadScrollState(%this) +{ + if (%this.scrollPos $= "") return; + %this.getScrollbar().setScrollPosition(%this.scrollPos.x, %this.scrollPos.y); + //echo(%this.getName() @ "::loadScrollState" SPC %this.scrollPos); +} + + +function MaterialEditorPropInspector::saveCollapseState(%this) +{ + %groupCount = %this.getInspectedGroupCount(); + if (%groupCount == 0) return; + %this.collapseState = ""; + for(%grp=0; %grp<%groupCount; %grp++) + { + %this.collapseState = %this.collapseState SPC %this.getInspectedGroup(%grp).isExpanded(); + } + %this.collapseState = trim(%this.collapseState); + //echo(%this.getName() @ "::saveCollapsState" SPC %groupCount SPC %this.collapseState); +} + +function MaterialEditorPropInspector::loadCollapseState(%this) +{ + if (%this.collapseState $= "") return; + %groupCount = %this.getInspectedGroupCount(); + //echo(%this.getName() @ "::loadCollapsState" SPC %groupCount SPC %this.collapseState); + for(%grp=0; %grp<%groupCount; %grp++) + { + if (getword(%this.collapseState,%grp)) + %this.getInspectedGroup(%grp).instantExpand(); + else + %this.getInspectedGroup(%grp).instantCollapse(); + } +} + +function GuiInspector::renew(%this) +{ + %count = %this.getNumInspectObjects(); + %inspecting = %this.getInspectObject(0); + for(%i=1; %i< %count;%i++) + %inspecting = %inspecting SPC %this.getInspectObject(%i); + + %this.inspect(""); //clear + //readd + for(%i=0; %i<%count;%i++) + %this.addInspect(getword(%inspecting,%i)); +} + +/// Material Editor specific + +function MaterialEditorPlugin::BuildEditorUI(%this) +{ + if(isObject(NuMaterialEditorWindow)) + NuMaterialEditorWindow.delete(); + + $MaterialEditor::currentLayer = 0; + + %matWindow = UIBuilder::Window("Material Editor", MaterialEditorPropertiesWindow.Position.x - MaterialEditorPropertiesWindow.Extent.x SPC MaterialEditorPropertiesWindow.Position.y, MaterialEditorPropertiesWindow.Extent.x SPC MaterialEditorPropertiesWindow.Extent.y); + %matWindow.setName("NuMaterialEditorWindow"); + %matWindow.closeCommand = "EWorldEditor.remove(NuMaterialEditorWindow);"; + UIBuilder::Stack(); + UIBuilder::SameLine(); + %label = UIBuilder::Label("Layer"); + %label.name = "numatedlabel"; + %matLayerListCtrl = UIBuilder::Dropdown("0\t1\t2\t3", "$MaterialEditor::currentLayer", "onMaterialLayerSelected($ThisControl);"); + %matLayerListCtrl.name = "NuMatEdLayerSelector"; + UIBuilder::FitAllOnLine(); + UIBuilder::End(); + %inspector = UIBuilder::Inspector("NuMaterialEdPropInspector"); + UIBuilder::End(); + UIBuilder::End(); + + + + MaterialEditorGui.currentMaterial = materialEd_previewMaterial;//DetailBlue; + + NuMaterialEdPropInspector.refreshMaterial(); + + %this.editorUI = %matWindow; + EWorldEditor.add(%matWindow); +} + +function MaterialEditorPlugin::CloseEditorUI(%this) +{ + EWorldEditor.remove(NuMaterialEditorWindow); +} + +function onMaterialLayerSelected(%this) +{ + $MaterialEditor::currentLayer = %this.getText(); + NuMaterialEdPropInspector.refreshMaterial(); +} + + +function MaterialEditorPropInspector::refreshMaterial(%this) +{ + %this.onPreInspectObject(%this.getInspectObject()); + %this.inspect(MaterialEditorGui.currentMaterial); + %this.setForcedArrayIndex(MaterialEditorGui.currentLayer); + // + //%this.getScrollbar().setExtent(%ext.x, %ext.y); + MaterialEditorGui.guiSync(); + %this.onPostInspectObject(%this.getInspectObject()); +} + +function MaterialEditorPropInspector::onPostInspectorFieldModified(%this, %obj, %inspecting) +{ + MaterialEditorGui.guiSync(); +} + +function NuMaterialEditorWindow::syncGUI(%this) +{ + //do some presentation adjustments + %ormMapPresent = MaterialEditorGui.currentMaterial.ORMConfigMapAsset[$MaterialEditor::currentLayer] !$= ""; + + %hideORMSliders = %ormMapPresent; + if (!%hideORMSliders) + %hideORMSliders = MaterialEditorGui.currentMaterial.AOMapAsset[$MaterialEditor::currentLayer] !$= ""; + if (!%hideORMSliders) + %hideORMSliders = MaterialEditorGui.currentMaterial.RoughMapAsset[$MaterialEditor::currentLayer] !$= ""; + if (!%hideORMSliders) + %hideORMSliders = MaterialEditorGui.currentMaterial.MetalMapAsset[$MaterialEditor::currentLayer] !$= ""; + + %group = NuMaterialEdPropInspector.findExistentGroup("Light Influence Maps"); + if(%ormMapPresent) + { + %group.hideField("isSRGb",false); + %group.hideField("AOMapAsset"); + %group.hideField("aoChan"); + %group.hideField("RoughMapAsset"); + %group.hideField("roughness"); + %group.hideField("roughnessChan"); + %group.hideField("MetalMapAsset"); + %group.hideField("metalness"); + %group.hideField("metalChan"); + %group.hideField("save"); + } + else + { + %group.hideField("isSRGb"); + if (%hideORMSliders) + { + %group.hideField("aoChan",false); + + %group.hideField("roughness"); + %group.hideField("roughnessChan",false); + + %group.hideField("metalness"); + %group.hideField("metalChan",false); + %group.hideField("save",false); + } + else + { + %group.hideField("aoChan"); + + %group.hideField("roughness",false); + %group.hideField("roughnessChan"); + + %group.hideField("metalness",false); + %group.hideField("metalChan"); + %group.hideField("save"); + } + %group.hideField("AOMapAsset",false); + %group.hideField("RoughMapAsset",false); + %group.hideField("MetalMapAsset",false); + } + + %animflags = MaterialEditorGui.currentMaterial.animFlags[$MaterialEditor::currentLayer]; + %group = NuMaterialEdPropInspector.findExistentGroup("Animation Properties"); + + %hideScroll = true; + if (strstr(%animflags, "Scroll")>=0) + %hideScroll = false; + %group.hideField("scrollDir",%hideScroll); + %group.hideField("scrollSpeed",%hideScroll); + + %hideRotate = true; + if (strstr(%animflags, "Rotate")>=0) + %hideRotate = false; + %group.hideField("rotSpeed",%hideRotate); + %group.hideField("rotPivotOffset",%hideRotate); + + %hideWave = true; + if (strstr(%animflags, "Wave")>=0) + %hideWave = false; + %group.hideField("waveType",%hideWave); + %group.hideField("waveFreq",%hideWave); + %group.hideField("waveAmp",%hideWave); + + %showScale = false; + if (strstr(%animflags, "Scale")>=0) + %showScale = true; + + %hideSequence = true; + if (strstr(%animflags, "Sequence")>=0) + %hideSequence = false; + %group.hideField("sequenceFramePerSec",%hideSequence); + %group.hideField("sequenceSegmentSize",%hideSequence); + + cancel(NuMaterialEdPropInspector.refreshing); + NuMaterialEdPropInspector.refreshing = NuMaterialEdPropInspector.schedule(64,"renew"); +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cubepreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cubepreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cubepreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cubepreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cubepreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cubepreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cylinderpreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cylinderpreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cylinderpreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cylinderpreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cylinderpreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_cylinderpreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_spherepreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_spherepreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_spherepreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_spherepreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_spherepreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubemaped_spherepreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/cubepreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubepreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/cubepreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubepreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/cubepreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/cubepreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/cylinderpreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/cylinderpreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/cylinderpreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/cylinderpreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/cylinderpreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/cylinderpreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/pyramidpreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/pyramidpreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/pyramidpreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/pyramidpreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/pyramidpreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/pyramidpreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/spherepreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/spherepreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/spherepreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/spherepreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/spherepreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/spherepreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/torusknotpreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/torusknotpreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/torusknotpreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/torusknotpreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/torusknotpreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/torusknotpreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/torusknowpreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/torusknowpreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/torusknowpreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/torusknowpreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/torusknowpreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/torusknowpreview.tscript diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/shapes/toruspreview.asset.taml similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.asset.taml rename to Templates/BaseGame/game/tools/materialEditor/shapes/toruspreview.asset.taml diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.dts b/Templates/BaseGame/game/tools/materialEditor/shapes/toruspreview.dts similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.dts rename to Templates/BaseGame/game/tools/materialEditor/shapes/toruspreview.dts diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript b/Templates/BaseGame/game/tools/materialEditor/shapes/toruspreview.tscript similarity index 100% rename from Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript rename to Templates/BaseGame/game/tools/materialEditor/shapes/toruspreview.tscript diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript index a7114117f..f16e0c1c5 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript @@ -2179,8 +2179,7 @@ function ShapeEdMaterials::editSelectedMaterial( %this ) ShapeEdSelectWindow.setVisible( false ); ShapeEdPropWindow.setVisible( false ); - EditorGui-->MatEdPropertiesWindow.setVisible( true ); - EditorGui-->MatEdPreviewWindow.setVisible( true ); + Canvas.pushDialog(MaterialEditorGui); MatEd_phoBreadcrumb.setVisible( true ); MatEd_phoBreadcrumb.command = "ShapeEdMaterials.editSelectedMaterialEnd();"; @@ -2204,8 +2203,7 @@ function ShapeEdMaterials::editSelectedMaterialEnd( %this, %closeEditor ) MatEd_phoBreadcrumb.command = ""; MaterialEditorGui.quit(); - EditorGui-->MatEdPropertiesWindow.setVisible( false ); - EditorGui-->MatEdPreviewWindow.setVisible( false ); + Canvas.popDialog(MaterialEditorGui); // Delete the temporary TSStatic %this.tempShape.delete(); diff --git a/Templates/BaseGame/game/tools/worldEditor/main.tscript b/Templates/BaseGame/game/tools/worldEditor/main.tscript index c3a3e88ad..0c5538771 100644 --- a/Templates/BaseGame/game/tools/worldEditor/main.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/main.tscript @@ -47,6 +47,7 @@ function initializeWorldEditor() exec("./gui/probeBakeDlg.gui" ); exec("tools/gui/cubemapEditor.gui" ); + exec("tools/gui/compositeTextureEditor.gui" ); exec("tools/gui/postFxEditor.gui" ); // Load Scripts. @@ -71,6 +72,8 @@ function initializeWorldEditor() exec("./scripts/visibility/probeViz." @ $TorqueScriptFileExtension); exec("./scripts/buttonPalette." @ $TorqueScriptFileExtension); + exec("tools/gui/cubemapEditor." @ $TorqueScriptFileExtension ); + exec("tools/gui/compositeTextureEditor." @ $TorqueScriptFileExtension ); exec("tools/gui/postFxEditor." @ $TorqueScriptFileExtension ); exec("tools/gui/renderTargetVisualizer.ed." @ $TorqueScriptFileExtension); diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript index 714e81b80..7fe337545 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript @@ -671,7 +671,7 @@ function EditorGui::updateSideBar(%this) case "ForestEditorPlugin ": ForestEditorPalleteWindow.onMouseDragged(); case "MaterialEditorPlugin": - MaterialEditorPreviewWindow.onMouseDragged(); + MaterialEditorGuiWindow.onMouseDragged(); case "MeshRoadEditorPlugin": MeshRoadEditorTreeWindow.onMouseDragged(); case "MissionAreaEditorPlugin": diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/editors/worldEditor.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/worldEditor.ed.tscript index 11f5017bc..6510fe509 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/editors/worldEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/worldEditor.ed.tscript @@ -43,7 +43,7 @@ function WorldEditor::onSelect( %this, %obj ) // 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 - if ( MaterialEditorPreviewWindow.isVisible() ) + if ( MaterialEditorGui.isVisible() ) MaterialEditorGui.prepareActiveObject(); // Update the Transform Selection window