Added changes missed via merge failures.
Removed some unused files/references that were causing errors, related to issues #502 & #512
|
|
@ -538,9 +538,11 @@ DefineEngineMethod(className, set##name, bool, (const char* map, S32 index), , a
|
|||
}
|
||||
|
||||
#define INIT_IMAGEASSET_ARRAY(name, index) \
|
||||
{\
|
||||
m##name##Name[index] = StringTable->EmptyString(); \
|
||||
m##name##AssetId[index] = StringTable->EmptyString(); \
|
||||
m##name##Asset[index] = NULL;
|
||||
m##name##Asset[index] = NULL;\
|
||||
}
|
||||
|
||||
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
|
||||
|
||||
|
|
@ -557,9 +559,11 @@ DefineEngineMethod(className, set##name, bool, (const char* map, S32 index), , a
|
|||
#endif
|
||||
|
||||
#define CLONE_IMAGEASSET_ARRAY(name, index) \
|
||||
{\
|
||||
m##name##Name[index] = other.m##name##Name[index];\
|
||||
m##name##AssetId[index] = other.m##name##AssetId[index];\
|
||||
m##name##Asset[index] = other.m##name##Asset[index];
|
||||
m##name##Asset[index] = other.m##name##Asset[index];\
|
||||
}
|
||||
|
||||
#define LOAD_IMAGEASSET_ARRAY(name, index)\
|
||||
if (m##name##AssetId[index] != StringTable->EmptyString())\
|
||||
|
|
|
|||
|
|
@ -567,11 +567,13 @@ DefineEngineMethod(className, set##name, bool, (const char* shape, S32 index),
|
|||
}
|
||||
|
||||
#define INIT_SHAPEASSET_ARRAY(name, index) \
|
||||
{\
|
||||
m##name##Name[index] = StringTable->EmptyString(); \
|
||||
m##name##AssetId[index] = StringTable->EmptyString(); \
|
||||
m##name##Asset[index] = NULL; \
|
||||
m##name[index] = NULL;\
|
||||
_set##name(StringTable->insert(ShapeAsset::smNoShapeAssetFallback), index);
|
||||
_set##name(StringTable->insert(ShapeAsset::smNoShapeAssetFallback), index);\
|
||||
}
|
||||
|
||||
#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS
|
||||
|
||||
|
|
@ -588,9 +590,11 @@ DefineEngineMethod(className, set##name, bool, (const char* shape, S32 index),
|
|||
#endif // SHOW_LEGACY_FILE_FIELDS
|
||||
|
||||
#define CLONE_SHAPEASSET_ARRAY(name, index) \
|
||||
{\
|
||||
m##name##Name[index] = other.m##name##Name[index];\
|
||||
m##name##AssetId[index] = other.m##name##AssetId[index];\
|
||||
m##name##Asset[index] = other.m##name##Asset[index];\
|
||||
}
|
||||
|
||||
#define PACKDATA_SHAPEASSET_ARRAY(name, index)\
|
||||
if (stream->writeFlag(m##name##Asset[index].notNull()))\
|
||||
|
|
|
|||
|
|
@ -1164,6 +1164,10 @@ void PlayerData::initPersistFields()
|
|||
|
||||
// Mounted images arrays
|
||||
addArray( "Mounted Images", ShapeBase::MaxMountedImages );
|
||||
INITPERSISTFIELD_SHAPEASSET_ARRAY(ShapeFP, PlayerData, "@brief File name of this player's shape that will be used in conjunction with the corresponding mounted image.\n\n"
|
||||
"These optional parameters correspond to each mounted image slot to indicate a shape that is rendered "
|
||||
"in addition to the mounted image shape. Typically these are a player's arms (or arm) that is "
|
||||
"animated along with the mounted image's state animation sequences.\n");
|
||||
|
||||
addProtectedField( "shapeNameFP", TypeShapeFilename, Offset(mShapeFPName, PlayerData), &_setShapeFPData, &defaultProtectedGetFn, ShapeBase::MaxMountedImages,
|
||||
"@brief File name of this player's shape that will be used in conjunction with the corresponding mounted image.\n\n"
|
||||
|
|
@ -1171,11 +1175,6 @@ void PlayerData::initPersistFields()
|
|||
"in addition to the mounted image shape. Typically these are a player's arms (or arm) that is "
|
||||
"animated along with the mounted image's state animation sequences.\n", AbstractClassRep::FIELD_HideInInspectors);
|
||||
|
||||
INITPERSISTFIELD_SHAPEASSET_ARRAY(ShapeFP, PlayerData, "@brief File name of this player's shape that will be used in conjunction with the corresponding mounted image.\n\n"
|
||||
"These optional parameters correspond to each mounted image slot to indicate a shape that is rendered "
|
||||
"in addition to the mounted image shape. Typically these are a player's arms (or arm) that is "
|
||||
"animated along with the mounted image's state animation sequences.\n");
|
||||
|
||||
endArray( "Mounted Images" );
|
||||
|
||||
endGroup( "First Person Arms" );
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ function Core_Rendering::onCreate(%this)
|
|||
$Terrain::OrmTextureFormat = ProjectSettings.value("Terrain/OrmTextureFormat", 12);
|
||||
|
||||
exec("./scripts/graphicsOptions." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/terrainSettings." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/renderManager." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 12 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="BlankSkybox_image"
|
||||
imageFile="@assetFile=BlankSkybox.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Torque
|
||||
// Copyright GarageGames, LLC 2011
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton CubemapData( BlankSkyCubemap )
|
||||
{
|
||||
cubeFaceAsset[0] = "Core_Rendering:BlankSkybox_image";
|
||||
cubeFaceAsset[1] = "Core_Rendering:BlankSkybox_image";
|
||||
cubeFaceAsset[2] = "Core_Rendering:BlankSkybox_image";
|
||||
cubeFaceAsset[3] = "Core_Rendering:BlankSkybox_image";
|
||||
cubeFaceAsset[4] = "Core_Rendering:BlankSkybox_image";
|
||||
cubeFaceAsset[5] = "Core_Rendering:BlankSkybox_image";
|
||||
};
|
||||
|
||||
singleton Material( BlankSkyMat )
|
||||
{
|
||||
cubemap = BlankSkyCubemap;
|
||||
};
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="skybox_1"
|
||||
imageFile="@assetFile=skybox_1.png"
|
||||
AssetName="NightSkybox_1"
|
||||
imageFile="@assetFile=NightSkybox_1.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
Before Width: | Height: | Size: 528 KiB After Width: | Height: | Size: 528 KiB |
|
|
@ -1,8 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="skybox_2"
|
||||
imageFile="@assetFile=skybox_2.png"
|
||||
AssetName="NightSkybox_2"
|
||||
imageFile="@assetFile=NightSkybox_2.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
Before Width: | Height: | Size: 530 KiB After Width: | Height: | Size: 530 KiB |
|
|
@ -1,8 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="skybox_3"
|
||||
imageFile="@assetFile=skybox_3.png"
|
||||
AssetName="NightSkybox_3"
|
||||
imageFile="@assetFile=NightSkybox_3.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
Before Width: | Height: | Size: 500 KiB After Width: | Height: | Size: 500 KiB |
|
|
@ -1,8 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="skybox_4"
|
||||
imageFile="@assetFile=skybox_4.png"
|
||||
AssetName="NightSkybox_4"
|
||||
imageFile="@assetFile=NightSkybox_4.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
Before Width: | Height: | Size: 502 KiB After Width: | Height: | Size: 502 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="NightSkybox_5"
|
||||
imageFile="@assetFile=NightSkybox_5.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
Before Width: | Height: | Size: 602 KiB After Width: | Height: | Size: 602 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="NightSkybox_6"
|
||||
imageFile="@assetFile=NightSkybox_6.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
Before Width: | Height: | Size: 390 KiB After Width: | Height: | Size: 390 KiB |
|
|
@ -22,12 +22,12 @@
|
|||
|
||||
singleton CubemapData( NightCubemap )
|
||||
{
|
||||
cubeFace[0] = "./skybox_1";
|
||||
cubeFace[1] = "./skybox_2";
|
||||
cubeFace[2] = "./skybox_3";
|
||||
cubeFace[3] = "./skybox_4";
|
||||
cubeFace[4] = "./skybox_5";
|
||||
cubeFace[5] = "./skybox_6";
|
||||
cubeFaceAsset[0] = "Core_Rendering:NightSkybox_1";
|
||||
cubeFaceAsset[1] = "Core_Rendering:NightSkybox_2";
|
||||
cubeFaceAsset[2] = "Core_Rendering:NightSkybox_3";
|
||||
cubeFaceAsset[3] = "Core_Rendering:NightSkybox_4";
|
||||
cubeFaceAsset[4] = "Core_Rendering:NightSkybox_5";
|
||||
cubeFaceAsset[5] = "Core_Rendering:NightSkybox_6";
|
||||
};
|
||||
|
||||
singleton Material( NightSkyMat )
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="skybox_5"
|
||||
imageFile="@assetFile=skybox_5.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="skybox_6"
|
||||
imageFile="@assetFile=skybox_6.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -64,8 +64,6 @@ function StartupGui::next(%this)
|
|||
// Set us to a blank screen while we load the next one
|
||||
Canvas.setContent(BlankGui);
|
||||
|
||||
%asdasd = %this.bitmap[$StartupIdx];
|
||||
|
||||
// Set our bitmap and reset the done variable
|
||||
%this.setBitmap(%this.bitmap[$StartupIdx]);
|
||||
%this.done = false;
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="AssetImportConfigEditor"
|
||||
scriptFile="@assetFile=AssetImportConfigEditor.gui"
|
||||
GUIFile="@assetFile=AssetImportConfigEditor.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="AssetPreviewButtonsTemplate"
|
||||
scriptFile="@assetFile=assetPreviewButtonsTemplate.gui"
|
||||
GUIFile="@assetFile=assetPreviewButtonsTemplate.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="GameObjectCreator"
|
||||
scriptFile="@assetFile=GameObjectCreator.gui"
|
||||
GUIFile="@assetFile=GameObjectCreator.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="assetImportConfigEditor"
|
||||
scriptFile="@assetFile=assetImportConfigEditor.gui"
|
||||
GUIFile="@assetFile=assetImportConfigEditor.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -1,270 +0,0 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
%guiContent = new GuiControl(AssetPreviewButtonsTemplate) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
new GuiControl() {
|
||||
position = "0 0";
|
||||
extent = "100 124";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "ShapeAssetPreviewButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiObjectView() {
|
||||
shapeFile = "data/Blockout_Basics/Walls/DoorWall2x2.fbx";
|
||||
mountedNode = "mount0";
|
||||
lightColor = "1 1 1 1";
|
||||
lightAmbient = "0.5 0.5 0.5 1";
|
||||
lightDirection = "0 0.707 -0.707";
|
||||
orbitDiststance = "5";
|
||||
minOrbitDiststance = "141.715";
|
||||
maxOrbitDiststance = "5";
|
||||
cameraSpeed = "0.01";
|
||||
cameraRotation = "0 0 0";
|
||||
cameraZRot = "0";
|
||||
forceFOV = "0";
|
||||
reflectPriority = "0";
|
||||
renderStyle = "standard";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "7 4";
|
||||
extent = "80 80";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "shapeAssetView";
|
||||
class = "AssetPreviewControl";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
|
||||
bitmapMode = "Stretched";
|
||||
autoFitExtents = "0";
|
||||
useModifiers = "0";
|
||||
useStates = "1";
|
||||
masked = "0";
|
||||
groupNum = "0";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 0";
|
||||
extent = "80 80";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
internalName="AssetPreviewBorderButton";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
groupNum = "0";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "1";
|
||||
position = "0 0";
|
||||
extent = "100 104";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiThumbHighlightButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "\n20540";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "Button";
|
||||
class = "AssetPreviewButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
historySize = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
password = "0";
|
||||
passwordMask = "*";
|
||||
text = "DoorWall2x2";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 84";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextEditProfile";
|
||||
visible = "1";
|
||||
active = "0";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "AssetNameLabel";
|
||||
class = "AssetNameField";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "102 0";
|
||||
extent = "100 124";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "GeneralAssetPreviewButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
bitmap = "Data/Blockout_Basics/Walls/WallGrid2x2_Albedo.png";
|
||||
bitmapMode = "Stretched";
|
||||
autoFitExtents = "0";
|
||||
useModifiers = "0";
|
||||
useStates = "0";
|
||||
masked = "0";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "10 4";
|
||||
extent = "80 80";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "assetPreviewImage";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
|
||||
bitmapMode = "Stretched";
|
||||
autoFitExtents = "0";
|
||||
useModifiers = "0";
|
||||
useStates = "1";
|
||||
masked = "0";
|
||||
groupNum = "0";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 0";
|
||||
extent = "80 80";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
internalName="AssetPreviewBorderButton";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
groupNum = "0";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "1";
|
||||
position = "0 0";
|
||||
extent = "100 104";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiThumbHighlightButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "\n20550";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "Button";
|
||||
class = "AssetPreviewButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
historySize = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
password = "0";
|
||||
passwordMask = "*";
|
||||
text = "WallGrid2x2";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 84";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextEditProfile";
|
||||
visible = "1";
|
||||
active = "0";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "AssetNameLabel";
|
||||
class = "AssetNameField";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="CreateNewCollectionSetCtrl"
|
||||
AssetName="createNewCollectionSetCtrl"
|
||||
scriptFile="@assetFile=createNewCollectionSet.gui"
|
||||
GUIFile="@assetFile=createNewCollectionSet.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="gameObjectCreator"
|
||||
scriptFile="@assetFile=gameObjectCreator.gui"
|
||||
GUIFile="@assetFile=gameObjectCreator.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -64,8 +64,6 @@ function initializeAssetBrowser()
|
|||
exec("./guis/selectModule.gui");
|
||||
exec("./guis/selectPath.gui");
|
||||
exec("./guis/editModule.gui");
|
||||
exec("./guis/importTemplateModules.gui");
|
||||
exec("./guis/assetPreviewButtonsTemplate.gui");
|
||||
exec("./guis/newFolder.gui");
|
||||
exec("./guis/assetImportLog.gui");
|
||||
exec("./guis/looseFileAudit.gui");
|
||||
|
|
|
|||
|
|
@ -453,15 +453,6 @@ function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName )
|
|||
|
||||
%doubleClickCommand = "AssetBrowser.editAsset( "@%assetDesc@" );";
|
||||
|
||||
/*if(%assetType $= "ShapeAsset")
|
||||
{
|
||||
%previewButton = AssetPreviewButtonsTemplate-->ShapeAssetPreviewButton.deepClone();
|
||||
}
|
||||
else
|
||||
{
|
||||
%previewButton = AssetPreviewButtonsTemplate-->GeneralAssetPreviewButton.deepClone();
|
||||
}*/
|
||||
|
||||
%textBottomPad = 20;
|
||||
|
||||
%previewButton = new GuiIconButtonCtrl()
|
||||
|
|
@ -517,7 +508,7 @@ function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName )
|
|||
%previewButton.moduleName = %moduleName;
|
||||
%previewButton.assetType = %assetType;
|
||||
|
||||
%previewButton.iconBitmap = %this.previewData.previewImage;
|
||||
%previewButton.bitmapAsset = %this.previewData.previewImage;
|
||||
|
||||
%previewButton.profile = "AssetBrowserPreview" @ %previewButton.assetType;
|
||||
%previewButton.tooltip = %this.previewData.tooltip;
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ function AssetBrowser::buildComponentAssetPreview(%this, %assetDef, %previewData
|
|||
%previewData.assetPath = %assetDef.scriptFile;
|
||||
%previewData.doubleClickCommand = "EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/componentIcon";
|
||||
%previewData.previewImage = "ToolsModule:componentIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.friendlyName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ function AssetBrowser::buildCppPreview(%this, %assetDef, %previewData)
|
|||
%previewData.assetPath = %assetDef.codeFilePath;
|
||||
%previewData.doubleClickCommand = "echo(\"Not yet implemented to edit C++ files from the editor\");";//"EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/cppIcon";
|
||||
%previewData.previewImage = "ToolsModule:cppIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function AssetBrowser::buildCreatorPreview(%this, %assetDef, %previewData)
|
|||
%previewData.assetName = %name;
|
||||
%previewData.assetPath = "";
|
||||
|
||||
%previewData.previewImage = "tools/classIcons/" @ %class;
|
||||
%previewData.previewImage = "ToolsModule:" @ %class @ "_image";
|
||||
|
||||
//%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function AssetBrowser::buildDatablockPreview(%this, %assetDef, %previewData)
|
|||
%previewData.assetName = %assetDef;
|
||||
%previewData.assetPath = "";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/datablockIcon";
|
||||
%previewData.previewImage = "ToolsModule:datablockIcon_image";
|
||||
|
||||
//Lets see if we have a icon for specifically for this datablock type
|
||||
%dataClass = %assetDef.getClassName();
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ function AssetBrowser::buildFolderPreview(%this, %assetDef, %previewData)
|
|||
%previewData.assetName = %assetDef.assetName;
|
||||
%previewData.assetPath = %assetDef.dirPath;
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/folderIcon";
|
||||
%previewData.previewImage = "ToolsModule:FolderIcon_image";
|
||||
|
||||
//%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ function AssetBrowser::buildGameObjectAssetPreview(%this, %assetDef, %previewDat
|
|||
%previewData.assetPath = %assetDef.scriptFile;
|
||||
%previewData.doubleClickCommand = "EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/gameObjectIcon";
|
||||
%previewData.previewImage = "ToolsModule:gameObjectIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.gameObjectName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ function AssetBrowser::buildGUIAssetPreview(%this, %assetDef, %previewData)
|
|||
%previewData.assetPath = %assetDef.GUIFilePath;
|
||||
%previewData.doubleClickCommand = "";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/guiIcon";
|
||||
%previewData.previewImage = "ToolsModule:guiIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ function AssetBrowser::buildLevelAssetPreview(%this, %assetDef, %previewData)
|
|||
if(isFile(%levelPreviewImage))
|
||||
%previewData.previewImage = %levelPreviewImage;
|
||||
else
|
||||
%previewData.previewImage = "tools/assetBrowser/art/levelIcon";
|
||||
%previewData.previewImage = "ToolsModule:levelIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ function AssetBrowser::buildLooseFilePreview(%this, %assetDef, %previewData)
|
|||
%previewData.assetName = %assetDef.assetName;
|
||||
%previewData.assetPath = %fullPath;
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/looseFileIcon";
|
||||
%previewData.previewImage = "ToolsModule:looseFileIcon_image";
|
||||
|
||||
//%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
|
|||
%depAssetType = %childAssetItem.assetType;
|
||||
if(%depAssetType $= "ImageAsset")
|
||||
{
|
||||
%matSet = "%newAsset.imageMap"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
|
||||
%matSet = "%newAsset.imageMap"@%dependencySlotId@"=\"@asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
|
||||
eval(%matSet);
|
||||
%dependencySlotId++;
|
||||
}
|
||||
|
|
@ -461,7 +461,7 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
|
|||
%previewData.previewImage = %imgAsset.getImagePath();
|
||||
}
|
||||
else
|
||||
%previewData.previewImage = "tools/assetBrowser/art/materialIcon";
|
||||
%previewData.previewImage = "tools/assetBrowser/art/materialIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ function AssetBrowser::buildPostEffectAssetPreview(%this, %assetDef, %previewDat
|
|||
%previewData.assetPath = %assetDef.scriptFilePath;
|
||||
%previewData.doubleClickCommand = "";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/postEffectIcon";
|
||||
%previewData.previewImage = "ToolsModule:postEffectIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ function AssetBrowser::buildPrefabPreview(%this, %assetDef, %previewData)
|
|||
%previewData.assetName = %assetDef.assetName;
|
||||
%previewData.assetPath = %fullPath;
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/genericAssetIcon";
|
||||
%previewData.previewImage = "ToolsModule:genericAssetIcon_image";
|
||||
|
||||
//%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -97,9 +97,9 @@ function AssetBrowser::buildTScriptPreview(%this, %assetDef, %previewData)
|
|||
%previewData.doubleClickCommand = "EditorOpenFileInTorsion( \""@%previewData.assetPath@"\", 0 );";
|
||||
|
||||
if(%assetDef.isServerSide)
|
||||
%previewData.previewImage = "tools/assetBrowser/art/serverScriptIcon";
|
||||
%previewData.previewImage = "ToolsModule:serverScriptIcon_image";
|
||||
else
|
||||
%previewData.previewImage = "tools/assetBrowser/art/clien" @ $TorqueScriptFileExtension @ "Icon";
|
||||
%previewData.previewImage = "ToolsModule:clientScriptIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -143,13 +143,13 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
|
|||
%depAssetType = %childAssetItem.assetType;
|
||||
if(%childAssetItem.assetType $= "MaterialAsset")
|
||||
{
|
||||
%matSet = "%newAsset.materialSlot"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
|
||||
%matSet = "%newAsset.materialSlot"@%dependencySlotId@"=\"@asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
|
||||
eval(%matSet);
|
||||
%dependencySlotId++;
|
||||
}
|
||||
else if(%depAssetType $= "AnimationAsset")
|
||||
{
|
||||
%matSet = "%newAsset.animationSequence"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
|
||||
%matSet = "%newAsset.animationSequence"@%dependencySlotId@"=\"@asset="@%moduleName@":"@%childAssetItem.assetName@"\";";
|
||||
eval(%matSet);
|
||||
%dependencySlotId++;
|
||||
}
|
||||
|
|
@ -252,8 +252,8 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
|
|||
%this.dirHandler.createFolder(%previewPath);
|
||||
}
|
||||
|
||||
%previewPath = %previewPath @ %assetDef.assetName @ "_Preview.png";
|
||||
if(!isFile(%previewPath))
|
||||
%previewFilePath = %previewPath @ %assetDef.assetName @ "_Preview.png";
|
||||
if(!isFile(%previewFilePath))
|
||||
{
|
||||
displayEditorLoadingGui("Generating Shape Asset Preview...");
|
||||
|
||||
|
|
@ -265,7 +265,7 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
|
|||
%filePath = %assetDef.generateCachedPreviewImage();
|
||||
|
||||
%imposterPath = %filePath @ ".imposter.png";
|
||||
pathCopy(%imposterPath, %previewPath);
|
||||
pathCopy(%imposterPath, %previewFilePath);
|
||||
|
||||
//cleanup
|
||||
fileDelete(%imposterPath);
|
||||
|
|
@ -275,17 +275,31 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
|
|||
|
||||
$TSLastDetail::dumpImposters = %oldImposterSetting;
|
||||
|
||||
%newAsset = new ImageAsset()
|
||||
{
|
||||
assetName = %assetDef.assetName @ "_PreviewImage";
|
||||
versionId = 1;
|
||||
imageFile = fileName(%previewFilePath);
|
||||
};
|
||||
|
||||
%previewImgAssetPath = %previewPath @ %newAsset.assetName @ ".asset.taml";
|
||||
%assetImportSuccessful = TAMLWrite(%newAsset, %previewImgAssetPath);
|
||||
|
||||
%toolsModuleDef = ModuleDatabase.findModule("ToolsModule",1);
|
||||
|
||||
%success = AssetDatabase.addDeclaredAsset(%toolsModuleDef, %previewImgAssetPath);
|
||||
|
||||
hideEditorLoadingGui();
|
||||
}
|
||||
|
||||
//Revalidate. If it didn't work, just use the default placeholder one
|
||||
if(!isFile(%previewPath))
|
||||
%previewPath = "tools/assetBrowser/art/genericAssetIcon";
|
||||
if(!isFile(%previewFilePath))
|
||||
%previewFilePath = "ToolsModule:genericAssetIcon_image";
|
||||
|
||||
%previewData.assetName = %assetDef.assetName;
|
||||
%previewData.assetPath = %assetDef.fileName;
|
||||
|
||||
%previewData.previewImage = %previewPath;//%assetDef.fileName;
|
||||
%previewData.previewImage = "ToolsModule:" @ %assetDef.assetName @ "_PreviewImage";//%assetDef.fileName;
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ function AssetBrowser::buildShapeAnimationAssetPreview(%this, %assetDef, %previe
|
|||
@ "EditorGui.setEditor(MaterialEditorPlugin); "
|
||||
@ "AssetBrowser.hideDialog();";*/
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/animationIcon";
|
||||
%previewData.previewImage = "ToolsModule:animationIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ function AssetBrowser::buildSoundAssetPreview(%this, %assetDef, %previewData)
|
|||
else
|
||||
%previewData.doubleClickCommand = "AssetBrowser.editAsset( "@%assetDef@" );";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/soundIcon";
|
||||
%previewData.previewImage = "ToolsModule:soundIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ function AssetBrowser::buildStateMachineAssetPreview(%this, %assetDef, %previewD
|
|||
%previewData.assetPath = %assetDef.scriptFile;
|
||||
%previewData.doubleClickCommand = "AssetBrowser.editStateMachineAsset( "@%assetDef@" );";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/stateMachineIcon";
|
||||
%previewData.previewImage = "ToolsModule:stateMachineIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.friendlyName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ function AssetBrowser::buildTerrainAssetPreview(%this, %assetDef, %previewData)
|
|||
%previewData.assetPath = "";
|
||||
%previewData.doubleClickCommand = "";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/gameObjectIcon";
|
||||
%previewData.previewImage = "ToolsModule:gameObjectIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.gameObjectName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ function AssetBrowser::buildTerrainMaterialAssetPreview(%this, %assetDef, %previ
|
|||
%previewData.assetPath = "";
|
||||
%previewData.doubleClickCommand = "";
|
||||
|
||||
%previewData.previewImage = "tools/assetBrowser/art/terrainMaterialIcon";
|
||||
%previewData.previewImage = "ToolsModule:terrainMaterialIcon_image";
|
||||
|
||||
%previewData.assetFriendlyName = %assetDef.gameObjectName;
|
||||
%previewData.assetDesc = %assetDef.description;
|
||||
|
|
|
|||
|
|
@ -188,8 +188,8 @@ function directoryHandler::getModuleFromAddress(%this, %address)
|
|||
%modulePath = makeRelativePath(%module.ModulePath);
|
||||
|
||||
//We don't want to add stuff directly to the root core or tools modules
|
||||
if(%modulePath $= "Core" || %modulePath $= "Tools")
|
||||
continue;
|
||||
//if(%modulePath $= "Core" || %modulePath $= "Tools")
|
||||
// continue;
|
||||
|
||||
if(startsWith(%address, %modulePath))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ function AssetBrowser::editAsset(%this, %assetDef)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(!isObject(%assetDef) && strchrpos(%assetDef, ":") != -1)
|
||||
else if(AssetDatabase.isDeclaredAsset(%assetDef))
|
||||
{
|
||||
//Turns out we were passed an assetid, not an asset definition.
|
||||
//Grab the asset def from that
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
function AssetBrowser_SelectModule::showDialog(%this, %callback)
|
||||
{
|
||||
AssetBrowser_SelectModule.callback = %callback;
|
||||
Canvas.pushDialog(AssetBrowser_SelectModule);
|
||||
}
|
||||
|
||||
function AssetBrowser_SelectModule::onWake(%this)
|
||||
{
|
||||
AssetBrowser_SelectModuleWindow-->ModuleList.refresh();
|
||||
|
|
|
|||
|
|
@ -14,6 +14,17 @@ function @@::initServer(%this)
|
|||
//This is called when the server is created for an actual game/map to be played
|
||||
function @@::onCreateGameServer(%this)
|
||||
{
|
||||
//These are common managed data files. For any datablock-based stuff that gets generated by the editors
|
||||
//(that doesn't have a specific associated file, like data for a player class) will go into these.
|
||||
//So we'll register them now if they exist.
|
||||
if(isFile("./scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension))
|
||||
%this.registerDatablock("./scripts/managedData/managedDatablocks");
|
||||
if(isFile("./scripts/managedData/managedForestItemData." @ $TorqueScriptFileExtension))
|
||||
%this.registerDatablock("./scripts/managedData/managedForestItemData");
|
||||
if(isFile("./scripts/managedData/managedParticleEmitterData." @ $TorqueScriptFileExtension))
|
||||
%this.registerDatablock("./scripts/managedData/managedParticleEmitterData");
|
||||
if(isFile("./scripts/managedData/managedParticleData." @ $TorqueScriptFileExtension))
|
||||
%this.registerDatablock("./scripts/managedData/managedParticleData");
|
||||
}
|
||||
|
||||
//This is called when the server is shut down due to the game/map being exited
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
//Scripts
|
||||
exec("./scripts/componentEditor.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/stateMachineEditor.ed." @ $TorqueScriptFileExtension);
|
||||
//exec("./scripts/componentEditor.ed." @ $TorqueScriptFileExtension);
|
||||
//exec("./scripts/stateMachineEditor.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/superToolTipDlg.ed." @ $TorqueScriptFileExtension);
|
||||
|
||||
//gui
|
||||
exec("./gui/superToolTipDlg.ed.gui");
|
||||
exec("./gui/stateMachineDlg.ed.gui");
|
||||
//exec("./gui/stateMachineDlg.ed.gui");
|
||||
|
||||
//field types
|
||||
exec("./interface/materialFieldType." @ $TorqueScriptFileExtension);
|
||||
|
|
|
|||
|
|
@ -676,13 +676,16 @@ function DatablockEditorPlugin::createDatablock(%this)
|
|||
//---------------------------------------------------------------------------------------------
|
||||
function DatablockEditorPlugin::pickDatablockPath(%this)
|
||||
{
|
||||
SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, "DatablockEditorPlugin.pickedNewDBPath", "Select New Datablock Path");
|
||||
SelectAssetPathWindow.selectWindow();
|
||||
AssetBrowser_SelectModule.showDialog("DatablockEditorPlugin.pickedNewDBTargetModule");
|
||||
//SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, "DatablockEditorPlugin.pickedNewDBPath", "Select New Datablock Path");
|
||||
AssetBrowser_SelectModuleWindow.selectWindow();
|
||||
}
|
||||
|
||||
function DatablockEditorPlugin::pickedNewDBPath(%this, %path)
|
||||
function DatablockEditorPlugin::pickedNewDBTargetModule(%this, %module)
|
||||
{
|
||||
$DATABLOCK_EDITOR_DEFAULT_FILENAME = %path @ "/managedDatablocks." @ $TorqueScriptFileExtension;
|
||||
%moduleDef = ModuleDatabase.findModule(%module);
|
||||
|
||||
$DATABLOCK_EDITOR_DEFAULT_FILENAME = %moduleDef.ModulePath @ "/scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension;
|
||||
DatablockEditorPlugin.createDatablock();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,15 @@ function RetargetDecalButton::onClick( %this )
|
|||
|
||||
function NewDecalButton::onClick( %this )
|
||||
{
|
||||
AssetBrowser_SelectModule.showDialog("DecalEditorGui.pickedNewDecalTargetModule");
|
||||
AssetBrowser_SelectModuleWindow.selectWindow();
|
||||
}
|
||||
|
||||
function DecalEditorGui::pickedNewDecalTargetModule(%this, %module)
|
||||
{
|
||||
%moduleDef = ModuleDatabase.findModule(%module);
|
||||
$decalDataFile = %moduleDef.ModulePath @ "/scripts/managedData/managedDecalData." @ $TorqueScriptFileExtension;
|
||||
|
||||
%name = getUniqueName( "NewDecalData" );
|
||||
|
||||
%str = "datablock DecalData( " @ %name @ " ) { Material = \"WarningMaterial\"; };";
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ function initializeDecalEditor()
|
|||
{
|
||||
echo(" % - Initializing Decal Editor");
|
||||
|
||||
$decalDataFile = "art/decals/managedDecalData." @ $TorqueScriptFileExtension;
|
||||
$decalDataFile = "data/managedDecalData." @ $TorqueScriptFileExtension;
|
||||
|
||||
exec( "./decalEditor." @ $TorqueScriptFileExtension );
|
||||
exec( "./decalEditorGui.gui" );
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
%forestBrushesGroup = new SimGroup( ForestBrushGroup )
|
||||
{
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -171,13 +171,15 @@ function ForestEditorGui::deleteBrushOrElement( %this )
|
|||
|
||||
function ForestEditorGui::newMesh( %this )
|
||||
{
|
||||
SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, "createNewForestMesh", "Select Forest Mesh Datablock Path");
|
||||
SelectAssetPathWindow.selectWindow();
|
||||
AssetBrowser_SelectModule.showDialog("ForestEditorGui.pickedNewMeshTargetModule");
|
||||
AssetBrowser_SelectModuleWindow.selectWindow();
|
||||
}
|
||||
|
||||
function createNewForestMesh(%newPath)
|
||||
function ForestEditorGui::pickedNewMeshTargetModule(%this, %module)
|
||||
{
|
||||
ForestEditorGui.newMeshPath = %newPath;
|
||||
%moduleDef = ModuleDatabase.findModule(%module);
|
||||
|
||||
ForestEditorGui.forestItemDataPath = %moduleDef.ModulePath @ "/scripts/managedData/managedForestItemData." @ $TorqueScriptFileExtension;
|
||||
AssetBrowser.showDialog("ShapeAsset", "selectNewForestMesh", "", "", "");
|
||||
}
|
||||
|
||||
|
|
@ -212,10 +214,10 @@ function selectNewForestMesh(%selectedShapeAssetId)
|
|||
//%str = "datablock TSForestItemData( " @ %name @ " ) { shapeFile = \"" @ %fullPath @ "\"; };";
|
||||
//eval( %str );
|
||||
|
||||
%fullPath = AssetDatabase.acquireAsset(%selectedShapeAssetId).getShapeFile();
|
||||
//%fullPath = AssetDatabase.acquireAsset(%selectedShapeAssetId).getShapeFile();
|
||||
|
||||
new TSForestItemData(%name) {
|
||||
shapeFile = %fullPath;
|
||||
shapeAsset = %selectedShapeAssetId;
|
||||
};
|
||||
|
||||
%isrl = isObject( %name );
|
||||
|
|
@ -228,7 +230,7 @@ function selectNewForestMesh(%selectedShapeAssetId)
|
|||
ForestEditMeshTree.scrollVisible( %item );
|
||||
ForestEditMeshTree.addSelection( %item );
|
||||
|
||||
ForestDataManager.setDirty( %name, ForestEditorGui.newMeshPath @ "/managedForestItemData." @ $TorqueScriptFileExtension );
|
||||
ForestDataManager.setDirty( %name, ForestEditorGui.forestItemDataPath );
|
||||
|
||||
%element = new ForestBrushElement()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ exec("./GuiEaseEditDlg.ed." @ $TorqueScriptFileExtension);
|
|||
exec("./guiObjectInspector.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./uvEditor.ed.gui");
|
||||
exec("./objectSelection.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./postFxManager.gui");
|
||||
exec("./assimpImport.ed.gui");
|
||||
|
||||
exec("./fieldTypes/assetDependencies." @ $TorqueScriptFileExtension);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
Visible = "1";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
bitmap = "art/gui/background";
|
||||
bitmap = "data/ui/images/background.png";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
|
||||
|
|
|
|||
|
|
@ -821,7 +821,7 @@
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "MaterialEditorGui.updateORMConfigMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",1);";
|
||||
tooltipprofile = "ToolsGuiDefaultProfile";
|
||||
ToolTip = "Change the packed spec map for this layer. \n Roughness (R), Ambient Occlusion (G), and Metalness(B))";
|
||||
hovertime = "1000";
|
||||
|
|
@ -861,7 +861,7 @@
|
|||
position = "134 34";
|
||||
Extent = "40 16";
|
||||
buttonType = "PushButton";
|
||||
command="MaterialEditorGui.updateORMConfigMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",1);";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
|
|
@ -875,7 +875,7 @@
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "MaterialEditorGui.updateORMConfigMap(0);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",0);";
|
||||
hovertime = "1000";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
|
|
@ -1049,7 +1049,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateroughMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"rough\",1);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Change the Roughness map for this layer.";
|
||||
hovertime = "1000";
|
||||
|
|
@ -1094,7 +1094,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateroughMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"rough\",1);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -1118,7 +1118,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateroughMap(0);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"rough\",0);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -1285,7 +1285,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateaoMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Change the AO map for this layer.";
|
||||
hovertime = "1000";
|
||||
|
|
@ -1330,7 +1330,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateaoMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -1354,7 +1354,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateaoMap(0);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"ao\",0);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -1521,7 +1521,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updatemetalMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"metal\",1);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Change the Metalness Map for this layer.";
|
||||
hovertime = "1000";
|
||||
|
|
@ -1566,7 +1566,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updatemetalMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"metal\",1);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -1590,7 +1590,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updatemetalMap(0);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"metal\",0);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -1773,7 +1773,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateglowMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"glow\",1);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Change the glowness Map for this layer.";
|
||||
hovertime = "1000";
|
||||
|
|
@ -1818,7 +1818,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateglowMap(1);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"glow\",1);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -1842,7 +1842,7 @@
|
|||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MaterialEditorGui.updateglowMap(0);";
|
||||
Command = "MaterialEditorGui.updateTextureMap(\"glow\",0);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
|
|
@ -4720,7 +4720,7 @@
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "materialSelector.showDialog(\"MaterialEditorGui.switchMaterial\");";
|
||||
Command = "AssetBrowser.showDialog(\"MaterialAsset\", \"MaterialEditorGui.selectMaterialAsset\");";
|
||||
hovertime = "1000";
|
||||
bitmap = "tools/gui/images/open-file";
|
||||
tooltip = "Open Existing Material";
|
||||
|
|
|
|||
|
|
@ -230,6 +230,11 @@ function MaterialEditorGui::openFile( %this, %fileType )
|
|||
return makeRelativePath( %filename, getMainDotCsDir() );
|
||||
}
|
||||
|
||||
function MaterialEditorGui::selectMaterialAsset(%this, %assetId)
|
||||
{
|
||||
AssetBrowser.editAsset(%assetId);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// SubMaterial(Material Target) -- Supports different ways to grab the
|
||||
// material from the dropdown list. We're here either because-
|
||||
|
|
@ -253,7 +258,16 @@ function SubMaterialSelector::onSelect( %this )
|
|||
// object does not have a valid method to grab a material
|
||||
if( !isObject( %material ) )
|
||||
{
|
||||
// look for a newMaterial name to grab
|
||||
if(!AssetDatabase.isDeclaredAsset(%material))
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
%assetDef = AssetDatabase.acquireAsset(%material);
|
||||
%material = %assetDef.materialDefinitionName;
|
||||
}
|
||||
/*// look for a newMaterial name to grab
|
||||
// addiitonally, convert "." to "_" in case we have something like: "base.texname" as a material name
|
||||
// at the end we will have generated material name: "base_texname_mat"
|
||||
%material = getUniqueName( strreplace(%material, ".", "_") @ "_mat" );
|
||||
|
|
@ -268,7 +282,7 @@ function SubMaterialSelector::onSelect( %this )
|
|||
eval( "MaterialEditorGui.currentObject." @ strreplace(%this.getText(),".","_") @ " = " @ %material @ ";");
|
||||
|
||||
if( MaterialEditorGui.currentObject.isMethod("postApply") )
|
||||
MaterialEditorGui.currentObject.postApply();
|
||||
MaterialEditorGui.currentObject.postApply();*/
|
||||
}
|
||||
|
||||
MaterialEditorGui.prepareActiveMaterial( %material.getId() );
|
||||
|
|
@ -325,7 +339,7 @@ function MaterialEditorGui::prepareActiveObject( %this, %override )
|
|||
{
|
||||
%fieldName = %obj.getField(%i);
|
||||
|
||||
if( %obj.getFieldType(%fieldName) !$= "TypeMaterialName" )
|
||||
if( %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetId" && %obj.getFieldType(%fieldName) !$= "TypeMaterialName")
|
||||
continue;
|
||||
|
||||
if( !%canSupportMaterial )
|
||||
|
|
@ -409,7 +423,8 @@ function MaterialEditorGui::prepareActiveMaterial(%this, %material, %override)
|
|||
{
|
||||
// If were not valid, grab the first valid material out of the materialSet
|
||||
if( !isObject(%material) )
|
||||
%material = MaterialSet.getObject(0);
|
||||
return;
|
||||
//%material = MaterialSet.getObject(0);
|
||||
|
||||
// Check made in order to avoid loading the same material. Overriding
|
||||
// made in special cases
|
||||
|
|
@ -501,7 +516,13 @@ function MaterialEditorGui::setMaterialDirty(%this)
|
|||
// materials created in the material selector are given that as its filename, so we run another check
|
||||
if( MaterialEditorGui.isMatEditorMaterial( MaterialEditorGui.currentMaterial ) )
|
||||
{
|
||||
if( MaterialEditorGui.currentMaterial.isAutoGenerated() )
|
||||
%currentMatFilename = MaterialEditorGui.currentMaterial.getFilename();
|
||||
|
||||
if(%currentMatFilename !$= "")
|
||||
{
|
||||
matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, %currentMatFilename);
|
||||
}
|
||||
else if( MaterialEditorGui.currentMaterial.isAutoGenerated() )
|
||||
{
|
||||
%obj = MaterialEditorGui.currentObject;
|
||||
|
||||
|
|
@ -525,13 +546,9 @@ function MaterialEditorGui::setMaterialDirty(%this)
|
|||
|
||||
matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, %savePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, "art/materials." @ $TorqueScriptFileExtension);
|
||||
}
|
||||
}
|
||||
else
|
||||
matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial);
|
||||
matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, MaterialEditorGui.defaultMaterialFile);
|
||||
}
|
||||
|
||||
function MaterialEditorGui::convertTextureFields(%this)
|
||||
|
|
@ -539,88 +556,30 @@ function MaterialEditorGui::convertTextureFields(%this)
|
|||
// Find the absolute paths for the texture filenames so that
|
||||
// we can properly wire up the preview materials and controls.
|
||||
|
||||
for(%diffuseI = 0; %diffuseI < 4; %diffuseI++)
|
||||
{
|
||||
%diffuseMap = MaterialEditorGui.currentMaterial.diffuseMap[%diffuseI];
|
||||
%diffuseMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %diffuseMap);
|
||||
MaterialEditorGui.currentMaterial.diffuseMap[%diffuseI] = %diffuseMap;
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "DiffuseMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "NormalMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "OverlayMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "DetailMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "LightMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "ToneMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "ORMConfigMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "RoughMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "AOMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "MetalMap");
|
||||
%this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "GlowMap");
|
||||
}
|
||||
|
||||
for(%normalI = 0; %normalI < 4; %normalI++)
|
||||
function MaterialEditorGui::convertMaterialTextureField(%this, %material, %mapName)
|
||||
{
|
||||
%normalMap = MaterialEditorGui.currentMaterial.normalMap[%normalI];
|
||||
%normalMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %normalMap);
|
||||
MaterialEditorGui.currentMaterial.normalMap[%normalI] = %normalMap;
|
||||
for(%index = 0; %index < 4; %index++)
|
||||
{
|
||||
%mapFile = %material.call("get" @ %mapName, %index);
|
||||
if(%mapFile !$= "" && !isFile(%mapFile))
|
||||
{
|
||||
//see if we can't go finding it
|
||||
%mapFile = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %mapFile);
|
||||
MaterialEditorGui.currentMaterial.call("set" @ %mapName, %mapFile, %index);
|
||||
}
|
||||
|
||||
for(%overlayI = 0; %overlayI < 4; %overlayI++)
|
||||
{
|
||||
%overlayMap = MaterialEditorGui.currentMaterial.overlayMap[%overlayI];
|
||||
%overlayMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %overlayMap);
|
||||
MaterialEditorGui.currentMaterial.overlayMap[%overlayI] = %overlayMap;
|
||||
}
|
||||
|
||||
for(%detailI = 0; %detailI < 4; %detailI++)
|
||||
{
|
||||
%detailMap = MaterialEditorGui.currentMaterial.detailMap[%detailI];
|
||||
%detailMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %detailMap);
|
||||
MaterialEditorGui.currentMaterial.detailMap[%detailI] = %detailMap;
|
||||
}
|
||||
|
||||
for(%detailNormalI = 0; %detailNormalI < 4; %detailNormalI++)
|
||||
{
|
||||
%detailNormalMap = MaterialEditorGui.currentMaterial.detailNormalMap[%detailNormalI];
|
||||
%detailNormalMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %detailNormalMap);
|
||||
MaterialEditorGui.currentMaterial.detailNormalMap[%detailNormalI] = %detailNormalMap;
|
||||
}
|
||||
|
||||
for(%lightI = 0; %lightI < 4; %lightI++)
|
||||
{
|
||||
%lightMap = MaterialEditorGui.currentMaterial.lightMap[%lightI];
|
||||
%lightMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %lightMap);
|
||||
MaterialEditorGui.currentMaterial.lightMap[%lightI] = %lightMap;
|
||||
}
|
||||
|
||||
for(%toneI = 0; %toneI < 4; %toneI++)
|
||||
{
|
||||
%toneMap = MaterialEditorGui.currentMaterial.toneMap[%toneI];
|
||||
%toneMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %toneMap);
|
||||
MaterialEditorGui.currentMaterial.toneMap[%toneI] = %toneMap;
|
||||
}
|
||||
|
||||
for(%specI = 0; %specI < 4; %specI++)
|
||||
{
|
||||
%ORMConfigMap = MaterialEditorGui.currentMaterial.ORMConfigMap[%specI];
|
||||
%ORMConfigMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %ORMConfigMap);
|
||||
MaterialEditorGui.currentMaterial.ORMConfigMap[%specI] = %ORMConfigMap;
|
||||
}
|
||||
|
||||
for(%roughI = 0; %roughI < 4; %roughI++)
|
||||
{
|
||||
%roughMap = MaterialEditorGui.currentMaterial.roughMap[%roughI];
|
||||
%roughMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %roughMap);
|
||||
MaterialEditorGui.currentMaterial.roughMap[%specI] = %roughMap;
|
||||
}
|
||||
|
||||
for(%aoI = 0; %aoI < 4; %aoI++)
|
||||
{
|
||||
%aoMap = MaterialEditorGui.currentMaterial.aoMap[%aoI];
|
||||
%aoMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %aoMap);
|
||||
MaterialEditorGui.currentMaterial.aoMap[%specI] = %aoMap;
|
||||
}
|
||||
|
||||
for(%metalI = 0; %metalI < 4; %metalI++)
|
||||
{
|
||||
%metalMap = MaterialEditorGui.currentMaterial.metalMap[%metalI];
|
||||
%metalMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %metalMap);
|
||||
MaterialEditorGui.currentMaterial.metalMap[%metalI] = %metalMap;
|
||||
}
|
||||
|
||||
for(%glowI = 0; %glowI < 4; %glowI++)
|
||||
{
|
||||
%glowMap = MaterialEditorGui.currentMaterial.glowMap[%glowI];
|
||||
%glowMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %glowMap);
|
||||
MaterialEditorGui.currentMaterial.glowMap[%glowI] = %glowMap;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -785,15 +744,6 @@ function MaterialEditorGui::guiSync( %this, %material )
|
|||
MaterialEditorPropertiesWindow-->castShadows.setValue((%material).castShadows);
|
||||
MaterialEditorPropertiesWindow-->castDynamicShadows.setValue((%material).castDynamicShadows);
|
||||
MaterialEditorPropertiesWindow-->translucentCheckbox.setValue((%material).translucent);
|
||||
/*
|
||||
|
||||
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);
|
||||
*/
|
||||
switch$((%material).translucentBlendOp)
|
||||
{
|
||||
case "None": %selectedNum = 0;
|
||||
|
|
@ -837,139 +787,175 @@ function MaterialEditorGui::guiSync( %this, %material )
|
|||
//layer specific controls are located here
|
||||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
||||
if((%material).diffuseMap[%layer] $= "")
|
||||
//Diffuse
|
||||
if((%material).getDiffuseMap(%layer) !$= "")
|
||||
{
|
||||
%difAsset = (%material).getDiffuseMapAsset(%layer);
|
||||
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( (%material).getDiffuseMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( (%material).getDiffuseMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( (%material).diffuseMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( (%material).diffuseMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).normalMap[%layer] $= "")
|
||||
//Normal
|
||||
if((%material).getNormalMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->normalMapNameText.setText( (%material).getNormalMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( (%material).getNormalMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->normalMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
|
||||
//ORM Config
|
||||
if((%material).getORMConfigMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText( (%material).getORMConfigMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( (%material).getORMConfigMap(%layer) );
|
||||
//hide unused
|
||||
MaterialEditorPropertiesWindow-->RoughnessTextEdit.setVisible(false);
|
||||
MaterialEditorPropertiesWindow-->RoughnessSlider.setVisible(false);
|
||||
MaterialEditorPropertiesWindow-->MetalnessTextEdit.setVisible(false);
|
||||
MaterialEditorPropertiesWindow-->MetalnessSlider.setVisible(false);
|
||||
|
||||
MaterialEditorPropertiesWindow-->isSRGBCheckbox.setValue((%material).isSRGB[%layer]);
|
||||
MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setValue((%material).invertRoughness[%layer]);
|
||||
//show used
|
||||
MaterialEditorPropertiesWindow-->isSRGBCheckbox.setVisible(true);
|
||||
MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setVisible(true);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->normalMapNameText.setText( (%material).normalMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( (%material).normalMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
|
||||
MaterialEditorPropertiesWindow-->RoughnessTextEdit.setText((%material).Roughness[%layer]);
|
||||
MaterialEditorPropertiesWindow-->RoughnessSlider.setValue((%material).Roughness[%layer]);
|
||||
MaterialEditorPropertiesWindow-->MetalnessTextEdit.setText((%material).Metalness[%layer]);
|
||||
MaterialEditorPropertiesWindow-->MetalnessSlider.setValue((%material).Metalness[%layer]);
|
||||
//show used
|
||||
MaterialEditorPropertiesWindow-->RoughnessTextEdit.setVisible(true);
|
||||
MaterialEditorPropertiesWindow-->RoughnessSlider.setVisible(true);
|
||||
MaterialEditorPropertiesWindow-->MetalnessTextEdit.setVisible(true);
|
||||
MaterialEditorPropertiesWindow-->MetalnessSlider.setVisible(true);
|
||||
|
||||
//hide unused
|
||||
MaterialEditorPropertiesWindow-->isSRGBCheckbox.setVisible(false);
|
||||
MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setVisible(false);
|
||||
}
|
||||
|
||||
if((%material).overlayMap[%layer] $= "")
|
||||
//AOMap
|
||||
if((%material).getAOMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText( (%material).getAOMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( (%material).getAOMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
//RoughMap
|
||||
if((%material).getRoughMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText( (%material).getRoughMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( (%material).getRoughMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
|
||||
//MetalMap
|
||||
if((%material).getMetalMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText( (%material).getMetalMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( (%material).getMetalMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
|
||||
//GlowMap
|
||||
if((%material).getGlowMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->glowMapNameText.setText( (%material).getGlowMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( (%material).getGlowMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->glowMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
|
||||
//Overlay
|
||||
if((%material).getOverlayMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->overlayMapNameText.setText( (%material).getOverlayMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( (%material).getOverlayMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->overlayMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->overlayMapNameText.setText( (%material).overlayMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( (%material).overlayMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).detailMap[%layer] $= "")
|
||||
//Detail
|
||||
if((%material).getDetailMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailMapNameText.setText( (%material).getDetailMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( (%material).getDetailMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailMapNameText.setText( (%material).detailMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( (%material).detailMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).detailNormalMap[%layer] $= "")
|
||||
//Detail Normal
|
||||
if((%material).getDetailNormalMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( (%material).getDetailNormalMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( (%material).getDetailNormalMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( (%material).detailNormalMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( (%material).detailNormalMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).lightMap[%layer] $= "")
|
||||
//Light
|
||||
if((%material).getLightMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->lightMapNameText.setText( (%material).getLightMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( (%material).getLightMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->lightMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->lightMapNameText.setText( (%material).lightMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( (%material).lightMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).toneMap[%layer] $= "")
|
||||
//Tone
|
||||
if((%material).getToneMap(%layer) !$= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->toneMapNameText.setText( (%material).getToneMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( (%material).getToneMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->toneMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->toneMapNameText.setText( (%material).toneMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( (%material).toneMap[%layer] );
|
||||
}
|
||||
MaterialEditorPropertiesWindow-->isSRGBCheckbox.setValue((%material).isSRGB[%layer]);
|
||||
MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setValue((%material).invertRoughness[%layer]);
|
||||
|
||||
if((%material).ORMConfigMap[%layer] $= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText( (%material).ORMConfigMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( (%material).ORMConfigMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).roughMap[%layer] $= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText( (%material).roughMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( (%material).roughMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).aoMap[%layer] $= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText( (%material).aoMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( (%material).aoMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).metalMap[%layer] $= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText( (%material).metalMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( (%material).metalMap[%layer] );
|
||||
}
|
||||
|
||||
if((%material).glowMap[%layer] $= "")
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->glowMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->glowMapNameText.setText( (%material).glowMap[%layer] );
|
||||
MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( (%material).glowMap[%layer] );
|
||||
}
|
||||
|
||||
MaterialEditorPropertiesWindow-->accuScaleTextEdit.setText((%material).accuScale[%layer]);
|
||||
MaterialEditorPropertiesWindow-->accuScaleTextEdit.setText((%material).accuScale[%layer]);
|
||||
|
|
@ -988,10 +974,6 @@ function MaterialEditorGui::guiSync( %this, %material )
|
|||
MaterialEditorPropertiesWindow-->colorTintSwatch.color = (%material).diffuseColor[%layer];
|
||||
MaterialEditorPropertiesWindow-->specularColorSwatch.color = (%material).specular[%layer];
|
||||
|
||||
MaterialEditorPropertiesWindow-->RoughnessTextEdit.setText((%material).Roughness[%layer]);
|
||||
MaterialEditorPropertiesWindow-->RoughnessSlider.setValue((%material).Roughness[%layer]);
|
||||
MaterialEditorPropertiesWindow-->MetalnessTextEdit.setText((%material).Metalness[%layer]);
|
||||
MaterialEditorPropertiesWindow-->MetalnessSlider.setValue((%material).Metalness[%layer]);
|
||||
MaterialEditorPropertiesWindow-->glowMulTextEdit.setText((%material).glowMul[%layer]);
|
||||
MaterialEditorPropertiesWindow-->glowMulSlider.setValue((%material).glowMul[%layer]);
|
||||
MaterialEditorPropertiesWindow-->glowCheckbox.setValue((%material).glow[%layer]);
|
||||
|
|
@ -1240,24 +1222,49 @@ function MaterialEditorGui::updateTextureMap( %this, %type, %action )
|
|||
|
||||
if( %action )
|
||||
{
|
||||
%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
{
|
||||
%bitmapCtrl.setBitmap(%texture);
|
||||
|
||||
%bitmap = %bitmapCtrl.bitmap;
|
||||
%bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/","");
|
||||
%bitmapCtrl.setBitmap(%bitmap);
|
||||
%textCtrl.setText(%bitmap);
|
||||
MaterialEditorGui.updateActiveMaterial(%type @ "Map[" @ %layer @ "]","\"" @ %bitmap @ "\"");
|
||||
}
|
||||
AssetBrowser.showDialog("ImageAsset", %this@".doUpdateTextureMap");
|
||||
}
|
||||
else
|
||||
{
|
||||
%textCtrl.setText("None");
|
||||
%bitmapCtrl.setBitmap("tools/materialEditor/gui/unknownImage");
|
||||
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 );
|
||||
|
||||
%assetDef = AssetDatabase.acquireAsset(%assetId);
|
||||
|
||||
%texture = %assetDef.getImagePath();
|
||||
|
||||
//%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
{
|
||||
%bitmapCtrl.setBitmap(%texture);
|
||||
|
||||
%bitmap = %bitmapCtrl.bitmap;
|
||||
%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)
|
||||
|
|
@ -1266,8 +1273,8 @@ function MaterialEditorGui::updateDetailScale(%this,%newScale)
|
|||
|
||||
%detailScale = "\"" @ %newScale SPC %newScale @ "\"";
|
||||
MaterialEditorGui.updateActiveMaterial("detailScale[" @ %layer @ "]", %detailScale);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateDetailNormalStrength(%this,%newStrength)
|
||||
{
|
||||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
|
@ -1276,148 +1283,6 @@ function MaterialEditorGui::updateDetailNormalStrength(%this,%newStrength)
|
|||
MaterialEditorGui.updateActiveMaterial("detailNormalMapStrength[" @ %layer @ "]", %detailStrength);
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateORMConfigMap(%this,%action)
|
||||
{
|
||||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
||||
if( %action )
|
||||
{
|
||||
%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
{
|
||||
MaterialEditorGui.updateActiveMaterial("pixelSpecular[" @ MaterialEditorGui.currentLayer @ "]", 0);
|
||||
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap(%texture);
|
||||
|
||||
%bitmap = MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.bitmap;
|
||||
%bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/","");
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap(%bitmap);
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText(%bitmap);
|
||||
MaterialEditorGui.updateActiveMaterial("ORMConfigMap[" @ %layer @ "]","\"" @ %bitmap @ "\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText("None");
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap("tools/materialEditor/gui/unknownImage");
|
||||
MaterialEditorGui.updateActiveMaterial("ORMConfigMap[" @ %layer @ "]","");
|
||||
}
|
||||
|
||||
MaterialEditorGui.guiSync( materialEd_previewMaterial );
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateRoughMap(%this,%action)
|
||||
{
|
||||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
||||
if( %action )
|
||||
{
|
||||
%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap(%texture);
|
||||
|
||||
%bitmap = MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.bitmap;
|
||||
%bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/","");
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap(%bitmap);
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText(%bitmap);
|
||||
MaterialEditorGui.updateActiveMaterial("roughMap[" @ %layer @ "]","\"" @ %bitmap @ "\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText("None");
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage");
|
||||
MaterialEditorGui.updateActiveMaterial("roughMap[" @ %layer @ "]","");
|
||||
}
|
||||
|
||||
MaterialEditorGui.guiSync( materialEd_previewMaterial );
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateaoMap(%this,%action)
|
||||
{
|
||||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
||||
if( %action )
|
||||
{
|
||||
%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap(%texture);
|
||||
|
||||
%bitmap = MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.bitmap;
|
||||
%bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/","");
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap(%bitmap);
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText(%bitmap);
|
||||
MaterialEditorGui.updateActiveMaterial("aoMap[" @ %layer @ "]","\"" @ %bitmap @ "\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText("None");
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage");
|
||||
MaterialEditorGui.updateActiveMaterial("aoMap[" @ %layer @ "]","");
|
||||
}
|
||||
|
||||
MaterialEditorGui.guiSync( materialEd_previewMaterial );
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updatemetalMap(%this,%action)
|
||||
{
|
||||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
||||
if( %action )
|
||||
{
|
||||
%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap(%texture);
|
||||
|
||||
%bitmap = MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.bitmap;
|
||||
%bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/","");
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap(%bitmap);
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText(%bitmap);
|
||||
MaterialEditorGui.updateActiveMaterial("metalMap[" @ %layer @ "]","\"" @ %bitmap @ "\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText("None");
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage");
|
||||
MaterialEditorGui.updateActiveMaterial("metalMap[" @ %layer @ "]","");
|
||||
}
|
||||
|
||||
MaterialEditorGui.guiSync( materialEd_previewMaterial );
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateGlowMap(%this,%action)
|
||||
{
|
||||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
||||
if( %action )
|
||||
{
|
||||
%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->GlowMapDisplayBitmap.setBitmap(%texture);
|
||||
|
||||
%bitmap = MaterialEditorPropertiesWindow-->GlowMapDisplayBitmap.bitmap;
|
||||
%bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/","");
|
||||
MaterialEditorPropertiesWindow-->GlowMapDisplayBitmap.setBitmap(%bitmap);
|
||||
MaterialEditorPropertiesWindow-->GlowMapNameText.setText(%bitmap);
|
||||
MaterialEditorGui.updateActiveMaterial("glowMap[" @ %layer @ "]","\"" @ %bitmap @ "\"");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->GlowMapNameText.setText("None");
|
||||
MaterialEditorPropertiesWindow-->GlowMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage");
|
||||
MaterialEditorGui.updateActiveMaterial("glowMap[" @ %layer @ "]","");
|
||||
}
|
||||
|
||||
MaterialEditorGui.guiSync( materialEd_previewMaterial );
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateRotationOffset(%this, %isSlider, %onMouseUp)
|
||||
{
|
||||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
|
@ -1599,12 +1464,6 @@ function MaterialEditorGui::updateColorMultiply(%this,%color)
|
|||
%this.syncGuiColor(MaterialEditorPropertiesWindow-->colorTintSwatch, %propName, %color);
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateSpecularCheckbox(%this,%value)
|
||||
{
|
||||
MaterialEditorGui.updateActiveMaterial("pixelSpecular[" @ MaterialEditorGui.currentLayer @ "]", %value);
|
||||
MaterialEditorGui.guiSync( materialEd_previewMaterial );
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateSpecular(%this, %color)
|
||||
{
|
||||
%propName = "specular[" @ MaterialEditorGui.currentLayer @ "]";
|
||||
|
|
@ -2164,6 +2023,16 @@ function MaterialEditorGui::save( %this )
|
|||
|
||||
function MaterialEditorGui::createNewMaterial( %this )
|
||||
{
|
||||
AssetBrowser_SelectModule.showDialog("MaterialEditorGui.pickedNewMaterialTargetModule");
|
||||
AssetBrowser_SelectModuleWindow.selectWindow();
|
||||
}
|
||||
|
||||
function MaterialEditorGui::pickedNewMaterialTargetModule( %this, %module )
|
||||
{
|
||||
%moduleDef = ModuleDatabase.findModule(%module);
|
||||
PE_EmitterEditor.targetModule = %module;
|
||||
MaterialEditorGui.defaultMaterialFile = %moduleDef.ModulePath @ "/scripts/managedData/materials." @ $TorqueScriptFileExtension;
|
||||
|
||||
%action = %this.createUndo(ActionCreateNewMaterial, "Create New Material");
|
||||
%action.object = "";
|
||||
|
||||
|
|
@ -2571,10 +2440,10 @@ function MaterialEditorGui::saveCompositeMap(%this)
|
|||
%material = %this.currentMaterial;
|
||||
%layer = %this.currentLayer;
|
||||
|
||||
%roughMap = %material.roughMap[%layer];
|
||||
%aoMap = %material.aoMap[%layer];
|
||||
%metalMap = %material.metalMap[%layer];
|
||||
%glowMap = %material.glowMap[%layer];
|
||||
%roughMap = %material.getRoughMap(%layer);
|
||||
%aoMap = %material.getAOMap(%layer);
|
||||
%metalMap = %material.getMetalMap(%layer);
|
||||
%glowMap = %material.getGlowMap(%layer);
|
||||
|
||||
%roughness = %material.RoughnessChan[%layer];
|
||||
%ao = %material.AOChan[%layer];
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
$PE_EMITTEREDITOR_DEFAULT_FILENAME = "art/particles/managedParticleEmitterData." @ $TorqueScriptFileExtension;
|
||||
$PE_EMITTEREDITOR_DEFAULT_FILENAME = "data/managedParticleEmitterData." @ $TorqueScriptFileExtension;
|
||||
|
||||
|
||||
//=============================================================================================
|
||||
|
|
@ -499,8 +499,10 @@ function PE_EmitterEditor::setEmitterDirty( %this )
|
|||
PE_EmitterEditor.dirty = true;
|
||||
|
||||
%emitter = PE_EmitterEditor.currEmitter;
|
||||
%filename = %emitter.getFilename();
|
||||
%editorFilename = "tools/particleEditor/particleEmitterEditor.ed." @ $TorqueScriptFileExtension;
|
||||
|
||||
if( %emitter.getFilename() $= "" || %emitter.getFilename() $= "tools/particleEditor/particleEmitterEditor.ed." @ $TorqueScriptFileExtension )
|
||||
if( %filename $= "" || %filename $= %editorFilename )
|
||||
PE_EmitterSaver.setDirty( %emitter, $PE_EMITTEREDITOR_DEFAULT_FILENAME );
|
||||
else
|
||||
PE_EmitterSaver.setDirty( %emitter );
|
||||
|
|
@ -551,6 +553,16 @@ function PE_EmitterEditor::showNewDialog( %this )
|
|||
|
||||
function PE_EmitterEditor::createEmitter( %this )
|
||||
{
|
||||
AssetBrowser_SelectModule.showDialog("PE_EmitterEditor.pickedNewEmitterTargetModule");
|
||||
AssetBrowser_SelectModuleWindow.selectWindow();
|
||||
}
|
||||
|
||||
function PE_EmitterEditor::pickedNewEmitterTargetModule( %this, %module )
|
||||
{
|
||||
%moduleDef = ModuleDatabase.findModule(%module);
|
||||
PE_EmitterEditor.targetModule = %module;
|
||||
$PE_EMITTEREDITOR_DEFAULT_FILENAME = %moduleDef.ModulePath @ "/scripts/managedData/managedParticleEmitterData." @ $TorqueScriptFileExtension;
|
||||
|
||||
// Create a new emitter.
|
||||
%emitter = getUniqueName( "newEmitter" );
|
||||
datablock ParticleEmitterData( %emitter : DefaultEmitter )
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
$PE_PARTICLEEDITOR_DEFAULT_FILENAME = "art/particles/managedParticleData." @ $TorqueScriptFileExtension;
|
||||
$PE_PARTICLEEDITOR_DEFAULT_FILENAME = "data/managedParticleData." @ $TorqueScriptFileExtension;
|
||||
|
||||
|
||||
//=============================================================================================
|
||||
|
|
@ -57,11 +57,16 @@ function PE_ParticleEditor::guiSync( %this )
|
|||
%popup.sort();
|
||||
%popup.setSelected( %data );
|
||||
|
||||
%bitmap = MaterialEditorGui.searchForTexture( %data.getName(), %data.textureName );
|
||||
%bitmap = %data.getTexture();//MaterialEditorGui.searchForTexture( %data.getName(), %data.getTexture() );
|
||||
if( %bitmap !$= "" )
|
||||
{
|
||||
PE_ParticleEditor-->PEP_previewImage.setBitmap( %bitmap );
|
||||
PE_ParticleEditor-->PEP_previewImageName.setText( %bitmap );
|
||||
|
||||
%text = %data.getTextureAsset();
|
||||
if(%text $= "")
|
||||
%text = %bitmap;
|
||||
|
||||
PE_ParticleEditor-->PEP_previewImageName.setText( %text );
|
||||
PE_ParticleEditor-->PEP_previewImageName.tooltip = %bitmap;
|
||||
}
|
||||
else
|
||||
|
|
@ -215,15 +220,7 @@ function PE_ParticleEditor::updateParticleTexture( %this, %action )
|
|||
{
|
||||
if( %action )
|
||||
{
|
||||
%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
{
|
||||
PE_ParticleEditor-->PEP_previewImage.setBitmap(%texture);
|
||||
PE_ParticleEditor-->PEP_previewImageName.setText(%texture);
|
||||
PE_ParticleEditor-->PEP_previewImageName.tooltip = %texture;
|
||||
|
||||
PE_ParticleEditor.updateParticle( "textureName", %texture );
|
||||
}
|
||||
AssetBrowser.showDialog("ImageAsset", "PE_ParticleEditor.onImageAssetSelected");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -235,6 +232,18 @@ function PE_ParticleEditor::updateParticleTexture( %this, %action )
|
|||
}
|
||||
}
|
||||
|
||||
function PE_ParticleEditor::onImageAssetSelected(%this, %assetId)
|
||||
{
|
||||
if( AssetDatabase.isDeclaredAsset(%assetId) )
|
||||
{
|
||||
PE_ParticleEditor-->PEP_previewImage.setBitmap(%assetId);
|
||||
PE_ParticleEditor-->PEP_previewImageName.setText(%assetId);
|
||||
PE_ParticleEditor-->PEP_previewImageName.tooltip = %assetId;
|
||||
|
||||
PE_ParticleEditor.updateParticle( "textureAsset", %assetId );
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
function PE_ParticleEditor::updateLifeFields( %this, %isRandom, %value, %isSlider, %onMouseUp )
|
||||
|
|
@ -389,11 +398,18 @@ function PE_ParticleEditor::loadNewParticle( %this, %particle )
|
|||
|
||||
PE_ParticleEditor.currParticle = %particle;
|
||||
|
||||
error("PE_ParticleEditor::loadNewParticle() - Loading particle: " @ %particle.getName());
|
||||
error("Particle TextureName: " @ %particle.getTexture());
|
||||
|
||||
error("ReloadingParticle...");
|
||||
%particle.reload();
|
||||
|
||||
PE_ParticleEditor_NotDirtyParticle.assignFieldsFrom( %particle );
|
||||
PE_ParticleEditor_NotDirtyParticle.originalName = %particle.getName();
|
||||
|
||||
error("Post duplicate Particle TextureName: " @ %particle.getTexture());
|
||||
error("Post duplicate PE_ParticleEditor_NotDirtyParticle TextureName: " @ PE_ParticleEditor_NotDirtyParticle.getTexture());
|
||||
|
||||
PE_ParticleEditor.guiSync();
|
||||
PE_ParticleEditor.setParticleNotDirty();
|
||||
}
|
||||
|
|
@ -406,8 +422,10 @@ function PE_ParticleEditor::setParticleDirty( %this )
|
|||
PE_ParticleEditor.dirty = true;
|
||||
|
||||
%particle = PE_ParticleEditor.currParticle;
|
||||
%filename = %particle.getFilename();
|
||||
%editorFilename = "tools/particleEditor/particleParticleEditor.ed." @ $TorqueScriptFileExtension;
|
||||
|
||||
if( %particle.getFilename() $= "" || %particle.getFilename() $= "tools/particleEditor/particleParticleEditor.ed." @ $TorqueScriptFileExtension )
|
||||
if( %filename $= "" || %filename $= %editorFilename )
|
||||
PE_ParticleSaver.setDirty( %particle, $PE_PARTICLEEDITOR_DEFAULT_FILENAME );
|
||||
else
|
||||
PE_ParticleSaver.setDirty( %particle );
|
||||
|
|
@ -462,6 +480,24 @@ function PE_ParticleEditor::createParticle( %this, %replaceSlot )
|
|||
else
|
||||
%particleIndex = %replaceSlot - 1;
|
||||
|
||||
PE_ParticleEditor.newParticleSlot = %particleIndex;
|
||||
|
||||
if(%replaceSlot $= "" || %replaceSlot != 0)
|
||||
{
|
||||
AssetBrowser_SelectModule.showDialog("PE_ParticleEditor.pickedNewParticleTargetModule");
|
||||
AssetBrowser_SelectModuleWindow.selectWindow();
|
||||
}
|
||||
else
|
||||
{
|
||||
PE_ParticleEditor.pickedNewParticleTargetModule(PE_EmitterEditor.targetModule);
|
||||
}
|
||||
}
|
||||
|
||||
function PE_ParticleEditor::pickedNewParticleTargetModule(%this, %module)
|
||||
{
|
||||
%moduleDef = ModuleDatabase.findModule(%module);
|
||||
$PE_PARTICLEEDITOR_DEFAULT_FILENAME = %moduleDef.ModulePath @ "/scripts/managedData/managedParticleData." @ $TorqueScriptFileExtension;
|
||||
|
||||
// Create the particle datablock and add to the emitter.
|
||||
|
||||
%newParticle = getUniqueName( "newParticle" );
|
||||
|
|
@ -474,8 +510,8 @@ function PE_ParticleEditor::createParticle( %this, %replaceSlot )
|
|||
|
||||
%action = ParticleEditor.createUndo( ActionCreateNewParticle, "Create New Particle" );
|
||||
%action.particle = %newParticle.getId();
|
||||
%action.particleIndex = %particleIndex;
|
||||
%action.prevParticle = ( "PEE_EmitterParticleSelector" @ ( %particleIndex + 1 ) ).getSelected();
|
||||
%action.particleIndex = PE_ParticleEditor.newParticleSlot;
|
||||
%action.prevParticle = ( "PEE_EmitterParticleSelector" @ ( PE_ParticleEditor.newParticleSlot + 1 ) ).getSelected();
|
||||
%action.emitter = PE_EmitterEditor.currEmitter;
|
||||
|
||||
ParticleEditor.submitUndo( %action );
|
||||
|
|
|
|||
|
|
@ -114,6 +114,21 @@ function T3Dpre4ProjectImporter::copyFiles(%this)
|
|||
%file = findNextFileMultiExpr( $ProjectImporter::sourceContentFolder @ "/*.*" );
|
||||
}
|
||||
|
||||
//
|
||||
//Now that we've done that, we'll load and scan the module for asset defs
|
||||
%file = findFirstFileMultiExpr( $ProjectImporter::modulePath @ "/*.asset.taml", true);
|
||||
|
||||
while( %file !$= "" )
|
||||
{
|
||||
%moduleName = AssetBrowser.dirHandler.getModuleFromAddress(%file).ModuleId;
|
||||
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
|
||||
|
||||
AssetDatabase.addDeclaredAsset(%moduleDef, %file);
|
||||
|
||||
%file = findNextFileMultiExpr( $ProjectImporter::modulePath @ "/*.asset.taml" );
|
||||
}
|
||||
//
|
||||
|
||||
%currentPage-->fileCopyText.setValue("File copy done! Press Next to continue.");
|
||||
|
||||
ProjectImportWindow-->nextButton.setActive(true);
|
||||
|
|
|
|||
|
|
@ -1,268 +1,496 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<EditorSettings>
|
||||
<Group name="AssetBrowser">
|
||||
<Setting name="previewSize">Small</Setting>
|
||||
<Group
|
||||
name="AssetBrowser">
|
||||
<Setting
|
||||
name="previewSize">Small</Setting>
|
||||
</Group>
|
||||
<Group name="AssetCreation">
|
||||
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
|
||||
<Setting name="AutoImport">1</Setting>
|
||||
<Setting name="CppAssetSubdirectoryFormat"><AssetType>/<SpecialAssetTag>/</Setting>
|
||||
<Setting name="CubemapAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Setting name="GUIAssetSubdirectoryFormat"><AssetType>/OtherFolder/</Setting>
|
||||
<Setting name="LevelAssetSubdirectoryFormat"><AssetType>/<AssetName>/</Setting>
|
||||
<Setting name="PostFXAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Setting name="ScriptAssetSubdirectoryFormat"><AssetType>/<SpecialAssetTag>/</Setting>
|
||||
<Setting name="StatemachineAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Setting name="TerrainAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Setting name="TerrainMatAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Group
|
||||
name="AssetCreation">
|
||||
<Setting
|
||||
name="AssetImporDefaultConfig">TestConfig</Setting>
|
||||
<Setting
|
||||
name="AutoImport">1</Setting>
|
||||
<Setting
|
||||
name="CppAssetSubdirectoryFormat"><AssetType>/<SpecialAssetTag>/</Setting>
|
||||
<Setting
|
||||
name="CubemapAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Setting
|
||||
name="GUIAssetSubdirectoryFormat"><AssetType>/OtherFolder/</Setting>
|
||||
<Setting
|
||||
name="LevelAssetSubdirectoryFormat"><AssetType>/<AssetName>/</Setting>
|
||||
<Setting
|
||||
name="PostFXAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Setting
|
||||
name="ScriptAssetSubdirectoryFormat"><AssetType>/<SpecialAssetTag>/</Setting>
|
||||
<Setting
|
||||
name="StatemachineAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Setting
|
||||
name="TerrainAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
<Setting
|
||||
name="TerrainMatAssetSubdirectoryFormat"><AssetType>/</Setting>
|
||||
</Group>
|
||||
<Group name="Assets">
|
||||
<Setting name="AssetImporDefaultConfig">DefaultImportConfig</Setting>
|
||||
<Setting name="AutoImport">1</Setting>
|
||||
<Group name="Browser">
|
||||
<Setting name="previewTileSize">1</Setting>
|
||||
<Group
|
||||
name="Assets">
|
||||
<Setting
|
||||
name="AssetImporDefaultConfig">DefaultImportConfig</Setting>
|
||||
<Setting
|
||||
name="AutoImport">1</Setting>
|
||||
<Group
|
||||
name="Browser">
|
||||
<Setting
|
||||
name="previewTileSize">1</Setting>
|
||||
<Setting
|
||||
name="showCoreModule">1</Setting>
|
||||
<Setting
|
||||
name="showToolsModule">1</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group name="AxisGizmo">
|
||||
<Setting name="axisGizmoMaxScreenLen">100</Setting>
|
||||
<Setting name="mouseRotateScalar">0.8</Setting>
|
||||
<Setting name="mouseScaleScalar">0.8</Setting>
|
||||
<Setting name="renderInfoText">1</Setting>
|
||||
<Setting name="renderWhenUsed">0</Setting>
|
||||
<Setting name="rotationSnap">15</Setting>
|
||||
<Setting name="snapRotations">0</Setting>
|
||||
<Group name="Grid">
|
||||
<Setting name="forceSnapRotations">1</Setting>
|
||||
<Setting name="gridColor">255 255 255 20</Setting>
|
||||
<Setting name="gridSize">1 1 1</Setting>
|
||||
<Setting name="planeDim">500</Setting>
|
||||
<Setting name="renderPlane">0</Setting>
|
||||
<Setting name="renderPlaneHashes">0</Setting>
|
||||
<Setting name="snapToGrid">0</Setting>
|
||||
<Group
|
||||
name="AxisGizmo">
|
||||
<Setting
|
||||
name="axisGizmoMaxScreenLen">100</Setting>
|
||||
<Setting
|
||||
name="mouseRotateScalar">0.8</Setting>
|
||||
<Setting
|
||||
name="mouseScaleScalar">0.8</Setting>
|
||||
<Setting
|
||||
name="renderInfoText">1</Setting>
|
||||
<Setting
|
||||
name="renderWhenUsed">0</Setting>
|
||||
<Setting
|
||||
name="rotationSnap">15</Setting>
|
||||
<Setting
|
||||
name="snapRotations">0</Setting>
|
||||
<Group
|
||||
name="Grid">
|
||||
<Setting
|
||||
name="forceSnapRotations">1</Setting>
|
||||
<Setting
|
||||
name="gridColor">255 255 255 20</Setting>
|
||||
<Setting
|
||||
name="gridSize">1 1 1</Setting>
|
||||
<Setting
|
||||
name="planeDim">500</Setting>
|
||||
<Setting
|
||||
name="renderPlane">0</Setting>
|
||||
<Setting
|
||||
name="renderPlaneHashes">0</Setting>
|
||||
<Setting
|
||||
name="snapToGrid">0</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group name="ConvexEditor">
|
||||
<Setting name="materialName">Grid_512_Orange</Setting>
|
||||
<Group
|
||||
name="ConvexEditor">
|
||||
<Setting
|
||||
name="materialName">Grid_512_Orange</Setting>
|
||||
</Group>
|
||||
<Group name="DatablockEditor">
|
||||
<Setting name="libraryTab">1</Setting>
|
||||
<Group
|
||||
name="DatablockEditor">
|
||||
<Setting
|
||||
name="libraryTab">1</Setting>
|
||||
</Group>
|
||||
<Group name="GuiEditor">
|
||||
<Setting name="lastPath">tools/RPGDialogEditor/gui</Setting>
|
||||
<Setting name="previewResolution">1024 768</Setting>
|
||||
<Group name="EngineDevelopment">
|
||||
<Setting name="showEditorGuis">0</Setting>
|
||||
<Setting name="showEditorProfiles">0</Setting>
|
||||
<Setting name="toggleIntoEditor">0</Setting>
|
||||
<Group
|
||||
name="GuiEditor">
|
||||
<Setting
|
||||
name="lastPath">tools/RPGDialogEditor/gui</Setting>
|
||||
<Setting
|
||||
name="previewResolution">1024 768</Setting>
|
||||
<Group
|
||||
name="EngineDevelopment">
|
||||
<Setting
|
||||
name="showEditorGuis">0</Setting>
|
||||
<Setting
|
||||
name="showEditorProfiles">0</Setting>
|
||||
<Setting
|
||||
name="toggleIntoEditor">0</Setting>
|
||||
</Group>
|
||||
<Group name="Help">
|
||||
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
|
||||
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
|
||||
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
|
||||
<Group
|
||||
name="Help">
|
||||
<Setting
|
||||
name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
|
||||
<Setting
|
||||
name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
|
||||
<Setting
|
||||
name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
|
||||
</Group>
|
||||
<Group name="Library">
|
||||
<Setting name="viewType">Categorized</Setting>
|
||||
<Group
|
||||
name="Library">
|
||||
<Setting
|
||||
name="viewType">Categorized</Setting>
|
||||
</Group>
|
||||
<Group name="Rendering">
|
||||
<Setting name="drawBorderLines">1</Setting>
|
||||
<Setting name="drawGuides">1</Setting>
|
||||
<Group
|
||||
name="Rendering">
|
||||
<Setting
|
||||
name="drawBorderLines">1</Setting>
|
||||
<Setting
|
||||
name="drawGuides">1</Setting>
|
||||
</Group>
|
||||
<Group name="Selection">
|
||||
<Setting name="fullBox">0</Setting>
|
||||
<Group
|
||||
name="Selection">
|
||||
<Setting
|
||||
name="fullBox">0</Setting>
|
||||
</Group>
|
||||
<Group name="Snapping">
|
||||
<Setting name="sensitivity">2</Setting>
|
||||
<Setting name="snap2Grid">0</Setting>
|
||||
<Setting name="snap2GridSize">8</Setting>
|
||||
<Setting name="snapToCanvas">1</Setting>
|
||||
<Setting name="snapToCenters">1</Setting>
|
||||
<Setting name="snapToControls">1</Setting>
|
||||
<Setting name="snapToEdges">1</Setting>
|
||||
<Setting name="snapToGuides">1</Setting>
|
||||
<Group
|
||||
name="Snapping">
|
||||
<Setting
|
||||
name="sensitivity">2</Setting>
|
||||
<Setting
|
||||
name="snap2Grid">0</Setting>
|
||||
<Setting
|
||||
name="snap2GridSize">8</Setting>
|
||||
<Setting
|
||||
name="snapToCanvas">1</Setting>
|
||||
<Setting
|
||||
name="snapToCenters">1</Setting>
|
||||
<Setting
|
||||
name="snapToControls">1</Setting>
|
||||
<Setting
|
||||
name="snapToEdges">1</Setting>
|
||||
<Setting
|
||||
name="snapToGuides">1</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group name="LevelInformation">
|
||||
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
|
||||
<Group name="levels">
|
||||
<Group name="BlankRoom.mis">
|
||||
<Setting name="cameraSpeed">25</Setting>
|
||||
<Group
|
||||
name="LevelInformation">
|
||||
<Setting
|
||||
name="levelsDirectory">data/FPSGameplay/levels</Setting>
|
||||
<Group
|
||||
name="levels">
|
||||
<Group
|
||||
name="BlankRoom.mis">
|
||||
<Setting
|
||||
name="cameraSpeed">25</Setting>
|
||||
</Group>
|
||||
<Group name="DefaultEditorLevel.mis">
|
||||
<Setting name="cameraSpeed">25</Setting>
|
||||
<Group
|
||||
name="DefaultEditorLevel.mis">
|
||||
<Setting
|
||||
name="cameraSpeed">25</Setting>
|
||||
</Group>
|
||||
<Group name="EmptyLevel.mis">
|
||||
<Setting name="cameraSpeed">25</Setting>
|
||||
<Group
|
||||
name="EmptyLevel.mis">
|
||||
<Setting
|
||||
name="cameraSpeed">25</Setting>
|
||||
</Group>
|
||||
<Group name="Empty Terrain.mis">
|
||||
<Setting name="cameraSpeed">25</Setting>
|
||||
<Group
|
||||
name="Empty Terrain.mis">
|
||||
<Setting
|
||||
name="cameraSpeed">25</Setting>
|
||||
</Group>
|
||||
<Group name="PbrMatTest.mis">
|
||||
<Setting name="cameraSpeed">5</Setting>
|
||||
<Group
|
||||
name="PbrMatTest.mis">
|
||||
<Setting
|
||||
name="cameraSpeed">5</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group name="MeshRoadEditor">
|
||||
<Setting name="DefaultNormal">0 0 1</Setting>
|
||||
<Setting name="DefaultWidth">10</Setting>
|
||||
<Setting name="HoverSplineColor">255 0 0 255</Setting>
|
||||
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
|
||||
<Setting name="sideMaterialName">DefaultRoadMaterialOther</Setting>
|
||||
<Setting name="topMaterialName">DefaultRoadMaterialTop</Setting>
|
||||
<Group
|
||||
name="MeshRoadEditor">
|
||||
<Setting
|
||||
name="DefaultNormal">0 0 1</Setting>
|
||||
<Setting
|
||||
name="DefaultWidth">10</Setting>
|
||||
<Setting
|
||||
name="HoverSplineColor">255 0 0 255</Setting>
|
||||
<Setting
|
||||
name="SelectedSplineColor">0 255 0 255</Setting>
|
||||
<Setting
|
||||
name="sideMaterialName">DefaultRoadMaterialOther</Setting>
|
||||
<Setting
|
||||
name="topMaterialName">DefaultRoadMaterialTop</Setting>
|
||||
</Group>
|
||||
<Group name="NavEditor">
|
||||
<Setting name="backgroundBuild">1</Setting>
|
||||
<Setting name="SpawnClass">AIPlayer</Setting>
|
||||
<Setting name="spawnDatablock">DefaultPlayerData</Setting>
|
||||
<Group
|
||||
name="NavEditor">
|
||||
<Setting
|
||||
name="backgroundBuild">1</Setting>
|
||||
<Setting
|
||||
name="SpawnClass">AIPlayer</Setting>
|
||||
<Setting
|
||||
name="spawnDatablock">DefaultPlayerData</Setting>
|
||||
</Group>
|
||||
<Group name="RiverEditor">
|
||||
<Setting name="DefaultDepth">5</Setting>
|
||||
<Setting name="DefaultNormal">0 0 1</Setting>
|
||||
<Setting name="DefaultWidth">10</Setting>
|
||||
<Setting name="HoverNodeColor">255 255 255 255</Setting>
|
||||
<Setting name="HoverSplineColor">255 0 0 255</Setting>
|
||||
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
|
||||
<Group
|
||||
name="RiverEditor">
|
||||
<Setting
|
||||
name="DefaultDepth">5</Setting>
|
||||
<Setting
|
||||
name="DefaultNormal">0 0 1</Setting>
|
||||
<Setting
|
||||
name="DefaultWidth">10</Setting>
|
||||
<Setting
|
||||
name="HoverNodeColor">255 255 255 255</Setting>
|
||||
<Setting
|
||||
name="HoverSplineColor">255 0 0 255</Setting>
|
||||
<Setting
|
||||
name="SelectedSplineColor">0 255 0 255</Setting>
|
||||
</Group>
|
||||
<Group name="RoadEditor">
|
||||
<Setting name="DefaultWidth">10</Setting>
|
||||
<Setting name="HoverNodeColor">255 255 255 255</Setting>
|
||||
<Setting name="materialName">DefaultDecalRoadMaterial</Setting>
|
||||
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
|
||||
<Group
|
||||
name="RoadEditor">
|
||||
<Setting
|
||||
name="DefaultWidth">10</Setting>
|
||||
<Setting
|
||||
name="HoverNodeColor">255 255 255 255</Setting>
|
||||
<Setting
|
||||
name="materialName">DefaultDecalRoadMaterial</Setting>
|
||||
<Setting
|
||||
name="SelectedSplineColor">0 255 0 255</Setting>
|
||||
</Group>
|
||||
<Group name="ShapeEditor">
|
||||
<Setting name="AdvancedWndVisible">1</Setting>
|
||||
<Setting name="backgroundColor">0 0 0 100</Setting>
|
||||
<Setting name="gridDimension">40 40</Setting>
|
||||
<Setting name="gridSize">0.1</Setting>
|
||||
<Setting name="highlightMaterial">1</Setting>
|
||||
<Setting name="RenderCollision">0</Setting>
|
||||
<Setting name="renderMounts">1</Setting>
|
||||
<Setting name="showBounds">0</Setting>
|
||||
<Setting name="ShowGrid">1</Setting>
|
||||
<Setting name="showNodes">1</Setting>
|
||||
<Setting name="showObjBox">1</Setting>
|
||||
<Setting name="SunAmbientColor">180 180 180 255</Setting>
|
||||
<Setting name="SunAngleX">45</Setting>
|
||||
<Setting name="SunAngleZ">135</Setting>
|
||||
<Setting name="SunDiffuseColor">255 255 255 255</Setting>
|
||||
<Group
|
||||
name="ShapeEditor">
|
||||
<Setting
|
||||
name="AdvancedWndVisible">1</Setting>
|
||||
<Setting
|
||||
name="backgroundColor">0 0 0 100</Setting>
|
||||
<Setting
|
||||
name="gridDimension">40 40</Setting>
|
||||
<Setting
|
||||
name="gridSize">0.1</Setting>
|
||||
<Setting
|
||||
name="highlightMaterial">1</Setting>
|
||||
<Setting
|
||||
name="RenderCollision">0</Setting>
|
||||
<Setting
|
||||
name="renderMounts">1</Setting>
|
||||
<Setting
|
||||
name="showBounds">0</Setting>
|
||||
<Setting
|
||||
name="ShowGrid">1</Setting>
|
||||
<Setting
|
||||
name="showNodes">1</Setting>
|
||||
<Setting
|
||||
name="showObjBox">1</Setting>
|
||||
<Setting
|
||||
name="SunAmbientColor">180 180 180 255</Setting>
|
||||
<Setting
|
||||
name="SunAngleX">45</Setting>
|
||||
<Setting
|
||||
name="SunAngleZ">135</Setting>
|
||||
<Setting
|
||||
name="SunDiffuseColor">255 255 255 255</Setting>
|
||||
</Group>
|
||||
<Group name="TerrainEditor">
|
||||
<Setting name="currentAction">lowerHeight</Setting>
|
||||
<Group name="ActionValues">
|
||||
<Setting name="adjustHeightVal">10</Setting>
|
||||
<Setting name="noiseFactor">1</Setting>
|
||||
<Setting name="scaleVal">1</Setting>
|
||||
<Setting name="setHeightVal">100</Setting>
|
||||
<Setting name="SlopeMaxAngle">90</Setting>
|
||||
<Setting name="SlopeMinAngle">0</Setting>
|
||||
<Setting name="smoothFactor">0.1</Setting>
|
||||
<Setting name="softSelectDefaultFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
|
||||
<Setting name="softSelectFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
|
||||
<Setting name="softSelectRadius">50</Setting>
|
||||
<Group
|
||||
name="TerrainEditor">
|
||||
<Setting
|
||||
name="currentAction">lowerHeight</Setting>
|
||||
<Group
|
||||
name="ActionValues">
|
||||
<Setting
|
||||
name="adjustHeightVal">10</Setting>
|
||||
<Setting
|
||||
name="noiseFactor">1</Setting>
|
||||
<Setting
|
||||
name="scaleVal">1</Setting>
|
||||
<Setting
|
||||
name="setHeightVal">100</Setting>
|
||||
<Setting
|
||||
name="SlopeMaxAngle">90</Setting>
|
||||
<Setting
|
||||
name="SlopeMinAngle">0</Setting>
|
||||
<Setting
|
||||
name="smoothFactor">0.1</Setting>
|
||||
<Setting
|
||||
name="softSelectDefaultFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
|
||||
<Setting
|
||||
name="softSelectFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
|
||||
<Setting
|
||||
name="softSelectRadius">50</Setting>
|
||||
</Group>
|
||||
<Group name="Brush">
|
||||
<Setting name="brushPressure">1</Setting>
|
||||
<Setting name="brushSize">40 40</Setting>
|
||||
<Setting name="brushSoftness">1</Setting>
|
||||
<Setting name="brushType">ellipse</Setting>
|
||||
<Setting name="maxBrushSize">40 40</Setting>
|
||||
<Group
|
||||
name="Brush">
|
||||
<Setting
|
||||
name="brushPressure">1</Setting>
|
||||
<Setting
|
||||
name="brushSize">40 40</Setting>
|
||||
<Setting
|
||||
name="brushSoftness">1</Setting>
|
||||
<Setting
|
||||
name="brushType">ellipse</Setting>
|
||||
<Setting
|
||||
name="maxBrushSize">40 40</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group name="Theme">
|
||||
<Setting name="dividerDarkColor">17 16 15 255</Setting>
|
||||
<Setting name="dividerLightColor">96 94 92 255</Setting>
|
||||
<Setting name="dividerMidColor">50 49 48 255</Setting>
|
||||
<Setting name="fieldBGColor">59 58 57 255</Setting>
|
||||
<Setting name="fieldBGHLColor">72 70 68 255</Setting>
|
||||
<Setting name="fieldBGSELColor">100 98 96 255</Setting>
|
||||
<Setting name="fieldTextColor">178 175 172 255</Setting>
|
||||
<Setting name="fieldTextHLColor">234 232 230 255</Setting>
|
||||
<Setting name="fieldTextNAColor">120 120 120 255</Setting>
|
||||
<Setting name="fieldTextSELColor">255 255 255 255</Setting>
|
||||
<Setting name="headerColor">50 49 48 255</Setting>
|
||||
<Setting name="headerTextColor">236 234 232 255</Setting>
|
||||
<Setting name="tabsColor">37 36 35 255</Setting>
|
||||
<Setting name="tabsHLColor">50 49 48 255</Setting>
|
||||
<Setting name="tabsSELColor">59 58 57 255</Setting>
|
||||
<Setting name="tooltipBGColor">43 43 43 255</Setting>
|
||||
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
|
||||
<Setting name="tooltipTextColor">255 255 255 255</Setting>
|
||||
<Setting name="windowBackgroundColor">32 31 30 255</Setting>
|
||||
<Group
|
||||
name="Theme">
|
||||
<Setting
|
||||
name="dividerDarkColor">17 16 15 255</Setting>
|
||||
<Setting
|
||||
name="dividerLightColor">96 94 92 255</Setting>
|
||||
<Setting
|
||||
name="dividerMidColor">50 49 48 255</Setting>
|
||||
<Setting
|
||||
name="fieldBGColor">59 58 57 255</Setting>
|
||||
<Setting
|
||||
name="fieldBGHLColor">72 70 68 255</Setting>
|
||||
<Setting
|
||||
name="fieldBGSELColor">100 98 96 255</Setting>
|
||||
<Setting
|
||||
name="fieldTextColor">178 175 172 255</Setting>
|
||||
<Setting
|
||||
name="fieldTextHLColor">234 232 230 255</Setting>
|
||||
<Setting
|
||||
name="fieldTextNAColor">120 120 120 255</Setting>
|
||||
<Setting
|
||||
name="fieldTextSELColor">255 255 255 255</Setting>
|
||||
<Setting
|
||||
name="headerColor">50 49 48 255</Setting>
|
||||
<Setting
|
||||
name="headerTextColor">236 234 232 255</Setting>
|
||||
<Setting
|
||||
name="tabsColor">37 36 35 255</Setting>
|
||||
<Setting
|
||||
name="tabsHLColor">50 49 48 255</Setting>
|
||||
<Setting
|
||||
name="tabsSELColor">59 58 57 255</Setting>
|
||||
<Setting
|
||||
name="tooltipBGColor">43 43 43 255</Setting>
|
||||
<Setting
|
||||
name="tooltipDividerColor">72 70 68 255</Setting>
|
||||
<Setting
|
||||
name="tooltipTextColor">255 255 255 255</Setting>
|
||||
<Setting
|
||||
name="windowBackgroundColor">32 31 30 255</Setting>
|
||||
</Group>
|
||||
<Group name="WorldEditor">
|
||||
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
|
||||
<Setting name="displayType">6</Setting>
|
||||
<Setting name="dropType">screenCenter</Setting>
|
||||
<Setting name="EditorLayoutMode">Modern</Setting>
|
||||
<Setting name="forceLoadDAE">0</Setting>
|
||||
<Setting name="forceSidebarToSide">1</Setting>
|
||||
<Setting name="lastEditedLevel">FPSGameplay:EmptyLevel</Setting>
|
||||
<Setting name="orthoFOV">50</Setting>
|
||||
<Setting name="orthoShowGrid">1</Setting>
|
||||
<Setting name="recentLevelsList">FPSGameplay:EmptyLevel,FPSGameplay:EmptyTerrain,pbr:PbrMatTestLevel,TTR:DasBootLevel</Setting>
|
||||
<Setting name="startupMode">Blank Level</Setting>
|
||||
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
|
||||
<Setting name="undoLimit">40</Setting>
|
||||
<Group name="Color">
|
||||
<Setting name="dragRectColor">255 255 0 255</Setting>
|
||||
<Setting name="objectTextColor">255 255 255 255</Setting>
|
||||
<Setting name="objMouseOverColor">0 255 0 255</Setting>
|
||||
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
|
||||
<Setting name="objSelectColor">255 0 0 255</Setting>
|
||||
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
|
||||
<Setting name="selectionBoxColor">255 255 0 255</Setting>
|
||||
<Group
|
||||
name="WorldEditor">
|
||||
<Setting
|
||||
name="currentEditor">WorldEditorInspectorPlugin</Setting>
|
||||
<Setting
|
||||
name="displayType">6</Setting>
|
||||
<Setting
|
||||
name="dropType">screenCenter</Setting>
|
||||
<Setting
|
||||
name="EditorLayoutMode">Modern</Setting>
|
||||
<Setting
|
||||
name="forceLoadDAE">0</Setting>
|
||||
<Setting
|
||||
name="forceSidebarToSide">1</Setting>
|
||||
<Setting
|
||||
name="lastEditedLevel">FPSGameplay:EmptyLevel</Setting>
|
||||
<Setting
|
||||
name="orthoFOV">4.60158</Setting>
|
||||
<Setting
|
||||
name="orthoShowGrid">1</Setting>
|
||||
<Setting
|
||||
name="recentLevelsList">FPSGameplay:EmptyLevel,FPSGameplay:EmptyTerrain,pbr:PbrMatTestLevel,TTR:DasBootLevel</Setting>
|
||||
<Setting
|
||||
name="startupMode">Blank Level</Setting>
|
||||
<Setting
|
||||
name="torsionPath">AssetWork_Debug.exe</Setting>
|
||||
<Setting
|
||||
name="undoLimit">40</Setting>
|
||||
<Group
|
||||
name="Color">
|
||||
<Setting
|
||||
name="dragRectColor">255 255 0 255</Setting>
|
||||
<Setting
|
||||
name="objectTextColor">255 255 255 255</Setting>
|
||||
<Setting
|
||||
name="objMouseOverColor">0 255 0 255</Setting>
|
||||
<Setting
|
||||
name="objMouseOverSelectColor">0 0 255 255</Setting>
|
||||
<Setting
|
||||
name="objSelectColor">255 0 0 255</Setting>
|
||||
<Setting
|
||||
name="popupBackgroundColor">100 100 100 255</Setting>
|
||||
<Setting
|
||||
name="selectionBoxColor">255 255 0 255</Setting>
|
||||
</Group>
|
||||
<Group name="Docs">
|
||||
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
|
||||
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
|
||||
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
|
||||
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
|
||||
<Group
|
||||
name="Docs">
|
||||
<Setting
|
||||
name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
|
||||
<Setting
|
||||
name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
|
||||
<Setting
|
||||
name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
|
||||
<Setting
|
||||
name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
|
||||
</Group>
|
||||
<Group name="Grid">
|
||||
<Setting name="gridColor">102 102 102 100</Setting>
|
||||
<Setting name="gridMinorColor">51 51 51 100</Setting>
|
||||
<Setting name="gridOriginColor">255 255 255 100</Setting>
|
||||
<Setting name="gridSize">1</Setting>
|
||||
<Setting name="gridSnap">0</Setting>
|
||||
<Group
|
||||
name="Grid">
|
||||
<Setting
|
||||
name="gridColor">102 102 102 100</Setting>
|
||||
<Setting
|
||||
name="gridMinorColor">51 51 51 100</Setting>
|
||||
<Setting
|
||||
name="gridOriginColor">255 255 255 100</Setting>
|
||||
<Setting
|
||||
name="gridSize">1</Setting>
|
||||
<Setting
|
||||
name="gridSnap">0</Setting>
|
||||
</Group>
|
||||
<Group name="Images">
|
||||
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
|
||||
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
|
||||
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
|
||||
<Group
|
||||
name="Images">
|
||||
<Setting
|
||||
name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
|
||||
<Setting
|
||||
name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
|
||||
<Setting
|
||||
name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
|
||||
</Group>
|
||||
<Group name="Layout">
|
||||
<Setting name="LayoutMode">Classic</Setting>
|
||||
<Group
|
||||
name="Layout">
|
||||
<Setting
|
||||
name="LayoutMode">Classic</Setting>
|
||||
</Group>
|
||||
<Group name="ObjectIcons">
|
||||
<Setting name="fadeIcons">1</Setting>
|
||||
<Setting name="fadeIconsEndAlpha">0</Setting>
|
||||
<Setting name="fadeIconsEndDist">20</Setting>
|
||||
<Setting name="fadeIconsStartAlpha">255</Setting>
|
||||
<Setting name="fadeIconsStartDist">8</Setting>
|
||||
<Group
|
||||
name="ObjectIcons">
|
||||
<Setting
|
||||
name="fadeIcons">1</Setting>
|
||||
<Setting
|
||||
name="fadeIconsEndAlpha">0</Setting>
|
||||
<Setting
|
||||
name="fadeIconsEndDist">20</Setting>
|
||||
<Setting
|
||||
name="fadeIconsStartAlpha">255</Setting>
|
||||
<Setting
|
||||
name="fadeIconsStartDist">8</Setting>
|
||||
</Group>
|
||||
<Group name="Render">
|
||||
<Setting name="renderObjHandle">1</Setting>
|
||||
<Setting name="renderObjText">1</Setting>
|
||||
<Setting name="renderPopupBackground">1</Setting>
|
||||
<Setting name="renderSelectionBox">1</Setting>
|
||||
<Setting name="showMousePopupInfo">1</Setting>
|
||||
<Group
|
||||
name="Render">
|
||||
<Setting
|
||||
name="renderObjHandle">1</Setting>
|
||||
<Setting
|
||||
name="renderObjText">1</Setting>
|
||||
<Setting
|
||||
name="renderPopupBackground">1</Setting>
|
||||
<Setting
|
||||
name="renderSelectionBox">1</Setting>
|
||||
<Setting
|
||||
name="showMousePopupInfo">1</Setting>
|
||||
</Group>
|
||||
<Group name="Theme">
|
||||
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
|
||||
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
|
||||
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
|
||||
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
|
||||
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
|
||||
<Group
|
||||
name="Theme">
|
||||
<Setting
|
||||
name="windowTitleBGColor">50 50 50 255</Setting>
|
||||
<Setting
|
||||
name="windowTitleBGHLColor">48 48 48 255</Setting>
|
||||
<Setting
|
||||
name="windowTitleBGNAColor">180 180 180 255</Setting>
|
||||
<Setting
|
||||
name="windowTitleFontColor">215 215 215 255</Setting>
|
||||
<Setting
|
||||
name="windowTitleFontHLColor">255 255 255 255</Setting>
|
||||
</Group>
|
||||
<Group name="Tools">
|
||||
<Setting name="boundingBoxCollision">0</Setting>
|
||||
<Setting name="dropAtScreenCenterMax">100</Setting>
|
||||
<Setting name="dropAtScreenCenterScalar">1</Setting>
|
||||
<Setting name="objectsUseBoxCenter">1</Setting>
|
||||
<Setting name="OffsetZValue">0.01</Setting>
|
||||
<Setting name="snapGround">0</Setting>
|
||||
<Setting name="snapSoft">0</Setting>
|
||||
<Setting name="snapSoftSize">2</Setting>
|
||||
<Setting name="TerrainSnapOffsetZ">0</Setting>
|
||||
<Group
|
||||
name="Tools">
|
||||
<Setting
|
||||
name="boundingBoxCollision">0</Setting>
|
||||
<Setting
|
||||
name="dropAtScreenCenterMax">100</Setting>
|
||||
<Setting
|
||||
name="dropAtScreenCenterScalar">1</Setting>
|
||||
<Setting
|
||||
name="objectsUseBoxCenter">1</Setting>
|
||||
<Setting
|
||||
name="OffsetZValue">0.01</Setting>
|
||||
<Setting
|
||||
name="snapGround">0</Setting>
|
||||
<Setting
|
||||
name="snapSoft">0</Setting>
|
||||
<Setting
|
||||
name="snapSoftSize">2</Setting>
|
||||
<Setting
|
||||
name="TerrainSnapOffsetZ">0</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
</EditorSettings>
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ function ActionAddSequence::doit( %this )
|
|||
//We adjust due to the list "header" row as well
|
||||
%idx -= 1;
|
||||
|
||||
%animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@Asset="@%moduleName@":"@%assetDef.assetName@"\";";
|
||||
%animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@asset="@%moduleName@":"@%assetDef.assetName@"\";";
|
||||
eval(%animSet);
|
||||
|
||||
%assetPath = AssetDatabase.getAssetFilePath(ShapeEditorPlugin.selectedAssetId);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
Visible = "1";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
bitmap = "art/gui/background";
|
||||
bitmap = "data/ui/images/background.png";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -481,8 +481,8 @@
|
|||
selectionBoxColor = "255 255 0 255";
|
||||
selectionLocked = "0";
|
||||
toggleIgnoreList = "0";
|
||||
selectHandle = "tools/worldEditor/images/SelectHandle.png";
|
||||
defaultHandle = "tools/worldEditor/images/DefaultHandle.png";
|
||||
selectHandle = "ToolsModule:SelectHandle_image";
|
||||
defaultHandle = "ToolsModule:DefaultHandle_image";
|
||||
lockedHandleAsset = "ToolsModule:LockedHandle_image";
|
||||
};
|
||||
new TerrainEditor(ETerrainEditor) {
|
||||
|
|
|
|||
|
|
@ -299,7 +299,120 @@ function ObjectBuilderGui::gotTerrainAsset(%this, %name)
|
|||
//%this.controls[%this.currentControl].setValue(%name);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function ObjectBuilderGui::createImageAssetType(%this, %index)
|
||||
{
|
||||
if(%index >= %this.numFields || %this.field[%index, name] $= "")
|
||||
{
|
||||
error("ObjectBuilderGui::createImageAssetType: invalid field");
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
if(%this.field[%index, text] $= "")
|
||||
%name = %this.field[%index, name];
|
||||
else
|
||||
%name = %this.field[%index, text];
|
||||
|
||||
//
|
||||
/*%this.textControls[%this.numControls] = new GuiTextCtrl() {
|
||||
profile = "ToolsGuiTextRightProfile";
|
||||
internalName = "assetText";
|
||||
text = %name;
|
||||
extent = %this.fieldNameExtent;
|
||||
position = %this.curXPos @ " " @ %this.curYPos;
|
||||
modal = "1";
|
||||
};
|
||||
|
||||
//
|
||||
%this.controls[%this.numControls] = new GuiButtonCtrl() {
|
||||
HorizSizing = "width";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
internalName = "assetButton";
|
||||
extent = %this.fileButtonExtent;
|
||||
position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
|
||||
modal = "1";
|
||||
command = %this @ ".getImageAsset(" @ %index @ ");";
|
||||
};
|
||||
|
||||
%val = %this.field[%index, value];
|
||||
%this.controls[%this.numControls].setText(fileBase(%val) @ fileExt(%val));*/
|
||||
|
||||
%this.textControls[%this.numControls] = new GuiTextCtrl() {
|
||||
profile = "ToolsGuiTextRightProfile";
|
||||
text = %name;
|
||||
extent = %this.fieldNameExtent;
|
||||
position = %this.curXPos @ " " @ %this.curYPos;
|
||||
modal = "1";
|
||||
};
|
||||
|
||||
//
|
||||
%this.controls[%this.numControls] = new GuiControl() {
|
||||
HorizSizing = "width";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
extent = %this.textEditExtent;
|
||||
position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
|
||||
modal = "1";
|
||||
};
|
||||
|
||||
%text = new GuiTextEditCtrl() {
|
||||
class = ObjectBuilderGuiTextEditCtrl;
|
||||
internalName = "assetText";
|
||||
HorizSizing = "width";
|
||||
profile = "ToolsGuiTextEditProfile";
|
||||
extent = getWord(%this.textEditExtent,0) - getWord(%this.matButtonExtent,0) - 2 @ " " @ getWord(%this.textEditExtent,1);
|
||||
text = %this.field[%index, value];
|
||||
position = "0 0";
|
||||
modal = "1";
|
||||
};
|
||||
%this.controls[%this.numControls].addGuiControl(%text);
|
||||
|
||||
%button = new GuiBitmapButtonCtrl() {
|
||||
internalName = "assetButton";
|
||||
HorizSizing = "left";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
extent = %this.matButtonExtent;
|
||||
position = getWord(%this.textEditExtent,0) - getWord(%this.matButtonExtent,0) @ " 0";
|
||||
modal = "1";
|
||||
command = %this @ ".getImageAsset(" @ %index @ ");";
|
||||
};
|
||||
%button.setBitmap("tools/materialEditor/gui/change-material-btn");
|
||||
%this.controls[%this.numControls].addGuiControl(%button);
|
||||
|
||||
%this.numControls++;
|
||||
%this.curYPos += %this.defaultFieldStep;
|
||||
}
|
||||
|
||||
function ObjectBuilderGui::getImageAsset(%this, %index)
|
||||
{
|
||||
if(%index >= %this.numFields || %this.field[%index, name] $= "")
|
||||
{
|
||||
error("ObjectBuilderGui::getImageAsset: invalid field");
|
||||
return;
|
||||
}
|
||||
|
||||
%val = %this.field[%index, ext];
|
||||
|
||||
//%path = filePath(%val);
|
||||
//%ext = fileExt(%val);
|
||||
|
||||
%this.currentControl = %index;
|
||||
AssetBrowser.showDialog("ImageAsset", %this @ ".gotImageAsset", "", "", "");
|
||||
//getLoadFilename( %val @ "|" @ %val, %this @ ".gotFileName", %this.lastPath );
|
||||
}
|
||||
|
||||
function ObjectBuilderGui::gotImageAsset(%this, %name)
|
||||
{
|
||||
%index = %this.currentControl;
|
||||
|
||||
%this.field[%index, value] = %name;
|
||||
%this.controls[%this.currentControl]-->assetText.setText(%name);
|
||||
|
||||
%this.lastPath = %name;
|
||||
|
||||
// This doesn't work for button controls as getValue returns their state!
|
||||
//%this.controls[%this.currentControl].setValue(%name);
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
function ObjectBuilderGui::createMaterialNameType(%this, %index)
|
||||
{
|
||||
if(%index >= %this.numFields || %this.field[%index, name] $= "")
|
||||
|
|
@ -564,6 +677,9 @@ function ObjectBuilderGui::process(%this)
|
|||
case "TypeTerrainAsset":
|
||||
%this.createTerrainAssetType(%i);
|
||||
|
||||
case "TypeImageAsset":
|
||||
%this.createImageAssetType(%i);
|
||||
|
||||
case "TypeMaterialName":
|
||||
%this.createMaterialNameType(%i);
|
||||
|
||||
|
|
@ -636,6 +752,12 @@ function ObjectBuilderGui::onOK(%this)
|
|||
%this.field[%i, value] = %this.controls[%i]-->MatText.getValue();
|
||||
continue;
|
||||
}
|
||||
if (%this.field[%i, type] $= "TypeImageAsset" ||
|
||||
%this.field[%i, type] $= "TypeTerrainAsset")
|
||||
{
|
||||
%this.field[%i, value] = %this.controls[%i]-->assetText.getText();
|
||||
continue;
|
||||
}
|
||||
%this.field[%i, value] = %this.controls[%i].getValue();
|
||||
}
|
||||
|
||||
|
|
@ -736,7 +858,7 @@ function ObjectBuilderGui::buildScatterSky( %this, %dontWarnAboutSun )
|
|||
// This is a trick... any fields added after process won't show
|
||||
// up as controls, but will be applied to the created object.
|
||||
%this.addField( "flareType", "TypeLightFlareDataPtr", "Flare", "ScatterSkyFlareExample" );
|
||||
%this.addField( "moonMat", "TypeMaterialName", "Moon Material", "Moon_Glow_Mat" );
|
||||
%this.addField( "moonMatAsset", "TypeMaterialAsset", "Moon Material", "Core_Rendering:moon_wglow" );
|
||||
%this.addField( "nightCubemap", "TypeCubemapName", "Night Cubemap", "NightCubemap" );
|
||||
%this.addField( "useNightCubemap", "TypeBool", "Use Night Cubemap", "true" );
|
||||
|
||||
|
|
@ -746,7 +868,8 @@ function ObjectBuilderGui::buildCloudLayer(%this)
|
|||
{
|
||||
OBObjectName.setValue( "" );
|
||||
%this.objectClassName = "CloudLayer";
|
||||
%this.addField( "texture", "TypeImageFilename", "Texture", "core/rendering/images/clouds_normal_displacement" );
|
||||
%this.addField( "textureAsset", "TypeImageAsset", "Image", "Core_Rendering:clouds_normal_displacement_image" );
|
||||
//%this.addField( "textureFile", "TypeImageFilename", "Texture", "core/rendering/images/clouds_normal_displacement" );
|
||||
%this.process();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,9 @@ function TerrainEditor::setPaintMaterial( %this, %matIndex, %terrainMat )
|
|||
ETerrainEditor.paintIndex = %matIndex;
|
||||
ETerrainMaterialSelected.selectedMatIndex = %matIndex;
|
||||
ETerrainMaterialSelected.selectedMat = %terrainMat;
|
||||
ETerrainMaterialSelected.bitmap = %terrainMat.diffuseMap;
|
||||
|
||||
ETerrainMaterialSelected.setBitmap(%terrainMat.getDiffuseMap());
|
||||
|
||||
ETerrainMaterialSelectedEdit.Visible = isObject(%terrainMat);
|
||||
TerrainTextureText.text = %terrainMat.getInternalName();
|
||||
ProceduralTerrainPainterDescription.text = "Generate "@ %terrainMat.getInternalName() @" layer";
|
||||
|
|
@ -139,7 +141,7 @@ function EPainter::updateLayers( %this, %matIndex )
|
|||
};
|
||||
|
||||
%ctrl.setText( %matInternalName );
|
||||
%ctrl.setBitmap( %mat.diffuseMap );
|
||||
%ctrl.setBitmap( %mat.getDiffuseMap() );
|
||||
|
||||
%tooltip = %matInternalName;
|
||||
if(%i < 9)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$TerrainMaterialEditor::emptyMaterialImage = "ToolsModule:unknownImage_image";
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -34,6 +35,7 @@ function TerrainMaterialDlg::show( %this, %matIndex, %terrMat, %onApplyCallback
|
|||
%item = %matLibTree.findItemByObjectId( %terrMat );
|
||||
if ( %item != -1 )
|
||||
{
|
||||
%matLibTree.selectItem( %item, false );
|
||||
%matLibTree.selectItem( %item );
|
||||
%matLibTree.scrollVisible( %item );
|
||||
}
|
||||
|
|
@ -164,11 +166,26 @@ function TerrainMaterialDlg::dialogApply( %this )
|
|||
Canvas.popDialog( TerrainMaterialDlg );
|
||||
|
||||
call( %this.onApplyCallback, %this.activeMat, %this.matIndex );
|
||||
|
||||
TerrainMaterialDlg.matDirty = false;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function TerrainMaterialDlg::dialogCancel( %this )
|
||||
{
|
||||
if(TerrainMaterialDlg.matDirty)
|
||||
{
|
||||
toolsMessageBoxYesNo("Save Dirty Material?", "The current material has been modified. Do you wish save your changes?",
|
||||
"TerrainMaterialDlg.saveDirtyMaterial(" @ %this-->matLibTree.getSelectedItem() @ ");TerrainMaterialDlg.closeDialog();", "TerrainMaterialDlg.closeDialog();");
|
||||
}
|
||||
else
|
||||
{
|
||||
%this.closeDialog();
|
||||
}
|
||||
}
|
||||
|
||||
function TerrainMaterialDlg::closeDialog( %this )
|
||||
{
|
||||
// Restore material properties we have changed.
|
||||
|
||||
|
|
@ -213,118 +230,67 @@ function TerrainMaterialDlg::setMaterialName( %this, %newName )
|
|||
{
|
||||
%mat.setInternalName( %newName );
|
||||
%this-->matLibTree.buildVisibleTree( false );
|
||||
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function TerrainMaterialDlg::changeBase( %this )
|
||||
function TerrainMaterialDlg::clearTextureMap(%this, %mapName)
|
||||
{
|
||||
%ctrl = %this-->baseTexCtrl;
|
||||
%file = %ctrl.bitmap;
|
||||
if( getSubStr( %file, 0 , 6 ) $= "tools/" )
|
||||
%file = "";
|
||||
%targetMapName = "tex" @ %mapName;
|
||||
%targetMap = %this.findObjectByInternalName(%targetMapName, true);
|
||||
|
||||
%file = TerrainMaterialDlg._selectTextureFileDialog( %file );
|
||||
if( %file $= "" )
|
||||
%targetMap.setBitmap($TerrainMaterialEditor::emptyMaterialImage);
|
||||
%targetMap.asset = "";
|
||||
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
|
||||
if(%mapName $= "DetailMap")
|
||||
{
|
||||
if( %ctrl.bitmap !$= "" )
|
||||
%file = %ctrl.bitmap;
|
||||
else
|
||||
%file = "tools/materialEditor/gui/unknownImage";
|
||||
//hide the supplemental maps
|
||||
NormalMapContainer.callOnChildren("setActive", false);
|
||||
ORMMapContainer.callOnChildren("setActive", false);
|
||||
MacroMapContainer.callOnChildren("setActive", false);
|
||||
}
|
||||
|
||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||
%ctrl.setBitmap( %file );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function TerrainMaterialDlg::changeDetail( %this )
|
||||
function TerrainMaterialDlg::updateTextureMap(%this, %mapName)
|
||||
{
|
||||
%ctrl = %this-->detailTexCtrl;
|
||||
%file = %ctrl.bitmap;
|
||||
if( getSubStr( %file, 0 , 6 ) $= "tools/" )
|
||||
%file = "";
|
||||
|
||||
%file = TerrainMaterialDlg._selectTextureFileDialog( %file );
|
||||
if( %file $= "" )
|
||||
{
|
||||
if( %ctrl.bitmap !$= "" )
|
||||
%file = %ctrl.bitmap;
|
||||
else
|
||||
%file = "tools/materialEditor/gui/unknownImage";
|
||||
}
|
||||
%this.updateTargetMap = %mapName;
|
||||
|
||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||
%ctrl.setBitmap( %file );
|
||||
AssetBrowser.showDialog("ImageAsset", %this@".changeTerrainMatMapAsset", "", "");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
function TerrainMaterialDlg::changeMacro( %this )
|
||||
function TerrainMaterialDlg::changeTerrainMatMapAsset(%this)
|
||||
{
|
||||
%ctrl = %this-->macroTexCtrl;
|
||||
%file = %ctrl.bitmap;
|
||||
if( getSubStr( %file, 0 , 6 ) $= "tools/" )
|
||||
%file = "";
|
||||
%targetMapName = "tex" @ %this.updateTargetMap;
|
||||
%targetMap = %this.findObjectByInternalName(%targetMapName, true);
|
||||
|
||||
%file = TerrainMaterialDlg._selectTextureFileDialog( %file );
|
||||
if( %file $= "" )
|
||||
{
|
||||
if( %ctrl.bitmap !$= "" )
|
||||
%file = %ctrl.bitmap;
|
||||
else
|
||||
%file = "tools/materialEditor/gui/unknownImage";
|
||||
}
|
||||
|
||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||
%ctrl.setBitmap( %file );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function TerrainMaterialDlg::changeNormal( %this )
|
||||
%imgAsset = AssetBrowser.selectedAsset;
|
||||
if(%imgAsset !$= "")
|
||||
{
|
||||
%ctrl = %this-->normTexCtrl;
|
||||
%file = %ctrl.bitmap;
|
||||
if( getSubStr( %file, 0 , 6 ) $= "tools/" )
|
||||
%file = "";
|
||||
%targetMap.asset = %imgAsset;
|
||||
%image = %imgAsset;
|
||||
|
||||
%file = TerrainMaterialDlg._selectTextureFileDialog( %file );
|
||||
if( %file $= "" )
|
||||
if(%this.updateTargetMap $= "DetailMap")
|
||||
{
|
||||
if( %ctrl.bitmap !$= "" )
|
||||
%file = %ctrl.bitmap;
|
||||
else
|
||||
%file = "tools/materialEditor/gui/unknownImage";
|
||||
//show the supplemental maps
|
||||
NormalMapContainer.callOnChildren("setActive", true);
|
||||
ORMMapContainer.callOnChildren("setActive", true);
|
||||
MacroMapContainer.callOnChildren("setActive", true);
|
||||
}
|
||||
|
||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||
%ctrl.setBitmap( %file );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
function TerrainMaterialDlg::changeormConfig( %this )
|
||||
{
|
||||
%ctrl = %this-->ormConfigTexCtrl;
|
||||
%file = %ctrl.bitmap;
|
||||
if( getSubStr( %file, 0 , 6 ) $= "tools/" )
|
||||
%file = "";
|
||||
|
||||
%file = TerrainMaterialDlg._selectTextureFileDialog( %file );
|
||||
if( %file $= "" )
|
||||
{
|
||||
if( %ctrl.bitmap !$= "" )
|
||||
%file = %ctrl.bitmap;
|
||||
else
|
||||
%file = "tools/materialEditor/gui/unknownImage";
|
||||
{
|
||||
%image = $TerrainMaterialEditor::emptyMaterialImage;
|
||||
}
|
||||
|
||||
%file = makeRelativePath( %file, getMainDotCsDir() );
|
||||
%ctrl.setBitmap( %file );
|
||||
%targetMap.setBitmap( %image );
|
||||
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -384,22 +350,49 @@ function TerrainMaterialDlg::activateMaterialCtrls( %this, %active )
|
|||
%parent = %this-->matSettingsParent;
|
||||
%count = %parent.getCount();
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%ctrl = %parent.getObject( %i );
|
||||
%ctrlnm = %ctrl.getName();
|
||||
%ictrlnm = %ctrl.getInternalName();
|
||||
%parent.getObject( %i ).setActive( %active );
|
||||
}
|
||||
|
||||
%detailz = %this-->texDetailMap.getBitmap();
|
||||
if(%this-->texDetailMap.getBitmap() $= "" || %this-->texDetailMap.getBitmap() $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
NormalMapContainer.callOnChildren("setActive", false);
|
||||
ORMMapContainer.callOnChildren("setActive", false);
|
||||
MacroMapContainer.callOnChildren("setActive", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
NormalMapContainer.callOnChildren("setActive", true);
|
||||
ORMMapContainer.callOnChildren("setActive", true);
|
||||
MacroMapContainer.callOnChildren("setActive", true);
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function TerrainMaterialTreeCtrl::onSelect( %this, %item )
|
||||
{
|
||||
if(TerrainMaterialDlg.matDirty)
|
||||
{
|
||||
toolsMessageBoxYesNo("Save Dirty Material?", "The current material has been modified. Do you wish save your changes?",
|
||||
"TerrainMaterialDlg.saveDirtyMaterial(" @ TerrainMaterialDlg.previousMat @ ");TerrainMaterialDlg.setActiveMaterial(" @ %item @ ");",
|
||||
"TerrainMaterialDlg.setActiveMaterial(" @ %item @ ");");
|
||||
}
|
||||
else
|
||||
{
|
||||
TerrainMaterialDlg.setActiveMaterial( %item );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function TerrainMaterialTreeCtrl::onUnSelect( %this, %item )
|
||||
{
|
||||
TerrainMaterialDlg.saveDirtyMaterial( %item );
|
||||
TerrainMaterialDlg.setActiveMaterial( 0 );
|
||||
TerrainMaterialDlg.previousMat = %item;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -410,33 +403,105 @@ function TerrainMaterialDlg::setActiveMaterial( %this, %mat )
|
|||
%mat.isMemberOfClass( TerrainMaterial ) )
|
||||
{
|
||||
%this.activeMat = %mat;
|
||||
%this.matDirty = false;
|
||||
|
||||
%this-->matNameCtrl.setText( %mat.internalName );
|
||||
if (%mat.diffuseMap $= ""){
|
||||
%this-->baseTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}else{
|
||||
|
||||
//
|
||||
%imgPath = %mat.getDiffuseMap();
|
||||
%this-->baseTexCtrl.setBitmap( %mat.diffuseMap );
|
||||
%imgPath = $TerrainMaterialEditor::emptyMaterialImage;
|
||||
|
||||
%this-->texBaseMap.setBitmap( %imgPath );
|
||||
|
||||
if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
%imgAsset = %mat.getDiffuseMapAsset();
|
||||
if(%imgAsset $= "")
|
||||
%imgAsset = %imgPath;
|
||||
%this-->diffuseMapAssetId.setText( %imgAsset );
|
||||
}
|
||||
if (%mat.ormConfigMap $= ""){
|
||||
%this-->ormConfigTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}else{
|
||||
%this-->ormConfigTexCtrl.setBitmap( %mat.ormConfigMap );
|
||||
else
|
||||
{
|
||||
%this-->normalMapAssetId.setText( "None" );
|
||||
}
|
||||
if (%mat.detailMap $= ""){
|
||||
%this-->detailTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}else{
|
||||
%this-->detailTexCtrl.setBitmap( %mat.detailMap );
|
||||
|
||||
//
|
||||
%imgPath = %mat.getNormalMap();
|
||||
if(%imgPath $= "")
|
||||
%imgPath = $TerrainMaterialEditor::emptyMaterialImage;
|
||||
|
||||
%this-->texNormalMap.setBitmap( %imgPath );
|
||||
|
||||
if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
%imgAsset = %mat.getNormalMapAsset();
|
||||
if(%imgAsset $= "")
|
||||
%imgAsset = %imgPath;
|
||||
%this-->normalMapAssetId.setText( %imgAsset );
|
||||
}
|
||||
if (%mat.macroMap $= ""){
|
||||
%this-->macroTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}else{
|
||||
%this-->macroTexCtrl.setBitmap( %mat.macroMap );
|
||||
else
|
||||
{
|
||||
%this-->normalMapAssetId.setText( "None" );
|
||||
}
|
||||
|
||||
//
|
||||
%imgPath = %mat.getORMConfigMap();
|
||||
if(%imgPath $= "")
|
||||
%imgPath = $TerrainMaterialEditor::emptyMaterialImage;
|
||||
|
||||
%this-->texORMConfigMap.setBitmap( %imgPath );
|
||||
|
||||
if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
%imgAsset = %mat.getORMConfigMapAsset();
|
||||
if(%imgAsset $= "")
|
||||
%imgAsset = %imgPath;
|
||||
%this-->ORMMapAssetId.setText( %imgAsset );
|
||||
}
|
||||
else
|
||||
{
|
||||
%this-->normalMapAssetId.setText( "None" );
|
||||
}
|
||||
|
||||
//
|
||||
%imgPath = %mat.getDetailMap();
|
||||
if(%imgPath $= "")
|
||||
%imgPath = $TerrainMaterialEditor::emptyMaterialImage;
|
||||
|
||||
%this-->texDetailMap.setBitmap( %imgPath );
|
||||
|
||||
if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
%imgAsset = %mat.getDetailMapAsset();
|
||||
if(%imgAsset $= "")
|
||||
%imgAsset = %imgPath;
|
||||
%this-->detailMapAssetId.setText( %imgAsset );
|
||||
}
|
||||
else
|
||||
{
|
||||
%this-->normalMapAssetId.setText( "None" );
|
||||
}
|
||||
|
||||
//
|
||||
%imgPath = %mat.getMacroMap();
|
||||
if(%imgPath $= "")
|
||||
%imgPath = $TerrainMaterialEditor::emptyMaterialImage;
|
||||
|
||||
%this-->texMacroMap.setBitmap( %imgPath );
|
||||
|
||||
if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
%imgAsset = %mat.getMacroMapAsset();
|
||||
if(%imgAsset $= "")
|
||||
%imgAsset = %imgPath;
|
||||
%this-->macroMapAssetId.setText( %imgAsset );
|
||||
}
|
||||
else
|
||||
{
|
||||
%this-->normalMapAssetId.setText( "None" );
|
||||
}
|
||||
if (%mat.normalMap $= ""){
|
||||
%this-->normTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
|
||||
}else{
|
||||
%this-->normTexCtrl.setBitmap( %mat.normalMap );
|
||||
}
|
||||
|
||||
%this-->detSizeCtrl.setText( %mat.detailSize );
|
||||
%this-->baseSizeCtrl.setText( %mat.diffuseSize );
|
||||
%this-->detStrengthCtrl.setText( %mat.detailStrength );
|
||||
|
|
@ -481,31 +546,31 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
|
||||
%newName = %this-->matNameCtrl.getText();
|
||||
|
||||
if (%this-->baseTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||
//---
|
||||
%newDiffuse = %this-->texBaseMap.getBitmap();
|
||||
if(%newDiffuse $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
%newDiffuse = "";
|
||||
}else{
|
||||
%newDiffuse = %this-->baseTexCtrl.bitmap;
|
||||
}
|
||||
if (%this-->normTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||
|
||||
//---
|
||||
%newNormal = %this-->texNormalMap.getBitmap();
|
||||
if(%newNormal $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
%newNormal = "";
|
||||
}else{
|
||||
%newNormal = %this-->normTexCtrl.bitmap;
|
||||
}
|
||||
if (%this-->ormConfigTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||
|
||||
//---
|
||||
%newormConfig = %this-->texORMConfigMap.getBitmap();
|
||||
if(%newormConfig $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
%newormConfig = "";
|
||||
}else{
|
||||
%newormConfig = %this-->ormConfigTexCtrl.bitmap;
|
||||
}
|
||||
if (%this-->detailTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||
|
||||
//---
|
||||
%newDetail = %this-->texDetailMap.getBitmap();
|
||||
if(%newDetail $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
%newDetail = "";
|
||||
}else{
|
||||
%newDetail = %this-->detailTexCtrl.bitmap;
|
||||
}
|
||||
if (%this-->macroTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
|
||||
|
||||
//---
|
||||
%newMacro = %this-->texMacroMap.getBitmap();
|
||||
if(%newMacro $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
%newMacro = "";
|
||||
}else{
|
||||
%newMacro = %this-->macroTexCtrl.bitmap;
|
||||
}
|
||||
|
||||
%detailSize = %this-->detSizeCtrl.getText();
|
||||
%diffuseSize = %this-->baseSizeCtrl.getText();
|
||||
%detailStrength = %this-->detStrengthCtrl.getText();
|
||||
|
|
@ -526,11 +591,11 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
// return.
|
||||
|
||||
if ( %mat.internalName $= %newName &&
|
||||
%mat.diffuseMap $= %newDiffuse &&
|
||||
%mat.normalMap $= %newNormal &&
|
||||
%mat.detailMap $= %newDetail &&
|
||||
%mat.ormConfigMap $= %newormConfig &&
|
||||
%mat.macroMap $= %newMacro &&
|
||||
%mat.getDiffuseMap() $= %newDiffuse &&
|
||||
%mat.getNormalMap() $= %newNormal &&
|
||||
%mat.getDetailMap() $= %newDetail &&
|
||||
%mat.getORMConfigMap() $= %newormConfig &&
|
||||
%mat.getMacroMap() $= %newMacro &&
|
||||
%mat.detailSize == %detailSize &&
|
||||
%mat.diffuseSize == %diffuseSize &&
|
||||
%mat.detailStrength == %detailStrength &&
|
||||
|
|
@ -564,12 +629,12 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
%mat.setInternalName( %newName );
|
||||
}
|
||||
|
||||
%mat.diffuseMap = %newDiffuse;
|
||||
%mat.diffuseMapAsset = "";
|
||||
%mat.normalMap = %newNormal;
|
||||
%mat.ormConfigMap = %newormConfig;
|
||||
%mat.detailMap = %newDetail;
|
||||
%mat.macroMap = %newMacro;
|
||||
%mat.setDiffuseMap(%newDiffuse);
|
||||
%mat.setNormalMap(%newNormal);
|
||||
%mat.setORMConfigMap(%newormConfig);
|
||||
%mat.setDetailMap(%newDetail);
|
||||
%mat.setMacroMap(%newMacro);
|
||||
|
||||
%mat.detailSize = %detailSize;
|
||||
%mat.diffuseSize = %diffuseSize;
|
||||
%mat.detailStrength = %detailStrength;
|
||||
|
|
@ -619,11 +684,11 @@ function TerrainMaterialDlg::snapshotMaterials( %this )
|
|||
parentGroup = %group;
|
||||
material = %mat;
|
||||
internalName = %mat.internalName;
|
||||
diffuseMap = %mat.diffuseMap;
|
||||
normalMap = %mat.normalMap;
|
||||
ormConfigMap = %mat.ormConfigMap;
|
||||
detailMap = %mat.detailMap;
|
||||
macroMap = %mat.macroMap;
|
||||
diffuseMap = %mat.getDiffuseMap();
|
||||
normalMap = %mat.getNormalMap();
|
||||
ormConfigMap = %mat.getORMConfigMap();
|
||||
detailMap = %mat.getDetailMap();
|
||||
macroMap = %mat.getMacroMap();
|
||||
detailSize = %mat.detailSize;
|
||||
diffuseSize = %mat.diffuseSize;
|
||||
detailStrength = %mat.detailStrength;
|
||||
|
|
@ -638,6 +703,7 @@ function TerrainMaterialDlg::snapshotMaterials( %this )
|
|||
isSRGB = %mat.isSRGB;
|
||||
invertRoughness = %mat.invertRoughness;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -658,11 +724,11 @@ function TerrainMaterialDlg::restoreMaterials( %this )
|
|||
%mat = %obj.material;
|
||||
|
||||
%mat.setInternalName( %obj.internalName );
|
||||
%mat.diffuseMap = %obj.diffuseMap;
|
||||
%mat.normalMap = %obj.normalMap;
|
||||
%mat.ormConfigMap = %obj.ormConfigMap;
|
||||
%mat.detailMap = %obj.detailMap;
|
||||
%mat.macroMap = %obj.macroMap;
|
||||
%mat.setDiffuseMap(%obj.diffuseMap);
|
||||
%mat.setNormalMap(%obj.normalMap);
|
||||
%mat.setORMConfigMap(%obj.ORMConfigMap);
|
||||
%mat.setDetailMap(%obj.detailMap);
|
||||
%mat. setMacroMap(%obj.macroMap);
|
||||
%mat.detailSize = %obj.detailSize;
|
||||
%mat.diffuseSize = %obj.diffuseSize;
|
||||
%mat.detailStrength = %obj.detailStrength;
|
||||
|
|
@ -717,6 +783,7 @@ function TerrainMaterialDlgBlendHeightBaseSlider::onMouseDragged(%this)
|
|||
%value = mFloor(%this.value * 1000)/1000;
|
||||
TerrainMaterialDlgBlendHeightBaseTextEdit.setText(%value);
|
||||
TerrainMaterialDlg.activeMat.blendHeightBase = %this.value;
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -724,6 +791,7 @@ function TerrainMaterialDlgBlendHeightBaseTextEdit::onValidate(%this)
|
|||
{
|
||||
TerrainMaterialDlgBlendHeightBaseSlider.setValue(%this.getText());
|
||||
TerrainMaterialDlg.activeMat.blendHeightBase = %this.getText();
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
}
|
||||
|
||||
function TerrainMaterialDlgBlendHeightContrastSlider::onMouseDragged(%this)
|
||||
|
|
@ -731,6 +799,7 @@ function TerrainMaterialDlgBlendHeightContrastSlider::onMouseDragged(%this)
|
|||
%value = mFloor(%this.value * 1000)/1000;
|
||||
TerrainMaterialDlgBlendHeightContrastTextEdit.setText(%value);
|
||||
TerrainMaterialDlg.activeMat.blendHeightContrast = %this.value;
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -738,4 +807,5 @@ function TerrainMaterialDlgBlendHeightContrastTextEdit::onValidate(%this)
|
|||
{
|
||||
TerrainMaterialDlgBlendHeightContrastSlider.setValue(%this.getText());
|
||||
TerrainMaterialDlg.activeMat.blendHeightContrast = %this.getText();
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
}
|
||||
|
|
|
|||