Merge branch 'Preview4_0' of https://github.com/TorqueGameEngines/Torque3D into Preview4_0
|
|
@ -38,3 +38,10 @@ function ServerPlay3D(%profile,%transform)
|
|||
ClientGroup.getObject(%idx).play3D(%profile,%transform);
|
||||
}
|
||||
|
||||
function ServerPlaySound(%profile,%pos)
|
||||
{
|
||||
// Play the given sound profile at the given position on every client
|
||||
// The sound will be transmitted as an event, not attached to any object.
|
||||
for(%idx = 0; %idx < ClientGroup.getCount(); %idx++)
|
||||
commandToClient(ClientGroup.getObject(%idx), 'PlaySound',%profile, %pos);
|
||||
}
|
||||
|
|
@ -66,7 +66,7 @@ $guiContent = new GuiControl(ConsoleDlg) {
|
|||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
bitmap = "data/ui/art/hudfill.png";
|
||||
bitmapAsset = "Core_GUI:hudFill";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "0 0";
|
||||
|
|
|
|||
|
|
@ -50,11 +50,13 @@ new GuiControlProfile(GuiConsoleTextProfile)
|
|||
category = "Core";
|
||||
};
|
||||
|
||||
$ConsoleDefaultFillColor = "0 0 0 175";
|
||||
|
||||
if(!isObject(ConsoleScrollProfile))
|
||||
new GuiControlProfile(ConsoleScrollProfile : GuiScrollProfile)
|
||||
{
|
||||
opaque = true;
|
||||
fillColor = "0 0 0 175";
|
||||
fillColor = $ConsoleDefaultFillColor;
|
||||
border = 1;
|
||||
//borderThickness = 0;
|
||||
borderColor = "0 0 0";
|
||||
|
|
|
|||
|
|
@ -1,6 +1 @@
|
|||
<ShapeAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Camera"
|
||||
fileName="@assetFile=camera.dts"
|
||||
constuctorFileName="@assetFile=camera.tscript" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
<MaterialAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Green"
|
||||
scriptFile="@assetFile=green"
|
||||
materialDefinitionName="Green"
|
||||
originalFilePath="D:/Gamedev/Projects/Catographer/GameBuild/Templates/BaseGame/game/core/gameObjects/shapes/green" />
|
||||
|
Before Width: | Height: | Size: 142 B After Width: | Height: | Size: 142 B |
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
singleton TSShapeConstructor(cameradts)
|
||||
singleton TSShapeConstructor(cameradts2)
|
||||
{
|
||||
baseShapeAsset = "Core_GameObjects:Camera";
|
||||
singleDetailSize = "0";
|
||||
|
|
|
|||
196
Templates/BaseGame/game/core/gameObjects/shapes/green.tscript
Normal file
|
|
@ -0,0 +1,196 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
new Material(OctahedronMat) {
|
||||
mapTo = "green";
|
||||
diffuseColor[0] = "0 1 0 1";
|
||||
diffuseColor[1] = "1 1 1 1";
|
||||
diffuseColor[2] = "1 1 1 1";
|
||||
diffuseColor[3] = "1 1 1 1";
|
||||
DiffuseMap[0] = "core/gameObjects/images/camera";
|
||||
diffuseMapSRGB[0] = "1";
|
||||
diffuseMapSRGB[1] = "1";
|
||||
diffuseMapSRGB[2] = "1";
|
||||
diffuseMapSRGB[3] = "1";
|
||||
detailScale[0] = "2 2";
|
||||
detailScale[1] = "2 2";
|
||||
detailScale[2] = "2 2";
|
||||
detailScale[3] = "2 2";
|
||||
detailNormalMapStrength[0] = "1";
|
||||
detailNormalMapStrength[1] = "1";
|
||||
detailNormalMapStrength[2] = "1";
|
||||
detailNormalMapStrength[3] = "1";
|
||||
roughness[0] = "1";
|
||||
roughness[1] = "1";
|
||||
roughness[2] = "1";
|
||||
roughness[3] = "1";
|
||||
metalness[0] = "0";
|
||||
metalness[1] = "0";
|
||||
metalness[2] = "0";
|
||||
metalness[3] = "0";
|
||||
glowMul[0] = "0";
|
||||
glowMul[1] = "0";
|
||||
glowMul[2] = "0";
|
||||
glowMul[3] = "0";
|
||||
accuEnabled[0] = "0";
|
||||
accuEnabled[1] = "0";
|
||||
accuEnabled[2] = "0";
|
||||
accuEnabled[3] = "0";
|
||||
accuScale[0] = "1";
|
||||
accuScale[1] = "1";
|
||||
accuScale[2] = "1";
|
||||
accuScale[3] = "1";
|
||||
accuDirection[0] = "1";
|
||||
accuDirection[1] = "1";
|
||||
accuDirection[2] = "1";
|
||||
accuDirection[3] = "1";
|
||||
accuStrength[0] = "0.6";
|
||||
accuStrength[1] = "0.6";
|
||||
accuStrength[2] = "0.6";
|
||||
accuStrength[3] = "0.6";
|
||||
accuCoverage[0] = "0.9";
|
||||
accuCoverage[1] = "0.9";
|
||||
accuCoverage[2] = "0.9";
|
||||
accuCoverage[3] = "0.9";
|
||||
accuSpecular[0] = "16";
|
||||
accuSpecular[1] = "16";
|
||||
accuSpecular[2] = "16";
|
||||
accuSpecular[3] = "16";
|
||||
isSRGB[0] = "0";
|
||||
isSRGB[1] = "0";
|
||||
isSRGB[2] = "0";
|
||||
isSRGB[3] = "0";
|
||||
invertRoughness[0] = "0";
|
||||
invertRoughness[1] = "0";
|
||||
invertRoughness[2] = "0";
|
||||
invertRoughness[3] = "0";
|
||||
roughnessChan[0] = "0";
|
||||
roughnessChan[1] = "0";
|
||||
roughnessChan[2] = "0";
|
||||
roughnessChan[3] = "0";
|
||||
AOChan[0] = "1";
|
||||
AOChan[1] = "1";
|
||||
AOChan[2] = "1";
|
||||
AOChan[3] = "1";
|
||||
metalChan[0] = "2";
|
||||
metalChan[1] = "2";
|
||||
metalChan[2] = "2";
|
||||
metalChan[3] = "2";
|
||||
glow[0] = "0";
|
||||
glow[1] = "0";
|
||||
glow[2] = "0";
|
||||
glow[3] = "0";
|
||||
parallaxScale[0] = "0";
|
||||
parallaxScale[1] = "0";
|
||||
parallaxScale[2] = "0";
|
||||
parallaxScale[3] = "0";
|
||||
useAnisotropic[0] = "1";
|
||||
useAnisotropic[1] = "1";
|
||||
useAnisotropic[2] = "1";
|
||||
useAnisotropic[3] = "1";
|
||||
vertLit[0] = "0";
|
||||
vertLit[1] = "0";
|
||||
vertLit[2] = "0";
|
||||
vertLit[3] = "0";
|
||||
vertColor[0] = "0";
|
||||
vertColor[1] = "0";
|
||||
vertColor[2] = "0";
|
||||
vertColor[3] = "0";
|
||||
minnaertConstant[0] = "-1";
|
||||
minnaertConstant[1] = "-1";
|
||||
minnaertConstant[2] = "-1";
|
||||
minnaertConstant[3] = "-1";
|
||||
subSurface[0] = "0";
|
||||
subSurface[1] = "0";
|
||||
subSurface[2] = "0";
|
||||
subSurface[3] = "0";
|
||||
subSurfaceColor[0] = "1 0.2 0.2 1";
|
||||
subSurfaceColor[1] = "1 0.2 0.2 1";
|
||||
subSurfaceColor[2] = "1 0.2 0.2 1";
|
||||
subSurfaceColor[3] = "1 0.2 0.2 1";
|
||||
subSurfaceRolloff[0] = "0.2";
|
||||
subSurfaceRolloff[1] = "0.2";
|
||||
subSurfaceRolloff[2] = "0.2";
|
||||
subSurfaceRolloff[3] = "0.2";
|
||||
emissive[0] = "0";
|
||||
emissive[1] = "0";
|
||||
emissive[2] = "0";
|
||||
emissive[3] = "0";
|
||||
foreground[0] = "0";
|
||||
foreground[1] = "0";
|
||||
foreground[2] = "0";
|
||||
foreground[3] = "0";
|
||||
doubleSided = "0";
|
||||
animFlags[0] = "0x00000000";
|
||||
animFlags[1] = "0x00000000";
|
||||
animFlags[2] = "0x00000000";
|
||||
animFlags[3] = "0x00000000";
|
||||
scrollDir[0] = "0 0";
|
||||
scrollDir[1] = "0 0";
|
||||
scrollDir[2] = "0 0";
|
||||
scrollDir[3] = "0 0";
|
||||
scrollSpeed[0] = "0";
|
||||
scrollSpeed[1] = "0";
|
||||
scrollSpeed[2] = "0";
|
||||
scrollSpeed[3] = "0";
|
||||
rotSpeed[0] = "0";
|
||||
rotSpeed[1] = "0";
|
||||
rotSpeed[2] = "0";
|
||||
rotSpeed[3] = "0";
|
||||
rotPivotOffset[0] = "0 0";
|
||||
rotPivotOffset[1] = "0 0";
|
||||
rotPivotOffset[2] = "0 0";
|
||||
rotPivotOffset[3] = "0 0";
|
||||
waveType[0] = "Sin";
|
||||
waveType[1] = "Sin";
|
||||
waveType[2] = "Sin";
|
||||
waveType[3] = "Sin";
|
||||
waveFreq[0] = "0";
|
||||
waveFreq[1] = "0";
|
||||
waveFreq[2] = "0";
|
||||
waveFreq[3] = "0";
|
||||
waveAmp[0] = "0";
|
||||
waveAmp[1] = "0";
|
||||
waveAmp[2] = "0";
|
||||
waveAmp[3] = "0";
|
||||
sequenceFramePerSec[0] = "0";
|
||||
sequenceFramePerSec[1] = "0";
|
||||
sequenceFramePerSec[2] = "0";
|
||||
sequenceFramePerSec[3] = "0";
|
||||
sequenceSegmentSize[0] = "0";
|
||||
sequenceSegmentSize[1] = "0";
|
||||
sequenceSegmentSize[2] = "0";
|
||||
sequenceSegmentSize[3] = "0";
|
||||
cellIndex[0] = "0 0";
|
||||
cellIndex[1] = "0 0";
|
||||
cellIndex[2] = "0 0";
|
||||
cellIndex[3] = "0 0";
|
||||
cellLayout[0] = "0 0";
|
||||
cellLayout[1] = "0 0";
|
||||
cellLayout[2] = "0 0";
|
||||
cellLayout[3] = "0 0";
|
||||
cellSize[0] = "0";
|
||||
cellSize[1] = "0";
|
||||
cellSize[2] = "0";
|
||||
cellSize[3] = "0";
|
||||
bumpAtlas[0] = "0";
|
||||
bumpAtlas[1] = "0";
|
||||
bumpAtlas[2] = "0";
|
||||
bumpAtlas[3] = "0";
|
||||
castShadows = "0";
|
||||
planarReflection = "0";
|
||||
translucent = "1";
|
||||
translucentBlendOp = "PreMul";
|
||||
translucentZWrite = "0";
|
||||
alphaTest = "0";
|
||||
alphaRef = "1";
|
||||
dynamicCubemap = "0";
|
||||
showFootprints = "1";
|
||||
showDust = "0";
|
||||
effectColor[0] = "0 0 0 0";
|
||||
effectColor[1] = "0 0 0 0";
|
||||
footstepSoundId = "-1";
|
||||
impactSoundId = "-1";
|
||||
ImpactFXIndex = "-1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -55,23 +55,6 @@ singleton Material(CameraMat)
|
|||
};
|
||||
|
||||
//--- camera.dts MATERIALS END ---
|
||||
//--- noshape.dts MATERIALS BEGIN ---
|
||||
singleton Material(noshape_NoShape)
|
||||
{
|
||||
mapTo = "NoShape";
|
||||
|
||||
diffuseMapAsset[0] = "";
|
||||
|
||||
diffuseColor[0] = "0.8 0.003067 0 .8";
|
||||
emissive[0] = 0;
|
||||
|
||||
doubleSided = false;
|
||||
translucent = 1;
|
||||
translucentBlendOp = "LerpAlpha";
|
||||
castShadows = false;
|
||||
};
|
||||
|
||||
//--- noshape.dts MATERIALS END ---
|
||||
|
||||
//--- noshapetext.dae MATERIALS BEGIN ---
|
||||
singleton Material(noshapetext_lambert1)
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton Material( Empty )
|
||||
{
|
||||
};
|
||||
|
||||
singleton Material(WarningMaterial) {
|
||||
detailMapAsset[0] = "Core_PostFX:missingTexture_image";
|
||||
diffuseColor[0] = "25 16 0";
|
||||
emissive[0] = false;
|
||||
translucent = false;
|
||||
};
|
||||
|
|
@ -20,9 +20,9 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "../../../gl/hlslCompat.glsl"
|
||||
#include "../../../rendering/shaders/gl/hlslCompat.glsl"
|
||||
#include "shadergen:/autogenConditioners.h"
|
||||
#include "../../gl/postFx.glsl"
|
||||
#include "../../../rendering/shaders/postFX/gl/postFx.glsl"
|
||||
|
||||
uniform sampler2D backBuffer; // The original backbuffer.
|
||||
uniform sampler2D deferredTex; // The pre-pass depth and normals.
|
||||
|
|
|
|||
|
|
@ -15,4 +15,6 @@ singleton PostEffect( reflectionProbeArrayPostFX )
|
|||
texture[0] = "#deferred";
|
||||
texture[1] = "#color";
|
||||
texture[2] = "#matinfo";
|
||||
|
||||
allowReflectPass = true;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,21 +20,21 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
singleton ShaderData( PFX_PassthruShader )
|
||||
{
|
||||
DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
|
||||
DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/passthruP.hlsl";
|
||||
|
||||
OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
|
||||
OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/passthruP.glsl";
|
||||
|
||||
samplerNames[0] = "$inputTex";
|
||||
|
||||
pixVersion = 2.0;
|
||||
};
|
||||
|
||||
function postFXInit()
|
||||
{
|
||||
singleton ShaderData( PFX_PassthruShader )
|
||||
{
|
||||
DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
|
||||
DXPixelShaderFile = $Core::CommonShaderPath @ "/postFX/passthruP.hlsl";
|
||||
|
||||
OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
|
||||
OGLPixelShaderFile = $Core::CommonShaderPath @ "/postFX/gl/passthruP.glsl";
|
||||
|
||||
samplerNames[0] = "$inputTex";
|
||||
|
||||
pixVersion = 2.0;
|
||||
};
|
||||
|
||||
//Load the core postFX files themselves
|
||||
if (!$Server::Dedicated)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,11 +59,11 @@ function Core_Rendering::initClient(%this)
|
|||
|
||||
configureCanvas();
|
||||
|
||||
postFXInit();
|
||||
|
||||
//Autodetect settings if it's our first time
|
||||
if($pref::Video::autoDetect)
|
||||
AutodetectGraphics();
|
||||
|
||||
postFXInit();
|
||||
|
||||
closeSplashWindow();
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
singleton Material(moon_noglow) {
|
||||
mapTo="moon_noglow";
|
||||
DiffuseMapAsset = "Core_Rendering:moon_noglow_image";
|
||||
emissive = true;
|
||||
translucent = true;
|
||||
vertColor[ 0 ] = true;
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
singleton Material(moon_wglow) {
|
||||
mapTo="moon_wglow";
|
||||
DiffuseMapAsset = "Core_Rendering:moon_wglow_image";
|
||||
emissive = true;
|
||||
translucent = true;
|
||||
vertColor[ 0 ] = true;
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -811,7 +811,7 @@ function AutodetectGraphics_Apply(%shaderVer, %intel, %videoMem )
|
|||
PostFXManager.settingsEffectSetEnabled(HDRPostFX, $pref::PostFX::EnableHDR);
|
||||
PostFXManager.settingsEffectSetEnabled(DepthOfFieldPostFX, $pref::PostFX::EnableDOF);
|
||||
PostFXManager.settingsEffectSetEnabled(LightRayPostFX, $pref::PostFX::EnableLightRays);
|
||||
PostFXManager.settingsEffectSetEnabled(VignettePostEffect, $pref::PostFX::EnableVignette);
|
||||
PostFXManager.settingsEffectSetEnabled(VignettePostFX, $pref::PostFX::EnableVignette);
|
||||
|
||||
echo("Graphics quality settings have been auto detected.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
#include "./torque.glsl"
|
||||
#include "./brdf.glsl"
|
||||
|
||||
uniform float maxProbeDrawDistance;
|
||||
|
||||
#ifndef TORQUE_SHADERGEN
|
||||
#line 27
|
||||
// These are the uniforms used by most lighting shaders.
|
||||
|
|
@ -106,7 +108,7 @@ struct Surface
|
|||
|
||||
void updateSurface(inout Surface surface)
|
||||
{
|
||||
surface.NdotV = abs(dot(surface.N, surface.V)) + 1e-5f; // avoid artifact
|
||||
surface.NdotV = clamp( dot(surface.N, surface.V), 0.0009765625f,0.9990234375f); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
|
||||
surface.linearRoughness = surface.roughness * surface.roughness;
|
||||
surface.linearRoughnessSq = surface.linearRoughness * surface.linearRoughness;
|
||||
|
|
@ -330,7 +332,7 @@ float defineSphereSpaceInfluence(vec3 wsPosition, vec3 wsProbePosition, float ra
|
|||
{
|
||||
vec3 L = wsProbePosition.xyz - wsPosition;
|
||||
float contribution = 1.0 - length(L) / radius;
|
||||
return contribution;
|
||||
return saturate(contribution);
|
||||
}
|
||||
|
||||
float getDistBoxToPoint(vec3 pt, vec3 extents)
|
||||
|
|
@ -342,10 +344,9 @@ float getDistBoxToPoint(vec3 pt, vec3 extents)
|
|||
float defineBoxSpaceInfluence(vec3 wsPosition, mat4 worldToObj, float attenuation)
|
||||
{
|
||||
vec3 surfPosLS = tMul(worldToObj, vec4(wsPosition, 1.0)).xyz;
|
||||
float atten = 1.0 - attenuation;
|
||||
float baseVal = 0.25;
|
||||
float dist = getDistBoxToPoint(surfPosLS, vec3(baseVal, baseVal, baseVal));
|
||||
return saturate(smoothstep(baseVal + 0.0001, atten*baseVal, dist));
|
||||
return saturate(smoothstep(baseVal, (baseVal-attenuation/2), dist));
|
||||
}
|
||||
|
||||
// Box Projected IBL Lighting
|
||||
|
|
@ -367,9 +368,9 @@ vec3 boxProject(vec3 wsPosition, vec3 wsReflectVec, mat4 worldToObj, vec3 refSca
|
|||
}
|
||||
|
||||
vec4 computeForwardProbes(Surface surface,
|
||||
float cubeMips, int numProbes, mat4x4 worldToObjArray[MAX_FORWARD_PROBES], vec4 probeConfigData[MAX_FORWARD_PROBES],
|
||||
vec4 inProbePosArray[MAX_FORWARD_PROBES], vec4 refScaleArray[MAX_FORWARD_PROBES], vec4 inRefPosArray[MAX_FORWARD_PROBES],
|
||||
float skylightCubemapIdx, sampler2D BRDFTexture,
|
||||
float cubeMips, int numProbes, mat4x4 inWorldToObjArray[MAX_FORWARD_PROBES], vec4 inProbeConfigData[MAX_FORWARD_PROBES],
|
||||
vec4 inProbePosArray[MAX_FORWARD_PROBES], vec4 inRefScaleArray[MAX_FORWARD_PROBES], vec4 inRefPosArray[MAX_FORWARD_PROBES],
|
||||
vec3 wsEyePos, float skylightCubemapIdx, sampler2D BRDFTexture,
|
||||
samplerCubeArray irradianceCubemapAR, samplerCubeArray specularCubemapAR)
|
||||
{
|
||||
int i = 0;
|
||||
|
|
@ -384,47 +385,37 @@ vec4 computeForwardProbes(Surface surface,
|
|||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
contribution[i] = 0;
|
||||
|
||||
if (probeConfigData[i].r == 0) //box
|
||||
float atten = 1.0-(length(wsEyePos-inProbePosArray[i].xyz)/maxProbeDrawDistance);
|
||||
if (inProbeConfigData[i].r == 0) //box
|
||||
{
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b);
|
||||
if (contribution[i] > 0.0)
|
||||
probehits++;
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, inWorldToObjArray[i], inProbeConfigData[i].b)*atten;
|
||||
}
|
||||
else if (probeConfigData[i].r == 1) //sphere
|
||||
else if (inProbeConfigData[i].r == 1) //sphere
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, probeConfigData[i].g);
|
||||
if (contribution[i] > 0.0)
|
||||
probehits++;
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, inProbeConfigData[i].g)*atten;
|
||||
}
|
||||
|
||||
contribution[i] = max(contribution[i], 0);
|
||||
if (contribution[i]>0.0)
|
||||
probehits++;
|
||||
else
|
||||
contribution[i] = 0.0;
|
||||
|
||||
blendSum += contribution[i];
|
||||
invBlendSum += (1.0f - contribution[i]);
|
||||
}
|
||||
|
||||
if (probehits > 1.0)
|
||||
if (probehits > 1.0)//if we overlap
|
||||
{
|
||||
invBlendSum = (probehits - blendSum)/(probehits-1); //grab the remainder
|
||||
for (i = 0; i < numProbes; i++)
|
||||
{
|
||||
blendFactor[i] = ((contribution[i] / blendSum)) / probehits;
|
||||
blendFactor[i] *= ((contribution[i]) / invBlendSum);
|
||||
blendFactor[i] = saturate(blendFactor[i]);
|
||||
blendFacSum += blendFactor[i];
|
||||
blendFactor[i] = contribution[i]/blendSum; //what % total is this instance
|
||||
blendFactor[i] *= blendFactor[i] / invBlendSum; //what should we add to sum to 1
|
||||
blendFacSum += blendFactor[i]; //running tally of results
|
||||
}
|
||||
|
||||
// Normalize blendVal
|
||||
if (blendFacSum == 0.0f) // Possible with custom weight
|
||||
{
|
||||
blendFacSum = 1.0f;
|
||||
}
|
||||
|
||||
float invBlendSumWeighted = 1.0f / blendFacSum;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
blendFactor[i] *= invBlendSumWeighted;
|
||||
contribution[i] *= blendFactor[i];
|
||||
contribution[i] *= blendFactor[i]/blendFacSum; //normalize
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -471,8 +462,8 @@ vec4 computeForwardProbes(Surface surface,
|
|||
float contrib = contribution[i];
|
||||
if (contrib > 0.0f)
|
||||
{
|
||||
float cubemapIdx = int(probeConfigData[i].a);
|
||||
vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
int cubemapIdx = int(inProbeConfigData[i].a);
|
||||
vec3 dir = boxProject(surface.P, surface.R, inWorldToObjArray[i], inRefScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
|
||||
irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib;
|
||||
specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib;
|
||||
|
|
@ -491,8 +482,8 @@ vec4 computeForwardProbes(Surface surface,
|
|||
vec3 kD = 1.0f - F;
|
||||
kD *= 1.0f - surface.metalness;
|
||||
|
||||
float dfgNdotV = max( surface.NdotV , 0.0009765625f ); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
vec2 envBRDF = textureLod(BRDFTexture, vec2(dfgNdotV, surface.roughness),0).rg;
|
||||
//float dfgNdotV = max( surface.NdotV , 0.0009765625f ); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
vec2 envBRDF = textureLod(BRDFTexture, vec2(surface.NdotV, surface.roughness),0).rg;
|
||||
specular *= F * envBRDF.x + surface.f90 * envBRDF.y;
|
||||
irradiance *= kD * surface.baseColor.rgb;
|
||||
|
||||
|
|
@ -504,13 +495,16 @@ vec4 computeForwardProbes(Surface surface,
|
|||
float horizonOcclusion = 1.3;
|
||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||
horizon *= horizon;
|
||||
|
||||
#if CAPTURING == 1
|
||||
return vec4(mix(surface.baseColor.rgb,(irradiance + specular) * horizon,surface.metalness/2),0);
|
||||
#else
|
||||
return vec4((irradiance + specular) * horizon, 0);//alpha writes disabled
|
||||
#endif
|
||||
}
|
||||
|
||||
vec4 debugVizForwardProbes(Surface surface,
|
||||
float cubeMips, int numProbes, mat4 worldToObjArray[MAX_FORWARD_PROBES], vec4 probeConfigData[MAX_FORWARD_PROBES],
|
||||
vec4 inProbePosArray[MAX_FORWARD_PROBES], vec4 refScaleArray[MAX_FORWARD_PROBES], vec4 inRefPosArray[MAX_FORWARD_PROBES],
|
||||
float cubeMips, int numProbes, mat4 inWorldToObjArray[MAX_FORWARD_PROBES], vec4 inProbeConfigData[MAX_FORWARD_PROBES],
|
||||
vec4 inProbePosArray[MAX_FORWARD_PROBES], vec4 inRefScaleArray[MAX_FORWARD_PROBES], vec4 inRefPosArray[MAX_FORWARD_PROBES],
|
||||
float skylightCubemapIdx, sampler2D BRDFTexture,
|
||||
samplerCubeArray irradianceCubemapAR, samplerCubeArray specularCubemapAR, int showAtten, int showContrib, int showSpec, int showDiff)
|
||||
{
|
||||
|
|
@ -527,15 +521,15 @@ vec4 debugVizForwardProbes(Surface surface,
|
|||
{
|
||||
contribution[i] = 0;
|
||||
|
||||
if (probeConfigData[i].r == 0) //box
|
||||
if (inProbeConfigData[i].r == 0) //box
|
||||
{
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b);
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, inWorldToObjArray[i], inProbeConfigData[i].b);
|
||||
if (contribution[i] > 0.0)
|
||||
probehits++;
|
||||
}
|
||||
else if (probeConfigData[i].r == 1) //sphere
|
||||
else if (inProbeConfigData[i].r == 1) //sphere
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, probeConfigData[i].g);
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, inProbeConfigData[i].g);
|
||||
if (contribution[i] > 0.0)
|
||||
probehits++;
|
||||
}
|
||||
|
|
@ -620,8 +614,8 @@ vec4 debugVizForwardProbes(Surface surface,
|
|||
float contrib = contribution[i];
|
||||
if (contrib > 0.0f)
|
||||
{
|
||||
float cubemapIdx = probeConfigData[i].a;
|
||||
vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
float cubemapIdx = inProbeConfigData[i].a;
|
||||
vec3 dir = boxProject(surface.P, surface.R, inWorldToObjArray[i], inRefScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
|
||||
irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib;
|
||||
specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib;
|
||||
|
|
@ -650,8 +644,7 @@ vec4 debugVizForwardProbes(Surface surface,
|
|||
vec3 kD = 1.0f - F;
|
||||
kD *= 1.0f - surface.metalness;
|
||||
|
||||
float dfgNdotV = max( surface.NdotV , 0.0009765625f ); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
vec2 envBRDF = textureLod(BRDFTexture, vec2(dfgNdotV, surface.roughness),0).rg;
|
||||
vec2 envBRDF = textureLod(BRDFTexture, vec2(surface.NdotV, surface.roughness),0).rg;
|
||||
specular *= F * envBRDF.x + surface.f90 * envBRDF.y;
|
||||
irradiance *= kD * surface.baseColor.rgb;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@
|
|||
#include "./brdf.hlsl"
|
||||
#include "./shaderModelAutoGen.hlsl"
|
||||
|
||||
//globals
|
||||
uniform float3 eyePosWorld;
|
||||
uniform float maxProbeDrawDistance;
|
||||
#ifndef TORQUE_SHADERGEN
|
||||
|
||||
// These are the uniforms used by most lighting shaders.
|
||||
|
|
@ -105,10 +108,9 @@ struct Surface
|
|||
|
||||
inline void Update()
|
||||
{
|
||||
NdotV = abs(dot(N, V)) + 1e-5f; // avoid artifact
|
||||
|
||||
linearRoughness = roughness * roughness;
|
||||
linearRoughnessSq = linearRoughness * linearRoughness;
|
||||
NdotV = clamp( dot(N, V), 0.0009765625f,0.9990234375f); // avoid artifact
|
||||
linearRoughness = roughness * roughness;
|
||||
linearRoughnessSq = linearRoughness * linearRoughness;
|
||||
|
||||
albedo = baseColor.rgb * (1.0f - metalness);
|
||||
f0 = lerp(0.04f, baseColor.rgb, metalness);
|
||||
|
|
@ -334,7 +336,7 @@ float defineSphereSpaceInfluence(float3 wsPosition, float3 wsProbePosition, floa
|
|||
{
|
||||
float3 L = wsProbePosition.xyz - wsPosition;
|
||||
float contribution = 1.0 - length(L) / radius;
|
||||
return contribution;
|
||||
return saturate(contribution);
|
||||
}
|
||||
|
||||
float getDistBoxToPoint(float3 pt, float3 extents)
|
||||
|
|
@ -346,10 +348,9 @@ float getDistBoxToPoint(float3 pt, float3 extents)
|
|||
float defineBoxSpaceInfluence(float3 wsPosition, float4x4 worldToObj, float attenuation)
|
||||
{
|
||||
float3 surfPosLS = mul(worldToObj, float4(wsPosition, 1.0)).xyz;
|
||||
float atten = 1.0 - attenuation;
|
||||
float baseVal = 0.25;
|
||||
float dist = getDistBoxToPoint(surfPosLS, float3(baseVal, baseVal, baseVal));
|
||||
return saturate(smoothstep(baseVal + 0.0001, atten*baseVal, dist));
|
||||
return saturate(smoothstep(baseVal, (baseVal-attenuation/2), dist));
|
||||
}
|
||||
|
||||
// Box Projected IBL Lighting
|
||||
|
|
@ -371,9 +372,9 @@ float3 boxProject(float3 wsPosition, float3 wsReflectVec, float4x4 worldToObj, f
|
|||
}
|
||||
|
||||
float4 computeForwardProbes(Surface surface,
|
||||
float cubeMips, int numProbes, float4x4 worldToObjArray[MAX_FORWARD_PROBES], float4 probeConfigData[MAX_FORWARD_PROBES],
|
||||
float4 inProbePosArray[MAX_FORWARD_PROBES], float4 refScaleArray[MAX_FORWARD_PROBES], float4 inRefPosArray[MAX_FORWARD_PROBES],
|
||||
float skylightCubemapIdx, TORQUE_SAMPLER2D(BRDFTexture),
|
||||
float cubeMips, int numProbes, float4x4 inWorldToObjArray[MAX_FORWARD_PROBES], float4 inProbeConfigData[MAX_FORWARD_PROBES],
|
||||
float4 inProbePosArray[MAX_FORWARD_PROBES], float4 inRefScaleArray[MAX_FORWARD_PROBES], float4 inRefPosArray[MAX_FORWARD_PROBES],
|
||||
float3 wsEyePos, float skylightCubemapIdx, TORQUE_SAMPLER2D(BRDFTexture),
|
||||
TORQUE_SAMPLERCUBEARRAY(irradianceCubemapAR), TORQUE_SAMPLERCUBEARRAY(specularCubemapAR))
|
||||
{
|
||||
int i = 0;
|
||||
|
|
@ -385,50 +386,41 @@ float4 computeForwardProbes(Surface surface,
|
|||
float probehits = 0;
|
||||
//Set up our struct data
|
||||
float contribution[MAX_FORWARD_PROBES];
|
||||
//Process prooooobes
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
contribution[i] = 0;
|
||||
|
||||
if (probeConfigData[i].r == 0) //box
|
||||
contribution[i] = 0.0;
|
||||
float atten = 1.0-(length(wsEyePos-inProbePosArray[i].xyz)/maxProbeDrawDistance);
|
||||
if (inProbeConfigData[i].r == 0) //box
|
||||
{
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b);
|
||||
if (contribution[i] > 0.0)
|
||||
probehits++;
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, inWorldToObjArray[i], inProbeConfigData[i].b)*atten;
|
||||
}
|
||||
else if (probeConfigData[i].r == 1) //sphere
|
||||
else if (inProbeConfigData[i].r == 1) //sphere
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, probeConfigData[i].g);
|
||||
if (contribution[i] > 0.0)
|
||||
probehits++;
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, inProbeConfigData[i].g)*atten;
|
||||
}
|
||||
|
||||
contribution[i] = max(contribution[i], 0);
|
||||
if (contribution[i]>0.0)
|
||||
probehits++;
|
||||
else
|
||||
contribution[i] = 0.0;
|
||||
|
||||
blendSum += contribution[i];
|
||||
invBlendSum += (1.0f - contribution[i]);
|
||||
}
|
||||
|
||||
if (probehits > 1.0)
|
||||
if (probehits > 1.0)//if we overlap
|
||||
{
|
||||
invBlendSum = (probehits - blendSum)/(probehits-1); //grab the remainder
|
||||
for (i = 0; i < numProbes; i++)
|
||||
{
|
||||
blendFactor[i] = ((contribution[i] / blendSum)) / probehits;
|
||||
blendFactor[i] *= ((contribution[i]) / invBlendSum);
|
||||
blendFactor[i] = saturate(blendFactor[i]);
|
||||
blendFacSum += blendFactor[i];
|
||||
blendFactor[i] = contribution[i]/blendSum; //what % total is this instance
|
||||
blendFactor[i] *= blendFactor[i] / invBlendSum; //what should we add to sum to 1
|
||||
blendFacSum += blendFactor[i]; //running tally of results
|
||||
}
|
||||
|
||||
// Normalize blendVal
|
||||
if (blendFacSum == 0.0f) // Possible with custom weight
|
||||
{
|
||||
blendFacSum = 1.0f;
|
||||
}
|
||||
|
||||
float invBlendSumWeighted = 1.0f / blendFacSum;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
blendFactor[i] *= invBlendSumWeighted;
|
||||
contribution[i] *= blendFactor[i];
|
||||
contribution[i] *= blendFactor[i]/blendFacSum; //normalize
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -475,8 +467,8 @@ float4 computeForwardProbes(Surface surface,
|
|||
float contrib = contribution[i];
|
||||
if (contrib > 0.0f)
|
||||
{
|
||||
int cubemapIdx = probeConfigData[i].a;
|
||||
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
int cubemapIdx = inProbeConfigData[i].a;
|
||||
float3 dir = boxProject(surface.P, surface.R, inWorldToObjArray[i], inRefScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
|
||||
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, cubemapIdx, 0).xyz * contrib;
|
||||
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, dir, cubemapIdx, lod).xyz * contrib;
|
||||
|
|
@ -495,8 +487,8 @@ float4 computeForwardProbes(Surface surface,
|
|||
float3 kD = 1.0f - F;
|
||||
kD *= 1.0f - surface.metalness;
|
||||
|
||||
float dfgNdotV = max( surface.NdotV , 0.0009765625f ); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
float2 envBRDF = TORQUE_TEX2DLOD(BRDFTexture, float4(dfgNdotV, surface.roughness,0,0)).rg;
|
||||
//float dfgNdotV = max( surface.NdotV , 0.0009765625f ); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
float2 envBRDF = TORQUE_TEX2DLOD(BRDFTexture, float4(surface.NdotV, surface.roughness,0,0)).rg;
|
||||
specular *= F * envBRDF.x + surface.f90 * envBRDF.y;
|
||||
irradiance *= kD * surface.baseColor.rgb;
|
||||
|
||||
|
|
@ -508,13 +500,16 @@ float4 computeForwardProbes(Surface surface,
|
|||
float horizonOcclusion = 1.3;
|
||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||
horizon *= horizon;
|
||||
|
||||
#if CAPTURING == 1
|
||||
return float4(lerp(surface.baseColor.rgb,(irradiance + specular) * horizon,surface.metalness/2),0);
|
||||
#else
|
||||
return float4((irradiance + specular) * horizon, 0);//alpha writes disabled
|
||||
#endif
|
||||
}
|
||||
|
||||
float4 debugVizForwardProbes(Surface surface,
|
||||
float cubeMips, int numProbes, float4x4 worldToObjArray[MAX_FORWARD_PROBES], float4 probeConfigData[MAX_FORWARD_PROBES],
|
||||
float4 inProbePosArray[MAX_FORWARD_PROBES], float4 refScaleArray[MAX_FORWARD_PROBES], float4 inRefPosArray[MAX_FORWARD_PROBES],
|
||||
float cubeMips, int numProbes, float4x4 inWorldToObjArray[MAX_FORWARD_PROBES], float4 inProbeConfigData[MAX_FORWARD_PROBES],
|
||||
float4 inProbePosArray[MAX_FORWARD_PROBES], float4 inRefScaleArray[MAX_FORWARD_PROBES], float4 inRefPosArray[MAX_FORWARD_PROBES],
|
||||
float skylightCubemapIdx, TORQUE_SAMPLER2D(BRDFTexture),
|
||||
TORQUE_SAMPLERCUBEARRAY(irradianceCubemapAR), TORQUE_SAMPLERCUBEARRAY(specularCubemapAR), int showAtten, int showContrib, int showSpec, int showDiff)
|
||||
{
|
||||
|
|
@ -531,15 +526,15 @@ float4 debugVizForwardProbes(Surface surface,
|
|||
{
|
||||
contribution[i] = 0;
|
||||
|
||||
if (probeConfigData[i].r == 0) //box
|
||||
if (inProbeConfigData[i].r == 0) //box
|
||||
{
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b);
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, inWorldToObjArray[i], inProbeConfigData[i].b);
|
||||
if (contribution[i] > 0.0)
|
||||
probehits++;
|
||||
}
|
||||
else if (probeConfigData[i].r == 1) //sphere
|
||||
else if (inProbeConfigData[i].r == 1) //sphere
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, probeConfigData[i].g);
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, inProbeConfigData[i].g);
|
||||
if (contribution[i] > 0.0)
|
||||
probehits++;
|
||||
}
|
||||
|
|
@ -624,8 +619,8 @@ float4 debugVizForwardProbes(Surface surface,
|
|||
float contrib = contribution[i];
|
||||
if (contrib > 0.0f)
|
||||
{
|
||||
int cubemapIdx = probeConfigData[i].a;
|
||||
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
int cubemapIdx = inProbeConfigData[i].a;
|
||||
float3 dir = boxProject(surface.P, surface.R, inWorldToObjArray[i], inRefScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
|
||||
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, cubemapIdx, 0).xyz * contrib;
|
||||
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, dir, cubemapIdx, lod).xyz * contrib;
|
||||
|
|
@ -654,8 +649,7 @@ float4 debugVizForwardProbes(Surface surface,
|
|||
float3 kD = 1.0f - F;
|
||||
kD *= 1.0f - surface.metalness;
|
||||
|
||||
float dfgNdotV = max( surface.NdotV , 0.0009765625f ); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
float2 envBRDF = TORQUE_TEX2DLOD(BRDFTexture, float4(dfgNdotV, surface.roughness,0,0)).rg;
|
||||
float2 envBRDF = TORQUE_TEX2DLOD(BRDFTexture, float4(surface.NdotV, surface.roughness,0,0)).rg;
|
||||
specular *= F * envBRDF.x + surface.f90 * envBRDF.y;
|
||||
irradiance *= kD * surface.baseColor.rgb;
|
||||
|
||||
|
|
|
|||
|
|
@ -196,6 +196,38 @@ void main()
|
|||
lightCol *= max(cookie.r, max(cookie.g, cookie.b));
|
||||
#endif
|
||||
|
||||
#ifdef DIFFUSE_LIGHT_VIZ
|
||||
float attenuation = getDistanceAtt(surfaceToLight.Lu, radius);
|
||||
vec3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
|
||||
vec3 diffuse = BRDF_GetDebugDiffuse(surface,surfaceToLight) * factor;
|
||||
vec3 final = max(0.0f, diffuse);
|
||||
OUT_col = vec4(final, 0);
|
||||
return
|
||||
#endif
|
||||
|
||||
#ifdef SPECULAR_LIGHT_VIZ
|
||||
float attenuation = getDistanceAtt(surfaceToLight.Lu, radius);
|
||||
vec3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
|
||||
vec3 diffuse = BRDF_GetDebugSpecular(surface,surfaceToLight) * factor;
|
||||
vec3 final = max(0.0f, diffuse);
|
||||
OUT_col = vec4(final, 0);
|
||||
return
|
||||
#endif
|
||||
|
||||
#ifdef DETAIL_LIGHTING_VIZ
|
||||
float attenuation = getDistanceAtt(surfaceToLight.Lu, radius);
|
||||
vec3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
|
||||
vec3 diffuse = BRDF_GetDiffuse(surface,surfaceToLight) * factor;
|
||||
vec3 spec = BRDF_GetSpecular(surface,surfaceToLight) * factor;
|
||||
|
||||
vec3 final = max(vec3(0.0f), diffuse + spec * surface.F);
|
||||
OUT_col = vec4(final, 0);
|
||||
return
|
||||
#endif
|
||||
|
||||
//get punctual light contribution
|
||||
lighting = getPunctualLight(surface, surfaceToLight, lightCol, lightBrightness, lightInvSqrRange, shadowed);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ uniform sampler2D ssaoMask;
|
|||
uniform vec4 rtParams6;
|
||||
#endif
|
||||
|
||||
uniform vec4 inProbePosArray[MAX_PROBES];
|
||||
uniform vec4 inRefPosArray[MAX_PROBES];
|
||||
uniform vec4 probePosArray[MAX_PROBES];
|
||||
uniform vec4 refPosArray[MAX_PROBES];
|
||||
uniform mat4 worldToObjArray[MAX_PROBES];
|
||||
uniform vec4 refScaleArray[MAX_PROBES];
|
||||
uniform vec4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten
|
||||
|
|
@ -84,78 +84,57 @@ void main()
|
|||
{
|
||||
contribution[i] = 0;
|
||||
|
||||
float atten =1.0-(length(eyePosWorld-probePosArray[i].xyz)/maxProbeDrawDistance);
|
||||
if (probeConfigData[i].r == 0) //box
|
||||
{
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b);
|
||||
if (contribution[i]>0.0)
|
||||
probehits++;
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b)*atten;
|
||||
}
|
||||
else if (probeConfigData[i].r == 1) //sphere
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, probeConfigData[i].g);
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, probePosArray[i].xyz, probeConfigData[i].g)*atten;
|
||||
}
|
||||
|
||||
if (contribution[i]>0.0)
|
||||
probehits++;
|
||||
}
|
||||
|
||||
contribution[i] = max(contribution[i],0);
|
||||
else
|
||||
contribution[i] = 0;
|
||||
|
||||
blendSum += contribution[i];
|
||||
invBlendSum += (1.0f - contribution[i]);
|
||||
}
|
||||
// Weight0 = normalized NDF, inverted to have 1 at center, 0 at boundary.
|
||||
// And as we invert, we need to divide by Num-1 to stay normalized (else sum is > 1).
|
||||
// respect constraint B.
|
||||
// Weight1 = normalized inverted NDF, so we have 1 at center, 0 at boundary
|
||||
// and respect constraint A.
|
||||
|
||||
if (probehits > 1.0)
|
||||
if (probehits > 1.0)//if we overlap
|
||||
{
|
||||
invBlendSum = (probehits - blendSum)/(probehits-1); //grab the remainder
|
||||
for (i = 0; i < numProbes; i++)
|
||||
{
|
||||
blendFactor[i] = ((contribution[i] / blendSum)) / probehits;
|
||||
blendFactor[i] *= ((contribution[i]) / invBlendSum);
|
||||
blendFactor[i] = saturate(blendFactor[i]);
|
||||
blendFacSum += blendFactor[i];
|
||||
blendFactor[i] = contribution[i]/blendSum; //what % total is this instance
|
||||
blendFactor[i] *= blendFactor[i] / invBlendSum; //what should we add to sum to 1
|
||||
blendFacSum += blendFactor[i]; //running tally of results
|
||||
}
|
||||
|
||||
// Normalize blendVal
|
||||
if (blendFacSum == 0.0f) // Possible with custom weight
|
||||
{
|
||||
blendFacSum = 1.0f;
|
||||
}
|
||||
|
||||
float invBlendSumWeighted = 1.0f / blendFacSum;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
blendFactor[i] *= invBlendSumWeighted;
|
||||
contribution[i] *= blendFactor[i];
|
||||
contribution[i] *= blendFactor[i]/blendFacSum; //normalize
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUGVIZ_ATTENUATION == 1
|
||||
float contribAlpha = 1;
|
||||
float contribAlpha = 0;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
contribAlpha -= contribution[i];
|
||||
contribAlpha += contribution[i];
|
||||
}
|
||||
|
||||
OUT_col = vec4(1 - contribAlpha, 1 - contribAlpha, 1 - contribAlpha, 1);
|
||||
OUT_col = vec4(contribAlpha,contribAlpha,contribAlpha, 1);
|
||||
return;
|
||||
#endif
|
||||
|
||||
#if DEBUGVIZ_CONTRIB == 1
|
||||
vec3 finalContribColor = vec3(0, 0, 0);
|
||||
float contribAlpha = 1;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
finalContribColor += contribution[i] *probeContribColors[i].rgb;
|
||||
contribAlpha -= contribution[i];
|
||||
finalContribColor += contribution[i] * vec3(fmod(i+1,2),fmod(i+1,3),fmod(i+1,4));
|
||||
}
|
||||
|
||||
//Skylight coloration for anything not covered by probes above
|
||||
if(skylightCubemapIdx != -1)
|
||||
finalContribColor += vec3(0, 1, 0) * contribAlpha;
|
||||
|
||||
OUT_col = vec4(finalContribColor, 1);
|
||||
return;
|
||||
#endif
|
||||
|
|
@ -178,8 +157,8 @@ void main()
|
|||
float contrib = contribution[i];
|
||||
if (contrib > 0.0f)
|
||||
{
|
||||
float cubemapIdx = probeConfigData[i].a;
|
||||
vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
int cubemapIdx = int(probeConfigData[i].a);
|
||||
vec3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refScaleArray[i].xyz, refPosArray[i].xyz);
|
||||
|
||||
irradiance += textureLod(irradianceCubemapAR, vec4(dir, cubemapIdx), 0).xyz * contrib;
|
||||
specular += textureLod(specularCubemapAR, vec4(dir, cubemapIdx), lod).xyz * contrib;
|
||||
|
|
@ -188,7 +167,7 @@ void main()
|
|||
}
|
||||
#endif
|
||||
|
||||
if (skylightCubemapIdx != -1 && alpha > 0.001)
|
||||
if (skylightCubemapIdx != -1 && alpha >= 0.001)
|
||||
{
|
||||
irradiance = lerp(irradiance,textureLod(irradianceCubemapAR, vec4(surface.R, skylightCubemapIdx), 0).xyz,alpha);
|
||||
specular = lerp(specular,textureLod(specularCubemapAR, vec4(surface.R, skylightCubemapIdx), lod).xyz,alpha);
|
||||
|
|
@ -202,14 +181,13 @@ void main()
|
|||
return;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
//energy conservation
|
||||
vec3 F = FresnelSchlickRoughness(surface.NdotV, surface.f0, surface.roughness);
|
||||
vec3 kD = 1.0f - F;
|
||||
kD *= 1.0f - surface.metalness;
|
||||
|
||||
float dfgNdotV = max( surface.NdotV , 0.0009765625f ); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
vec2 envBRDF = textureLod(BRDFTexture, vec2(dfgNdotV, surface.roughness),0).rg;
|
||||
vec2 envBRDF = textureLod(BRDFTexture, vec2(surface.NdotV, surface.roughness),0).rg;
|
||||
specular *= F * envBRDF.x + surface.f90 * envBRDF.y;
|
||||
irradiance *= kD * surface.baseColor.rgb;
|
||||
|
||||
|
|
@ -221,6 +199,9 @@ void main()
|
|||
float horizonOcclusion = 1.3;
|
||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||
horizon *= horizon;
|
||||
|
||||
OUT_col = vec4(irradiance + specular, 0);//alpha writes disabled
|
||||
#if CAPTURING == 1
|
||||
OUT_col = vec4(mix(surface.baseColor.rgb,(irradiance + specular) * horizon,surface.metalness/2),0);
|
||||
#else
|
||||
OUT_col = vec4((irradiance + specular) * horizon, 0);//alpha writes disabled
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,6 +122,41 @@ void main()
|
|||
lightCol *= max(cookie.r, max(cookie.g, cookie.b));
|
||||
#endif
|
||||
|
||||
#ifdef DIFFUSE_LIGHT_VIZ
|
||||
float attenuation = getDistanceAtt(surfaceToLight.Lu, radius);
|
||||
vec3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
|
||||
vec3 diffuse = BRDF_GetDebugDiffuse(surface,surfaceToLight) * factor;
|
||||
vec3 final = max(0.0f, diffuse) * getSpotAngleAtt(-surfaceToLight.L, lightDirection, lightSpotParams );
|
||||
|
||||
OUT_col = vec4(final, 0);
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef SPECULAR_LIGHT_VIZ
|
||||
float attenuation = getDistanceAtt(surfaceToLight.Lu, radius);
|
||||
float3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
|
||||
vec3 diffuse = BRDF_GetDebugSpecular(surface,surfaceToLight) * factor;
|
||||
vec3 final = max(0.0f, diffuse) * getSpotAngleAtt(-surfaceToLight.L, lightDirection, lightSpotParams );
|
||||
|
||||
OUT_col = vec4(final, 0);
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef DETAIL_LIGHTING_VIZ
|
||||
float attenuation = getDistanceAtt(surfaceToLight.Lu, radius);
|
||||
vec3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
|
||||
vec3 diffuse = BRDF_GetDiffuse(surface,surfaceToLight) * factor;
|
||||
vec3 spec = BRDF_GetSpecular(surface,surfaceToLight) * factor;
|
||||
|
||||
vec3 final = max(vec3(0.0f), diffuse + spec * surface.F) * getSpotAngleAtt(-surfaceToLight.L, lightDirection, lightSpotParams );
|
||||
|
||||
OUT_col = vec4(final, 0);
|
||||
return;
|
||||
#endif
|
||||
|
||||
//get Punctual light contribution
|
||||
lighting = getPunctualLight(surface, surfaceToLight, lightCol, lightBrightness, lightInvSqrRange, shadowed);
|
||||
//get spot angle attenuation
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ void main()
|
|||
lightingColor = shadowed_colors.rgb;
|
||||
#endif
|
||||
|
||||
shadow = lerp( shadow, 1.0, saturate( fadeOutAmt ) );
|
||||
shadow = mix( shadow, 1.0, saturate( fadeOutAmt ) );
|
||||
|
||||
#ifdef PSSM_DEBUG_RENDER
|
||||
if ( fadeOutAmt > 1.0 )
|
||||
|
|
@ -225,6 +225,37 @@ void main()
|
|||
|
||||
#endif //NO_SHADOW
|
||||
|
||||
#ifdef DIFFUSE_LIGHT_VIZ
|
||||
vec3 factor = lightingColor.rgb * max(surfaceToLight.NdotL, 0) * shadow * lightBrightness;
|
||||
vec3 diffuse = BRDF_GetDebugDiffuse(surface,surfaceToLight) * factor;
|
||||
|
||||
vec3 final = max(0.0f, diffuse);
|
||||
|
||||
OUT_col = vec4(final, 0);
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef SPECULAR_LIGHT_VIZ
|
||||
vec3 factor = lightingColor.rgb * max(surfaceToLight.NdotL, 0) * shadow * lightBrightness;
|
||||
vec3 spec = BRDF_GetDebugSpecular(surface, surfaceToLight) * factor;
|
||||
|
||||
vec3 final = max(0.0f, factor);
|
||||
|
||||
OUT_col = vec4(final, 0);
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef DETAIL_LIGHTING_VIZ
|
||||
vec3 factor = lightingColor.rgb * max(surfaceToLight.NdotL, 0) * shadow * lightBrightness;
|
||||
vec3 diffuse = BRDF_GetDebugDiffuse(surface,surfaceToLight) * factor;
|
||||
vec3 spec = BRDF_GetDebugSpecular(surface,surfaceToLight) * factor;
|
||||
|
||||
vec3 final = max(0.0f, diffuse + spec);
|
||||
|
||||
OUT_col = vec4(final, 0);
|
||||
return;
|
||||
#endif
|
||||
|
||||
//get directional light contribution
|
||||
vec3 lighting = getDirectionalLight(surface, surfaceToLight, lightingColor.rgb, lightBrightness, shadow);
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,6 @@ uniform float shadowSoftness;
|
|||
uniform float4x4 worldToCamera;
|
||||
uniform float3x3 worldToLightProj;
|
||||
|
||||
uniform float3 eyePosWorld;
|
||||
uniform float4x4 cameraToWorld;
|
||||
|
||||
float4 main( ConvexConnectP IN ) : SV_TARGET
|
||||
|
|
@ -218,12 +217,12 @@ float4 main( ConvexConnectP IN ) : SV_TARGET
|
|||
|
||||
#ifdef DETAIL_LIGHTING_VIZ
|
||||
float attenuation = getDistanceAtt(surfaceToLight.Lu, radius);
|
||||
vec3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
float3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
|
||||
vec3 diffuse = BRDF_GetDiffuse(surface,surfaceToLight) * factor;
|
||||
vec3 spec = BRDF_GetSpecular(surface,surfaceToLight) * factor;
|
||||
float3 diffuse = BRDF_GetDiffuse(surface,surfaceToLight) * factor;
|
||||
float3 spec = BRDF_GetSpecular(surface,surfaceToLight) * factor;
|
||||
|
||||
vec3 final = max(vec3(0.0f), diffuse + spec * surface.F);
|
||||
float3 final = max(float3(0.0f), diffuse + spec * surface.F);
|
||||
return final;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ TORQUE_UNIFORM_SAMPLER2D(BRDFTexture, 3);
|
|||
uniform float4 rtParams0;
|
||||
uniform float4 vsFarPlane;
|
||||
uniform float4x4 cameraToWorld;
|
||||
uniform float3 eyePosWorld;
|
||||
|
||||
//cubemap arrays require all the same size. so shared mips# value
|
||||
uniform float cubeMips;
|
||||
|
|
@ -27,8 +26,8 @@ TORQUE_UNIFORM_SAMPLER2D(ssaoMask, 6);
|
|||
uniform float4 rtParams6;
|
||||
#endif
|
||||
|
||||
uniform float4 inProbePosArray[MAX_PROBES];
|
||||
uniform float4 inRefPosArray[MAX_PROBES];
|
||||
uniform float4 probePosArray[MAX_PROBES];
|
||||
uniform float4 refPosArray[MAX_PROBES];
|
||||
uniform float4x4 worldToObjArray[MAX_PROBES];
|
||||
uniform float4 refScaleArray[MAX_PROBES];
|
||||
uniform float4 probeConfigData[MAX_PROBES]; //r,g,b/mode,radius,atten
|
||||
|
|
@ -76,79 +75,58 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
//Process prooooobes
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
contribution[i] = 0;
|
||||
contribution[i] = 0.0;
|
||||
|
||||
float atten =1.0-(length(eyePosWorld-probePosArray[i].xyz)/maxProbeDrawDistance);
|
||||
if (probeConfigData[i].r == 0) //box
|
||||
{
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b);
|
||||
if (contribution[i]>0.0)
|
||||
probehits++;
|
||||
contribution[i] = defineBoxSpaceInfluence(surface.P, worldToObjArray[i], probeConfigData[i].b)*atten;
|
||||
}
|
||||
else if (probeConfigData[i].r == 1) //sphere
|
||||
{
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, inProbePosArray[i].xyz, probeConfigData[i].g);
|
||||
contribution[i] = defineSphereSpaceInfluence(surface.P, probePosArray[i].xyz, probeConfigData[i].g)*atten;
|
||||
}
|
||||
|
||||
if (contribution[i]>0.0)
|
||||
probehits++;
|
||||
}
|
||||
|
||||
contribution[i] = max(contribution[i],0);
|
||||
else
|
||||
contribution[i] = 0.0;
|
||||
|
||||
blendSum += contribution[i];
|
||||
invBlendSum += (1.0f - contribution[i]);
|
||||
}
|
||||
// Weight0 = normalized NDF, inverted to have 1 at center, 0 at boundary.
|
||||
// And as we invert, we need to divide by Num-1 to stay normalized (else sum is > 1).
|
||||
// respect constraint B.
|
||||
// Weight1 = normalized inverted NDF, so we have 1 at center, 0 at boundary
|
||||
// and respect constraint A.
|
||||
|
||||
if (probehits > 1.0)
|
||||
if (probehits > 1.0)//if we overlap
|
||||
{
|
||||
invBlendSum = (probehits - blendSum)/(probehits-1); //grab the remainder
|
||||
for (i = 0; i < numProbes; i++)
|
||||
{
|
||||
blendFactor[i] = ((contribution[i] / blendSum)) / probehits;
|
||||
blendFactor[i] *= ((contribution[i]) / invBlendSum);
|
||||
blendFactor[i] = saturate(blendFactor[i]);
|
||||
blendFacSum += blendFactor[i];
|
||||
blendFactor[i] = contribution[i]/blendSum; //what % total is this instance
|
||||
blendFactor[i] *= blendFactor[i] / invBlendSum; //what should we add to sum to 1
|
||||
blendFacSum += blendFactor[i]; //running tally of results
|
||||
}
|
||||
|
||||
// Normalize blendVal
|
||||
if (blendFacSum == 0.0f) // Possible with custom weight
|
||||
{
|
||||
blendFacSum = 1.0f;
|
||||
}
|
||||
|
||||
float invBlendSumWeighted = 1.0f / blendFacSum;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
blendFactor[i] *= invBlendSumWeighted;
|
||||
contribution[i] *= blendFactor[i];
|
||||
contribution[i] *= blendFactor[i]/blendFacSum; //normalize
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUGVIZ_ATTENUATION == 1
|
||||
float contribAlpha = 1;
|
||||
float contribAlpha = 0;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
contribAlpha -= contribution[i];
|
||||
contribAlpha += contribution[i];
|
||||
}
|
||||
|
||||
return float4(1 - contribAlpha, 1 - contribAlpha, 1 - contribAlpha, 1);
|
||||
return float4(contribAlpha,contribAlpha,contribAlpha, 1);
|
||||
#endif
|
||||
|
||||
#if DEBUGVIZ_CONTRIB == 1
|
||||
float3 finalContribColor = float3(0, 0, 0);
|
||||
float contribAlpha = 1;
|
||||
for (i = 0; i < numProbes; ++i)
|
||||
{
|
||||
finalContribColor += contribution[i] *probeContribColors[i].rgb;
|
||||
contribAlpha -= contribution[i];
|
||||
finalContribColor += contribution[i] * float3(fmod(i+1,2),fmod(i+1,3),fmod(i+1,4));
|
||||
}
|
||||
|
||||
//Skylight coloration for anything not covered by probes above
|
||||
if(skylightCubemapIdx != -1)
|
||||
finalContribColor += float3(0, 1, 0) * contribAlpha;
|
||||
|
||||
return float4(finalContribColor, 1);
|
||||
#endif
|
||||
}
|
||||
|
|
@ -171,7 +149,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
if (contrib > 0.0f)
|
||||
{
|
||||
int cubemapIdx = probeConfigData[i].a;
|
||||
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refScaleArray[i].xyz, inRefPosArray[i].xyz);
|
||||
float3 dir = boxProject(surface.P, surface.R, worldToObjArray[i], refScaleArray[i].xyz, refPosArray[i].xyz);
|
||||
|
||||
irradiance += TORQUE_TEXCUBEARRAYLOD(irradianceCubemapAR, dir, cubemapIdx, 0).xyz * contrib;
|
||||
specular += TORQUE_TEXCUBEARRAYLOD(specularCubemapAR, dir, cubemapIdx, lod).xyz * contrib;
|
||||
|
|
@ -197,8 +175,7 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
float3 kD = 1.0f - F;
|
||||
kD *= 1.0f - surface.metalness;
|
||||
|
||||
float dfgNdotV = max( surface.NdotV , 0.0009765625f ); //0.5f/512.0f (512 is size of dfg/brdf lookup tex)
|
||||
float2 envBRDF = TORQUE_TEX2DLOD(BRDFTexture, float4(dfgNdotV, surface.roughness,0,0)).rg;
|
||||
float2 envBRDF = TORQUE_TEX2DLOD(BRDFTexture, float4(surface.NdotV, surface.roughness,0,0)).rg;
|
||||
specular *= F * envBRDF.x + surface.f90 * envBRDF.y;
|
||||
irradiance *= kD * surface.baseColor.rgb;
|
||||
|
||||
|
|
@ -210,6 +187,9 @@ float4 main(PFXVertToPix IN) : SV_TARGET
|
|||
float horizonOcclusion = 1.3;
|
||||
float horizon = saturate( 1 + horizonOcclusion * dot(surface.R, surface.N));
|
||||
horizon *= horizon;
|
||||
|
||||
#if CAPTURING == 1
|
||||
return float4(lerp(surface.baseColor.rgb,(irradiance + specular) * horizon,surface.metalness/2),0);
|
||||
#else
|
||||
return float4((irradiance + specular) * horizon, 0);//alpha writes disabled
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ uniform float4x4 worldToLightProj;
|
|||
uniform float4 lightParams;
|
||||
|
||||
uniform float shadowSoftness;
|
||||
uniform float3 eyePosWorld;
|
||||
|
||||
uniform float4x4 cameraToWorld;
|
||||
uniform float4x4 worldToCamera;
|
||||
|
|
@ -147,12 +146,12 @@ float4 main( ConvexConnectP IN ) : SV_TARGET
|
|||
|
||||
#ifdef DETAIL_LIGHTING_VIZ
|
||||
float attenuation = getDistanceAtt(surfaceToLight.Lu, radius);
|
||||
vec3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
float3 factor = lightColor * max(surfaceToLight.NdotL, 0) * shadow * lightIntensity * attenuation;
|
||||
|
||||
vec3 diffuse = BRDF_GetDiffuse(surface,surfaceToLight) * factor;
|
||||
vec3 spec = BRDF_GetSpecular(surface,surfaceToLight) * factor;
|
||||
float3 diffuse = BRDF_GetDiffuse(surface,surfaceToLight) * factor;
|
||||
float3 spec = BRDF_GetSpecular(surface,surfaceToLight) * factor;
|
||||
|
||||
vec3 final = max(vec3(0.0f), diffuse + spec * surface.F) * getSpotAngleAtt(-surfaceToLight.L, lightDirection, lightSpotParams );
|
||||
vec3 final = max(float3(0.0f), diffuse + spec * surface.F) * getSpotAngleAtt(-surfaceToLight.L, lightDirection, lightSpotParams );
|
||||
return final;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ uniform float4 lightColor;
|
|||
uniform float4 lightAmbient;
|
||||
|
||||
uniform float shadowSoftness;
|
||||
uniform float3 eyePosWorld;
|
||||
|
||||
uniform float4 atlasXOffset;
|
||||
uniform float4 atlasYOffset;
|
||||
|
|
|
|||
|
|
@ -642,4 +642,24 @@ function populateAllFonts(%font)
|
|||
populateFontCacheRange(%font,24,0,65535);
|
||||
populateFontCacheRange(%font,32,0,65535);
|
||||
populateFontCacheRange(%font,36,0,65535);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function clientCMDPlaySound(%soundAssetId,%pos)
|
||||
{
|
||||
playSoundAsset(%soundAssetId,%pos);
|
||||
}
|
||||
|
||||
function playSoundAsset(%soundAssetId,%pos)
|
||||
{
|
||||
%assetDef = AssetDatabase.acquireAsset(%soundAssetId);
|
||||
%handle = 0;
|
||||
if(isObject(%assetDef))
|
||||
{
|
||||
%handle = %assetDef.playSound(%pos);
|
||||
if( isObject( ClientMissionCleanup ) )
|
||||
ClientMissionCleanup.add(%handle);
|
||||
}
|
||||
AssetDatabase.releaseAsset(%soundAssetId);
|
||||
return %handle;
|
||||
}
|
||||
|
|
@ -44,6 +44,9 @@ function loadModuleMaterials(%moduleGroup)
|
|||
if(%module.group !$= %moduleGroup)
|
||||
continue;
|
||||
}
|
||||
|
||||
if(%module.ModuleId $= "CoreModule") //the core container module is a special case that has some path complications
|
||||
continue; //so we'll skip it so it doesn't complicate the other core modules' path tests
|
||||
|
||||
%modulePath = %module.ModulePath;
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ function VPathTreeView::DeleteSelectedPaths( %this )
|
|||
function VPathTreeView::CreatePath( %this )
|
||||
{
|
||||
// Create Path Object.
|
||||
EWCreatorWindow.createObject( "ObjectBuilderGui.buildObject( \"VPath\" );" );
|
||||
ObjectCreator.createObject( "ObjectBuilderGui.buildObject( \"VPath\" );" );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ function VPathEditorPlugin::onWorldEditorStartup( %this )
|
|||
//
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
EWCreatorWindow.registerMissionObject( "VPath", "VPath", "", "Level" );
|
||||
ObjectCreator.registerMissionObject( "VPath", "VPath", "", "Level" );
|
||||
}
|
||||
|
||||
//EditorGui.setEditor(\"VPathEditorPlugin\");
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ singleton GuiControlProfile ( VEditorBitmapButtonProfile : VEditorDefaultProfile
|
|||
justify = "center";
|
||||
|
||||
hasBitmapArray = true;
|
||||
bitmap = "./Images/Button";
|
||||
bitmapAsset = "ToolsModule:button_image";
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "VEditorDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
Position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiControl() {
|
||||
|
|
@ -44,7 +44,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -80,7 +80,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new VEditorButton() {
|
||||
|
|
@ -96,7 +96,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
MinExtent = "210 1";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
|
|
@ -122,7 +122,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
};
|
||||
|
|
@ -140,7 +140,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -176,7 +176,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new VTimeLineControl(VerveEditorTrackTimeLine) {
|
||||
|
|
@ -192,7 +192,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
IsController = "0";
|
||||
Controller = "VerveEditorController";
|
||||
|
|
@ -211,7 +211,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
|
|
@ -237,7 +237,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
};
|
||||
|
|
@ -256,7 +256,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiDefaultProfile";
|
||||
tooltipprofile = "ToolsGuiDefaultProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -283,7 +283,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapButtonCtrl(VerveEditorAddGroupButton) {
|
||||
|
|
@ -300,7 +300,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Add New Group";
|
||||
command = "$ThisControl.DisplayContextMenu();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -323,7 +323,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Add New Track";
|
||||
command = "$ThisControl.DisplayContextMenu();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -345,7 +345,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Add New Event";
|
||||
command = "VerveEditor::AddEvent();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -367,7 +367,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Delete Selected Object(s)";
|
||||
command = "VerveEditor::DeleteSelection();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -391,7 +391,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -427,7 +427,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new VTimeLineControl(VerveEditorTimeLine) {
|
||||
|
|
@ -443,7 +443,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
IsController = "1";
|
||||
Controller = "VerveEditorController";
|
||||
|
|
@ -465,7 +465,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -496,7 +496,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
};
|
||||
|
|
@ -513,7 +513,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiDefaultProfile";
|
||||
tooltipprofile = "ToolsGuiDefaultProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -540,7 +540,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
};
|
||||
|
|
@ -557,7 +557,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiDefaultProfile";
|
||||
tooltipprofile = "ToolsGuiDefaultProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -584,7 +584,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiControl() {
|
||||
|
|
@ -600,7 +600,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
|
|
@ -616,7 +616,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Jump Backwards";
|
||||
command = "VerveEditor::Rewind();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -638,7 +638,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Step Backwards 1 Frame";
|
||||
command = "VerveEditor::StepB();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -660,7 +660,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Play / Pause";
|
||||
command = "VerveEditor::TogglePlay( $ThisControl );";
|
||||
hovertime = "1000";
|
||||
|
|
@ -682,7 +682,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Step Forward 1 Frame";
|
||||
command = "VerveEditor::StepF();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -704,7 +704,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Jump Forward";
|
||||
command = "VerveEditor::Forward();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -727,7 +727,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Insert Time (Front)";
|
||||
command = "VerveEditor::InsertTimeFront();";
|
||||
hovertime = "1000";
|
||||
|
|
@ -749,7 +749,7 @@ $guiContent = new GuiControl(VerveEditorGui) {
|
|||
canSave = "1";
|
||||
isDecoy = "0";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Insert Time (Back)";
|
||||
command = "VerveEditor::InsertTimeBack();";
|
||||
hovertime = "1000";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
|
|
@ -9,7 +9,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
Profile = "ToolsGuiWindowProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "center";
|
||||
position = "268 181";
|
||||
|
|
@ -38,7 +38,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "256 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "14 30";
|
||||
|
|
@ -60,7 +60,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
@ -78,7 +78,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
Profile = "ToolsGuiTextEditProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
position = "79 29";
|
||||
|
|
@ -86,13 +86,13 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapBorderCtrl() {
|
||||
isContainer = "0";
|
||||
Profile = "GuiGroupBorderProfile";
|
||||
Profile = "ToolsGuiGroupBorderProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
position = "7 55";
|
||||
|
|
@ -100,7 +100,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "1 1";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
ChangeChildSizeToFit = "1";
|
||||
ChangeChildPosition = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiTransparentProfile";
|
||||
Profile = "ToolsGuiTransparentProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "3 3";
|
||||
|
|
@ -120,13 +120,13 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiControl() {
|
||||
isContainer = "1";
|
||||
Profile = "GuiTransparentProfile";
|
||||
Profile = "ToolsGuiTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
|
|
@ -134,7 +134,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "center";
|
||||
position = "4 1";
|
||||
|
|
@ -156,7 +156,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
@ -181,7 +181,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
internalName = "SceneObjectList";
|
||||
canSaveDynamicFields = "0";
|
||||
|
|
@ -195,7 +195,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
position = "66 139";
|
||||
|
|
@ -204,7 +204,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VerveEditorGroupBuilderGUI._Build( VerveEditorGroupBuilderNameField.getText() );";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
@ -214,7 +214,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
position = "174 139";
|
||||
|
|
@ -223,7 +223,7 @@ $guiContent = new GuiControl(VerveEditorGroupBuilderGUI) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VerveEditorGroupBuilderGUI.Close();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
@ -283,7 +283,7 @@ function VerveEditorGroupBuilderGUI::_Build( %this, %groupLabel )
|
|||
{
|
||||
if ( %groupLabel $= "" )
|
||||
{
|
||||
toolsMessageBox( "Warning", "You must provide a Valid Group Label.", "Ok" );
|
||||
MessageBox( "Warning", "You must provide a Valid Group Label.", "Ok" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ function VerveEditorGroupBuilderFieldStack::CreateObjectList( %this, %objectType
|
|||
{
|
||||
%container = new GuiControl()
|
||||
{
|
||||
Profile = "GuiTransparentProfile";
|
||||
Profile = "ToolsGuiTransparentProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
|
|
@ -326,7 +326,7 @@ function VerveEditorGroupBuilderFieldStack::CreateObjectList( %this, %objectType
|
|||
|
||||
%label = new GuiTextCtrl()
|
||||
{
|
||||
Profile = "GuiTextProfile";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "center";
|
||||
|
|
@ -392,7 +392,7 @@ function VerveEditorGroupBuilderFieldStack::CreateCheckbox( %this, %internalName
|
|||
{
|
||||
%container = new GuiControl()
|
||||
{
|
||||
Profile = "GuiTransparentProfile";
|
||||
Profile = "ToolsGuiTransparentProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
|
|
@ -402,7 +402,7 @@ function VerveEditorGroupBuilderFieldStack::CreateCheckbox( %this, %internalName
|
|||
|
||||
%label = new GuiTextCtrl()
|
||||
{
|
||||
Profile = "GuiTextProfile";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
|
||||
HorizSizing = "right";
|
||||
VertSizing = "center";
|
||||
|
|
@ -415,7 +415,7 @@ function VerveEditorGroupBuilderFieldStack::CreateCheckbox( %this, %internalName
|
|||
|
||||
%checkBox = new GuiCheckBoxCtrl()
|
||||
{
|
||||
Profile = "GuiCheckboxProfile";
|
||||
Profile = "ToolsGuiCheckboxProfile";
|
||||
|
||||
HorizSizing = "left";
|
||||
VertSizing = "center";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "0 0";
|
||||
|
|
@ -9,7 +9,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
Profile = "ToolsGuiWindowProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "center";
|
||||
Position = "268 181";
|
||||
|
|
@ -38,7 +38,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
MinExtent = "256 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "14 30";
|
||||
|
|
@ -60,7 +60,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
@ -78,7 +78,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
Profile = "ToolsGuiTextEditProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "79 29";
|
||||
|
|
@ -86,7 +86,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
@ -96,7 +96,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
Position = "66 62";
|
||||
|
|
@ -105,7 +105,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VMotionTrack::_ImportPathNodes( VerveEditorImportPathNodesSpeed.getText() );";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
@ -115,7 +115,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
Position = "174 62";
|
||||
|
|
@ -124,7 +124,7 @@ $guiContent = new GuiControl(VerveEditorImportPathNodesGUI) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VerveEditorWindow.popDialog( VerveEditorImportPathNodesGUI );";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
$guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
|
|
@ -10,13 +10,13 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
Profile = "ToolsGuiWindowProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "center";
|
||||
position = "392 253";
|
||||
|
|
@ -24,7 +24,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Docking = "None";
|
||||
Margin = "4 24 4 4";
|
||||
|
|
@ -50,7 +50,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "10 93";
|
||||
|
|
@ -58,13 +58,13 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapBorderCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiBitmapBorderProfile";
|
||||
Profile = "ToolsGuiBitmapBorderProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 10";
|
||||
|
|
@ -72,7 +72,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
|
|
@ -87,7 +87,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -101,7 +101,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiTextCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "30 50";
|
||||
|
|
@ -109,7 +109,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -123,7 +123,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiCheckBoxCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiCheckBoxProfile";
|
||||
Profile = "ToolsGuiCheckBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "6 30";
|
||||
|
|
@ -132,7 +132,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::Event::SnapToTime";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = " Snap to Time";
|
||||
groupNum = "-1";
|
||||
|
|
@ -143,7 +143,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiTextEditCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
Profile = "ToolsGuiTextEditProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "150 50";
|
||||
|
|
@ -152,7 +152,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::Event::SnapToTimeThreshold";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -170,7 +170,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiCheckBoxCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiCheckBoxProfile";
|
||||
Profile = "ToolsGuiCheckBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "6 80";
|
||||
|
|
@ -179,7 +179,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::Event::SnapToSiblings";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = " Snap to Siblings";
|
||||
groupNum = "-1";
|
||||
|
|
@ -190,7 +190,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiTextCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "30 100";
|
||||
|
|
@ -198,7 +198,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -212,7 +212,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiTextEditCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
Profile = "ToolsGuiTextEditProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "150 100";
|
||||
|
|
@ -221,7 +221,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::Event::SnapToSiblingThreshold";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -240,7 +240,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiControl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiDefaultProfile";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "10 30";
|
||||
|
|
@ -248,13 +248,13 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiBitmapBorderCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiBitmapBorderProfile";
|
||||
Profile = "ToolsGuiBitmapBorderProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 10";
|
||||
|
|
@ -262,7 +262,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
|
|
@ -277,7 +277,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -291,7 +291,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiTextEditCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextEditProfile";
|
||||
Profile = "ToolsGuiTextEditProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "6 30";
|
||||
|
|
@ -300,7 +300,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "$Pref::VerveEditor::RecentFileSize";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -318,7 +318,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiTextCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiTextProfile";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "56 30";
|
||||
|
|
@ -326,7 +326,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -341,7 +341,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
new GuiButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "151 228";
|
||||
|
|
@ -350,7 +350,7 @@ $guiContent = new GuiControl(VerveEditorPreferenceGui) {
|
|||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "VerveEditor::CloseEditorPreferences();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
text = "OK";
|
||||
groupNum = "-1";
|
||||
|
|
|
|||
|
|
@ -103,13 +103,13 @@ function VController::DisplayContextMenu( %this, %x, %y )
|
|||
|
||||
Item[1] = "" TAB "";
|
||||
|
||||
Item[2] = "Cu&t" TAB "" TAB "";
|
||||
Item[3] = "&Copy" TAB "" TAB "";
|
||||
Item[4] = "&Paste" TAB "" TAB "VerveEditor::Paste();";
|
||||
Item[2] = "Cut" TAB "" TAB "";
|
||||
Item[3] = "Copy" TAB "" TAB "";
|
||||
Item[4] = "Paste" TAB "" TAB "VerveEditor::Paste();";
|
||||
|
||||
Item[5] = "" TAB "";
|
||||
|
||||
Item[6] = "&Delete" TAB "" TAB "";
|
||||
Item[6] = "Delete" TAB "" TAB "";
|
||||
|
||||
PasteIndex = 4;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ function VerveEditorWindow::onCreateMenu( %this )
|
|||
// Store Menu Bars.
|
||||
if ( !isObject( %this.MenuSet ) )
|
||||
{
|
||||
%this.MenuSet = new SimSet();
|
||||
%this.MenuSet = new GuiMenuBar();
|
||||
}
|
||||
|
||||
// CMD Key.
|
||||
|
|
@ -103,14 +103,14 @@ function VerveEditorWindow::onCreateMenu( %this )
|
|||
{
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
Label = "&File";
|
||||
Label = "File";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "&New" TAB %cmdKey @ "+N" TAB "VerveEditor::NewFile();";
|
||||
Item[1] = "&Open" TAB %cmdKey @ "+O" TAB "VerveEditor::LoadFile();";
|
||||
Item[0] = "New" TAB %cmdKey @ "+N" TAB "VerveEditor::NewFile();";
|
||||
Item[1] = "Open" TAB %cmdKey @ "+O" TAB "VerveEditor::LoadFile();";
|
||||
Item[2] = "" TAB "";
|
||||
Item[3] = "&Save" TAB %cmdKey @ "+S" TAB "VerveEditor::SaveFile();";
|
||||
Item[4] = "Save &As" TAB %cmdKey @ "-Shift+S" TAB "VerveEditor::SaveFile( true );";
|
||||
Item[3] = "Save" TAB %cmdKey @ "+S" TAB "VerveEditor::SaveFile();";
|
||||
Item[4] = "Save As" TAB %cmdKey @ "-Shift+S" TAB "VerveEditor::SaveFile( true );";
|
||||
Item[5] = "" TAB "";
|
||||
Item[6] = "Recent Files" TAB %recentSequenceMenu;
|
||||
};
|
||||
|
|
@ -133,34 +133,38 @@ function VerveEditorWindow::onCreateMenu( %this )
|
|||
Class = "VerveWindowEditMenu";
|
||||
SuperClass = "VerveWindowMenu";
|
||||
|
||||
Label = "&Edit";
|
||||
Label = "Edit";
|
||||
Position = 1;
|
||||
|
||||
Item[0] = "&Undo" TAB %cmdKey @ "+Z" TAB "VerveEditor::Undo();";
|
||||
Item[1] = "&Redo" TAB %cmdKey @ "+Y" TAB "VerveEditor::Redo();";
|
||||
Item[0] = "Undo" TAB %cmdKey @ "+Z" TAB "VerveEditor::Undo();";
|
||||
Item[1] = "Redo" TAB %cmdKey @ "+Y" TAB "VerveEditor::Redo();";
|
||||
Item[2] = "" TAB "";
|
||||
Item[3] = "Cu&t" TAB %cmdKey @ "+X" TAB "VerveEditor::CutSelection();" TAB VerveEditorEditMap;
|
||||
Item[4] = "&Copy" TAB %cmdKey @ "+C" TAB "VerveEditor::CopySelection();" TAB VerveEditorEditMap;
|
||||
Item[5] = "&Paste" TAB %cmdKey @ "+V" TAB "VerveEditor::Paste();" TAB VerveEditorEditMap;
|
||||
Item[3] = "Cut" TAB %cmdKey @ "+X" TAB "VerveEditor::CutSelection();" TAB VerveEditorEditMap;
|
||||
Item[4] = "Copy" TAB %cmdKey @ "+C" TAB "VerveEditor::CopySelection();" TAB VerveEditorEditMap;
|
||||
Item[5] = "Paste" TAB %cmdKey @ "+V" TAB "VerveEditor::Paste();" TAB VerveEditorEditMap;
|
||||
|
||||
Item[6] = "" TAB "";
|
||||
Item[7] = "&Delete" TAB "Del" TAB "VerveEditor::DeleteSelection();" TAB VerveEditorEditMap;
|
||||
Item[7] = "Delete" TAB "Del" TAB "VerveEditor::DeleteSelection();" TAB VerveEditorEditMap;
|
||||
|
||||
Item[8] = "" TAB "";
|
||||
Item[9] = "&Clear Selection" TAB "Esc" TAB "VerveEditor::ClearSelection();";
|
||||
Item[9] = "Clear Selection" TAB "Esc" TAB "VerveEditor::ClearSelection();";
|
||||
|
||||
Item[10] = "" TAB "";
|
||||
Item[11] = "&Preferences" TAB %cmdKey @ "+P" TAB "VerveEditor::LaunchEditorPreferences();";
|
||||
Item[11] = "Preferences" TAB %cmdKey @ "+P" TAB "VerveEditor::LaunchEditorPreferences();";
|
||||
};
|
||||
%this.MenuSet.add( %editMenu );
|
||||
|
||||
// Init Popups.
|
||||
%fileMenu.Init();
|
||||
%editMenu.Init();
|
||||
//%fileMenu.Init();
|
||||
//%editMenu.Init();
|
||||
|
||||
// Attach.
|
||||
%fileMenu.attachToMenuBar( %this, %fileMenu.Position, %fileMenu.Label );
|
||||
%editMenu.attachToMenuBar( %this, %editMenu.Position, %editMenu.Label );
|
||||
if($Verve::UseSeparateWindow)
|
||||
{
|
||||
%this.setMenuBar(%this.MenuSet);
|
||||
//%fileMenu.attachToMenuBar( %this, %fileMenu.Position, %fileMenu.Label );
|
||||
//%editMenu.attachToMenuBar( %this, %editMenu.Position, %editMenu.Label );
|
||||
}
|
||||
}
|
||||
|
||||
function VerveEditorWindow::ClearMenu( %this )
|
||||
|
|
|
|||
|
|
@ -50,8 +50,9 @@ function VerveEditorWindow::Open()
|
|||
{
|
||||
%editorWindow = new guiWindowCtrl(VerveEditorWindow)
|
||||
{
|
||||
Profile = "ToolsGuiWindowProfile";
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
extent = "1024 788";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
|
|
@ -62,20 +63,23 @@ function VerveEditorWindow::Open()
|
|||
|
||||
function VerveEditorWindow::UpdateWindowTitle( %this )
|
||||
{
|
||||
%fileName = fileName( $VerveEditor::Controller.FileName );
|
||||
if ( %fileName $= "" )
|
||||
{
|
||||
%fileName = "Untitled.vsf";
|
||||
}
|
||||
%fileName = fileName( $VerveEditor::Controller.FileName );
|
||||
if ( %fileName $= "" )
|
||||
{
|
||||
%fileName = "Untitled.vsf";
|
||||
}
|
||||
|
||||
if ( VerveEditor::IsDirty() )
|
||||
{
|
||||
// Signify Unsaved Work.
|
||||
%fileName = %fileName @ "*";
|
||||
}
|
||||
|
||||
if ( VerveEditor::IsDirty() )
|
||||
{
|
||||
// Signify Unsaved Work.
|
||||
%fileName = %fileName @ "*";
|
||||
}
|
||||
|
||||
// Set Title.
|
||||
%this.setWindowTitle( %fileName SPC "- Verve" );
|
||||
// Set Title.
|
||||
if($Verve::UseSeparateWindow)
|
||||
%this.setWindowTitle( %fileName SPC "- Verve" );
|
||||
else
|
||||
%this.text = %fileName SPC "- Verve";
|
||||
}
|
||||
|
||||
function VerveEditorWindow::onGainFocus( %this )
|
||||
|
|
|
|||
|
|
@ -188,13 +188,13 @@ function VGroup::DisplayContextMenu( %this, %x, %y )
|
|||
|
||||
Item[1] = "" TAB "";
|
||||
|
||||
Item[2] = "Cu&t" TAB "" TAB "VerveEditor::CutSelection();";
|
||||
Item[3] = "&Copy" TAB "" TAB "VerveEditor::CopySelection();";
|
||||
Item[4] = "&Paste" TAB "" TAB "VerveEditor::Paste();";
|
||||
Item[2] = "Cut" TAB "" TAB "VerveEditor::CutSelection();";
|
||||
Item[3] = "Copy" TAB "" TAB "VerveEditor::CopySelection();";
|
||||
Item[4] = "Paste" TAB "" TAB "VerveEditor::Paste();";
|
||||
|
||||
Item[5] = "" TAB "";
|
||||
|
||||
Item[6] = "&Delete" TAB "" TAB "VerveEditor::DeleteSelection();";
|
||||
Item[6] = "Delete" TAB "" TAB "VerveEditor::DeleteSelection();";
|
||||
|
||||
AddIndex = 0;
|
||||
PasteIndex = 4;
|
||||
|
|
@ -283,7 +283,7 @@ function VerveEditor::CreateGroupControl( %object )
|
|||
Class = "VEditorSelectableGroup";
|
||||
Profile = "VEditorGroupHeaderProfile";
|
||||
|
||||
Bitmap = "~/VerveEditor/GUI/Images/GroupBackground";
|
||||
bitmapAsset = "ToolsModule:GroupBackground_image";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
|
|
@ -322,7 +322,7 @@ function VerveEditor::CreateGroupControl( %object )
|
|||
Class = "VEditorSelectableGroup";
|
||||
Profile = "VEditorGroupTrackProfile";
|
||||
|
||||
Bitmap = "~/VerveEditor/GUI/Images/GroupBackground";
|
||||
bitmapAsset = "ToolsModule:GroupBackground_image";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ function VerveEditorPropertyStack::CreatePropertyRollout( %this, %groupLabel )
|
|||
%propertyStack = new GuiStackControl()
|
||||
{
|
||||
Class = "VEditorPropertyStack";
|
||||
Profile = "GuiTransparentProfile";
|
||||
Profile = "ToolsGuiTransparentProfile";
|
||||
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
|
|
@ -123,7 +123,7 @@ function VerveEditor::CreateField( %targetStack, %fieldName, %fieldType )
|
|||
if ( isMethod( "VerveEditor", "Create" @ %fieldType @ "Field" ) )
|
||||
{
|
||||
// Create the Input Control.
|
||||
%fieldInput = eval( "return VerveEditor::Create" @ %fieldType @ "Field( %fieldContainer, %fieldName );" );
|
||||
%fieldInput = eval( "return VerveEditor::Create" @ %fieldType @ "Field(" @ %fieldContainer @ "," @ %fieldName @ ");" );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function VerveEditor::CreateDataField( %fieldContainer, %fieldName )
|
|||
Position = %fieldWidth - 24 SPC 0;
|
||||
Extent = "18 18";
|
||||
|
||||
Bitmap = "tools/VerveEditor/GUI/Images/btn_DeleteSml";
|
||||
bitmapAsset = "ToolsModule:btn_DeleteSml_image";
|
||||
|
||||
Command = %fieldInput @ ".Remove();";
|
||||
};
|
||||
|
|
@ -274,7 +274,7 @@ function VerveEditor::CreateAddDataField( %targetStack )
|
|||
Position = %fieldWidth - 24 SPC 0;
|
||||
Extent = "18 18";
|
||||
|
||||
Bitmap = "tools/VerveEditor/GUI/Images/btn_AddSml";
|
||||
bitmapAsset = "ToolsModule:btn_AddSml_image";
|
||||
|
||||
Command = "VEditorDataPropertyField::Insert(" @ %fieldType @ ".getText(), " @ %fieldName @ ".getText(), " @ %fieldValue @ ".getText() );";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@ function VEditorSelectable::OnRightMouseUp( %this, %position, %modifiers, %click
|
|||
VerveEditor::SetSelection( %this );
|
||||
|
||||
// Repaint.
|
||||
VerveEditorWindow.Repaint();
|
||||
if($Verve::UseSeparateWindow)
|
||||
VerveEditorWindow.Repaint();
|
||||
|
||||
if ( %this.Proxy.isMethod( "DisplayContextMenu" ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -105,21 +105,21 @@ function VMotionTrack::GetContextMenu( %this )
|
|||
Label = "VTrackContextMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "&Add Event" TAB "" TAB "VEditorSelectableTrack::AddEvent();";
|
||||
Item[0] = "Add Event" TAB "" TAB "VEditorSelectableTrack::AddEvent();";
|
||||
|
||||
Item[1] = "" TAB "";
|
||||
|
||||
Item[2] = "&Import Path Nodes" TAB "" TAB "VMotionTrack::ImportPathNodes();";
|
||||
Item[2] = "Import Path Nodes" TAB "" TAB "VMotionTrack::ImportPathNodes();";
|
||||
|
||||
Item[3] = "" TAB "";
|
||||
|
||||
Item[4] = "Cu&t" TAB "" TAB "VerveEditor::CutSelection();";
|
||||
Item[5] = "&Copy" TAB "" TAB "VerveEditor::CopySelection();";
|
||||
Item[6] = "&Paste" TAB "" TAB "VEditorSelectableTrack::PasteEvent();";
|
||||
Item[4] = "Cut" TAB "" TAB "VerveEditor::CutSelection();";
|
||||
Item[5] = "Copy" TAB "" TAB "VerveEditor::CopySelection();";
|
||||
Item[6] = "Paste" TAB "" TAB "VEditorSelectableTrack::PasteEvent();";
|
||||
|
||||
Item[7] = "" TAB "";
|
||||
|
||||
Item[8] = "&Delete" TAB "" TAB "VerveEditor::DeleteSelection();";
|
||||
Item[8] = "Delete" TAB "" TAB "VerveEditor::DeleteSelection();";
|
||||
|
||||
AddIndex = 0;
|
||||
PasteIndex = 4;
|
||||
|
|
|
|||
|
|
@ -175,17 +175,17 @@ function VTrack::GetContextMenu( %this )
|
|||
Label = "VTrackContextMenu";
|
||||
Position = 0;
|
||||
|
||||
Item[0] = "&Add Event" TAB "" TAB "VEditorSelectableTrack::AddEvent();";
|
||||
Item[0] = "Add Event" TAB "" TAB "VEditorSelectableTrack::AddEvent();";
|
||||
|
||||
Item[1] = "" TAB "";
|
||||
|
||||
Item[2] = "Cu&t" TAB "" TAB "VerveEditor::CutSelection();";
|
||||
Item[3] = "&Copy" TAB "" TAB "VerveEditor::CopySelection();";
|
||||
Item[4] = "&Paste" TAB "" TAB "VEditorSelectableTrack::PasteEvent();";
|
||||
Item[2] = "Cut" TAB "" TAB "VerveEditor::CutSelection();";
|
||||
Item[3] = "Copy" TAB "" TAB "VerveEditor::CopySelection();";
|
||||
Item[4] = "Paste" TAB "" TAB "VEditorSelectableTrack::PasteEvent();";
|
||||
|
||||
Item[5] = "" TAB "";
|
||||
|
||||
Item[6] = "&Delete" TAB "" TAB "VerveEditor::DeleteSelection();";
|
||||
Item[6] = "Delete" TAB "" TAB "VerveEditor::DeleteSelection();";
|
||||
|
||||
AddIndex = 0;
|
||||
PasteIndex = 4;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
function InitializeVerveEditor()
|
||||
{
|
||||
$Verve::UseSeparateWindow = true;
|
||||
$Verve::UseSeparateWindow = ($pref::Video::deviceMode == 0); //can't do separate window atm if you're in fullscreen or borderless full
|
||||
|
||||
// Preferences.
|
||||
exec( "./DefaultPrefs." @ $TorqueScriptFileExtension );
|
||||
|
|
@ -59,7 +59,7 @@ function DestroyVerveEditor()
|
|||
|
||||
function ToggleVerveEditor( %value )
|
||||
{
|
||||
if ( %value && $Verve::UseSeparateWindow )
|
||||
if ( %value)
|
||||
{
|
||||
if ( !isObject( VerveEditorWindow ) )
|
||||
{
|
||||
|
|
@ -97,7 +97,6 @@ function VerveEditor::LaunchEditor()
|
|||
VerveEditor::ClearHistory();
|
||||
|
||||
// Update Window Title.
|
||||
if($Verve::UseSeparateWindow)
|
||||
VerveEditorWindow.UpdateWindowTitle();
|
||||
|
||||
// Update Selection.
|
||||
|
|
|
|||
|
|
@ -1,451 +1,243 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone ="yes"?>
|
||||
<AssetImportSettings>
|
||||
<Group
|
||||
name="DefaultImportConfig">
|
||||
<Group
|
||||
name="Animations">
|
||||
<Setting
|
||||
name="animFPS">2</Setting>
|
||||
<Setting
|
||||
name="animTiming">Seconds</Setting>
|
||||
<Setting
|
||||
name="ImportAnimations">1</Setting>
|
||||
<Setting
|
||||
name="SeparateAnimations">1</Setting>
|
||||
<Group name="DefaultImportConfig">
|
||||
<Group name="Animations">
|
||||
<Setting name="animFPS">2</Setting>
|
||||
<Setting name="animTiming">Seconds</Setting>
|
||||
<Setting name="ImportAnimations">1</Setting>
|
||||
<Setting name="SeparateAnimations">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Collision">
|
||||
<Setting
|
||||
name="CollisionMeshPrefix">Col</Setting>
|
||||
<Setting
|
||||
name="GenCollisionType">CollisionMesh</Setting>
|
||||
<Setting
|
||||
name="GenerateCollisions">1</Setting>
|
||||
<Setting
|
||||
name="GenerateLOSCollisions">1</Setting>
|
||||
<Setting
|
||||
name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||
<Setting
|
||||
name="LOSCollisionMeshPrefix">LOS</Setting>
|
||||
<Group name="Collision">
|
||||
<Setting name="CollisionMeshPrefix">Col</Setting>
|
||||
<Setting name="GenCollisionType">CollisionMesh</Setting>
|
||||
<Setting name="GenerateCollisions">1</Setting>
|
||||
<Setting name="GenerateLOSCollisions">1</Setting>
|
||||
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="General">
|
||||
<Setting
|
||||
name="AutomaticallyPromptMissingFiles">0</Setting>
|
||||
<Setting
|
||||
name="DuplicatAutoResolution">AutoPrune</Setting>
|
||||
<Setting
|
||||
name="PreventImportWithErrors">1</Setting>
|
||||
<Setting
|
||||
name="WarningsAsErrors">0</Setting>
|
||||
<Setting
|
||||
name="AddDirectoryPrefixToAssetName">0</Setting>
|
||||
<Group name="General">
|
||||
<Setting name="AddDirectoryPrefixToAssetName">0</Setting>
|
||||
<Setting name="AutomaticallyPromptMissingFiles">0</Setting>
|
||||
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
|
||||
<Setting name="DuplicateAutoResolution">AutoPrune</Setting>
|
||||
<Setting name="PreventImportWithErrors">1</Setting>
|
||||
<Setting name="WarningsAsErrors">0</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Images">
|
||||
<Setting
|
||||
name="AddedImageSuffix">_image</Setting>
|
||||
<Setting
|
||||
name="AlwaysAddImageSuffix">1</Setting>
|
||||
<Setting
|
||||
name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
||||
<Setting
|
||||
name="CompositeTypeSuffixes">_COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM</Setting>
|
||||
<Setting
|
||||
name="Compressed">1</Setting>
|
||||
<Setting
|
||||
name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
|
||||
<Setting
|
||||
name="GenerateMaterialOnImport">0</Setting>
|
||||
<Setting
|
||||
name="ImageType">N/A</Setting>
|
||||
<Setting
|
||||
name="ImportImages">1</Setting>
|
||||
<Setting
|
||||
name="IsHDR">0</Setting>
|
||||
<Setting
|
||||
name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
||||
<Setting
|
||||
name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
||||
<Setting
|
||||
name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
||||
<Setting
|
||||
name="Scaling">1.0</Setting>
|
||||
<Setting
|
||||
name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
||||
<Setting
|
||||
name="TextureFilteringMode">Bilinear</Setting>
|
||||
<Setting
|
||||
name="UseMips">1</Setting>
|
||||
<Group name="Images">
|
||||
<Setting name="AddedImageSuffix">_image</Setting>
|
||||
<Setting name="AlwaysAddImageSuffix">1</Setting>
|
||||
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
||||
<Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM,_C</Setting>
|
||||
<Setting name="Compressed">1</Setting>
|
||||
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
|
||||
<Setting name="GenerateMaterialOnImport">0</Setting>
|
||||
<Setting name="ImageType">N/A</Setting>
|
||||
<Setting name="ImportImages">1</Setting>
|
||||
<Setting name="IsHDR">0</Setting>
|
||||
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC,_M</Setting>
|
||||
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM,_N</Setting>
|
||||
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS,_R</Setting>
|
||||
<Setting name="Scaling">1.0</Setting>
|
||||
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS,_S</Setting>
|
||||
<Setting name="TextureFilteringMode">Bilinear</Setting>
|
||||
<Setting name="UseMips">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Materials">
|
||||
<Setting
|
||||
name="AddedMaterialSuffix">_mat</Setting>
|
||||
<Setting
|
||||
name="AlwaysAddMaterialSuffix">0</Setting>
|
||||
<Setting
|
||||
name="CreateComposites">1</Setting>
|
||||
<Setting
|
||||
name="ImportMaterials">1</Setting>
|
||||
<Setting
|
||||
name="PopulateMaterialMaps">1</Setting>
|
||||
<Setting
|
||||
name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||
<Setting
|
||||
name="UseExistingMaterials">1</Setting>
|
||||
<Group name="Materials">
|
||||
<Setting name="AddedMaterialSuffix">_mat</Setting>
|
||||
<Setting name="AlwaysAddMaterialSuffix">0</Setting>
|
||||
<Setting name="CreateComposites">1</Setting>
|
||||
<Setting name="CreateORMConfig">1</Setting>
|
||||
<Setting name="IgnoreMaterials">DefaultMaterial,ColorEffect*</Setting>
|
||||
<Setting name="ImportMaterials">1</Setting>
|
||||
<Setting name="PopulateMaterialMaps">1</Setting>
|
||||
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||
<Setting name="UseExistingMaterials">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Meshes">
|
||||
<Setting
|
||||
name="AddedShapeSuffix">_shape</Setting>
|
||||
<Setting
|
||||
name="AdjustCenter">0</Setting>
|
||||
<Setting
|
||||
name="AdjustFloor">0</Setting>
|
||||
<Setting
|
||||
name="AlwaysAddShapeSuffix">0</Setting>
|
||||
<Setting
|
||||
name="calcTangentSpace">0</Setting>
|
||||
<Setting
|
||||
name="CollapseSubmeshes">0</Setting>
|
||||
<Setting
|
||||
name="convertLeftHanded">0</Setting>
|
||||
<Setting
|
||||
name="DoScaleOverride">0</Setting>
|
||||
<Setting
|
||||
name="DoUpAxisOverride">0</Setting>
|
||||
<Setting
|
||||
name="findInstances">0</Setting>
|
||||
<Setting
|
||||
name="flipUVCoords">0</Setting>
|
||||
<Setting
|
||||
name="genUVCoords">0</Setting>
|
||||
<Setting
|
||||
name="IgnoreNodeScale">0</Setting>
|
||||
<Setting
|
||||
name="ImportMesh">1</Setting>
|
||||
<Setting
|
||||
name="invertNormals">0</Setting>
|
||||
<Setting
|
||||
name="JoinIdenticalVerts">0</Setting>
|
||||
<Setting
|
||||
name="limitBoneWeights">0</Setting>
|
||||
<Setting
|
||||
name="LODType">TrailingNumber</Setting>
|
||||
<Setting
|
||||
name="removeRedundantMats">0</Setting>
|
||||
<Setting
|
||||
name="reverseWindingOrder">0</Setting>
|
||||
<Setting
|
||||
name="ScaleOverride">1</Setting>
|
||||
<Setting
|
||||
name="TransformUVs">0</Setting>
|
||||
<Setting
|
||||
name="UpAxisOverride">Z_AXIS</Setting>
|
||||
<Group name="Meshes">
|
||||
<Setting name="AddedShapeSuffix">_shape</Setting>
|
||||
<Setting name="AdjustCenter">0</Setting>
|
||||
<Setting name="AdjustFloor">0</Setting>
|
||||
<Setting name="AlwaysAddShapeSuffix">0</Setting>
|
||||
<Setting name="calcTangentSpace">0</Setting>
|
||||
<Setting name="CollapseSubmeshes">0</Setting>
|
||||
<Setting name="convertLeftHanded">0</Setting>
|
||||
<Setting name="DoScaleOverride">0</Setting>
|
||||
<Setting name="DoUpAxisOverride">0</Setting>
|
||||
<Setting name="findInstances">0</Setting>
|
||||
<Setting name="flipUVCoords">0</Setting>
|
||||
<Setting name="genUVCoords">0</Setting>
|
||||
<Setting name="IgnoreNodeScale">0</Setting>
|
||||
<Setting name="ImportMesh">1</Setting>
|
||||
<Setting name="invertNormals">0</Setting>
|
||||
<Setting name="JoinIdenticalVerts">0</Setting>
|
||||
<Setting name="limitBoneWeights">0</Setting>
|
||||
<Setting name="LODType">TrailingNumber</Setting>
|
||||
<Setting name="removeRedundantMats">0</Setting>
|
||||
<Setting name="reverseWindingOrder">0</Setting>
|
||||
<Setting name="ScaleOverride">1</Setting>
|
||||
<Setting name="TransformUVs">0</Setting>
|
||||
<Setting name="UpAxisOverride">Z_AXIS</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Sounds">
|
||||
<Setting
|
||||
name="Compressed">0</Setting>
|
||||
<Setting
|
||||
name="PitchAdjust">1.0</Setting>
|
||||
<Setting
|
||||
name="VolumeAdjust">1.0</Setting>
|
||||
<Group name="Sounds">
|
||||
<Setting name="Compressed">0</Setting>
|
||||
<Setting name="PitchAdjust">1.0</Setting>
|
||||
<Setting name="VolumeAdjust">1.0</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group
|
||||
name="LegacyProjectImport">
|
||||
<Group
|
||||
name="Animations">
|
||||
<Setting
|
||||
name="animFPS">2</Setting>
|
||||
<Setting
|
||||
name="animTiming">Seconds</Setting>
|
||||
<Setting
|
||||
name="ImportAnimations">1</Setting>
|
||||
<Setting
|
||||
name="SeparateAnimations">1</Setting>
|
||||
<Group name="LegacyProjectImport">
|
||||
<Group name="Animations">
|
||||
<Setting name="animFPS">2</Setting>
|
||||
<Setting name="animTiming">Seconds</Setting>
|
||||
<Setting name="ImportAnimations">1</Setting>
|
||||
<Setting name="SeparateAnimations">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Collision">
|
||||
<Setting
|
||||
name="CollisionMeshPrefix">Col</Setting>
|
||||
<Setting
|
||||
name="GenCollisionType">CollisionMesh</Setting>
|
||||
<Setting
|
||||
name="GenerateCollisions">1</Setting>
|
||||
<Setting
|
||||
name="GenerateLOSCollisions">1</Setting>
|
||||
<Setting
|
||||
name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||
<Setting
|
||||
name="LOSCollisionMeshPrefix">LOS</Setting>
|
||||
<Group name="Collision">
|
||||
<Setting name="CollisionMeshPrefix">Col</Setting>
|
||||
<Setting name="GenCollisionType">CollisionMesh</Setting>
|
||||
<Setting name="GenerateCollisions">1</Setting>
|
||||
<Setting name="GenerateLOSCollisions">1</Setting>
|
||||
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="General">
|
||||
<Setting
|
||||
name="AutomaticallyPromptMissingFiles">0</Setting>
|
||||
<Setting
|
||||
name="DuplicateAutoResolution">FolderPrefix</Setting>
|
||||
<Setting
|
||||
name="PreventImportWithErrors">1</Setting>
|
||||
<Setting
|
||||
name="WarningsAsErrors">0</Setting>
|
||||
<Setting
|
||||
name="AddDirectoryPrefixToAssetName">1</Setting>
|
||||
<Group name="General">
|
||||
<Setting name="AddDirectoryPrefixToAssetName">0</Setting>
|
||||
<Setting name="AutomaticallyPromptMissingFiles">0</Setting>
|
||||
<Setting name="DuplicateAutoResolution">FolderPrefix</Setting>
|
||||
<Setting name="PreventImportWithErrors">1</Setting>
|
||||
<Setting name="WarningsAsErrors">0</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Images">
|
||||
<Setting
|
||||
name="AddedImageSuffix">_image</Setting>
|
||||
<Setting
|
||||
name="AlwaysAddImageSuffix">1</Setting>
|
||||
<Setting
|
||||
name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
||||
<Setting
|
||||
name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
|
||||
<Setting
|
||||
name="Compressed">1</Setting>
|
||||
<Setting
|
||||
name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
|
||||
<Setting
|
||||
name="GenerateMaterialOnImport">0</Setting>
|
||||
<Setting
|
||||
name="ImageType">N/A</Setting>
|
||||
<Setting
|
||||
name="ImportImages">1</Setting>
|
||||
<Setting
|
||||
name="IsHDR">0</Setting>
|
||||
<Setting
|
||||
name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
||||
<Setting
|
||||
name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
||||
<Setting
|
||||
name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
||||
<Setting
|
||||
name="Scaling">1.0</Setting>
|
||||
<Setting
|
||||
name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
||||
<Setting
|
||||
name="TextureFilteringMode">Bilinear</Setting>
|
||||
<Setting
|
||||
name="UseMips">1</Setting>
|
||||
<Group name="Images">
|
||||
<Setting name="AddedImageSuffix">_image</Setting>
|
||||
<Setting name="AlwaysAddImageSuffix">1</Setting>
|
||||
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
||||
<Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
|
||||
<Setting name="Compressed">1</Setting>
|
||||
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
|
||||
<Setting name="GenerateMaterialOnImport">0</Setting>
|
||||
<Setting name="ImageType">N/A</Setting>
|
||||
<Setting name="ImportImages">1</Setting>
|
||||
<Setting name="IsHDR">0</Setting>
|
||||
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
||||
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
||||
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
||||
<Setting name="Scaling">1.0</Setting>
|
||||
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
||||
<Setting name="TextureFilteringMode">Bilinear</Setting>
|
||||
<Setting name="UseMips">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Materials">
|
||||
<Setting
|
||||
name="AddedMaterialSuffix">_mat</Setting>
|
||||
<Setting
|
||||
name="AlwaysAddMaterialSuffix">1</Setting>
|
||||
<Setting
|
||||
name="CreateComposites">1</Setting>
|
||||
<Setting
|
||||
name="ImportMaterials">1</Setting>
|
||||
<Setting
|
||||
name="PopulateMaterialMaps">1</Setting>
|
||||
<Setting
|
||||
name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||
<Setting
|
||||
name="UseExistingMaterials">1</Setting>
|
||||
<Group name="Materials">
|
||||
<Setting name="AddedMaterialSuffix">_mat</Setting>
|
||||
<Setting name="AlwaysAddMaterialSuffix">1</Setting>
|
||||
<Setting name="CreateComposites">1</Setting>
|
||||
<Setting name="ImportMaterials">1</Setting>
|
||||
<Setting name="IgnoreMaterials">DefaultMaterial,ColorEffect*</Setting>
|
||||
<Setting name="PopulateMaterialMaps">1</Setting>
|
||||
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||
<Setting name="UseExistingMaterials">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Meshes">
|
||||
<Setting
|
||||
name="AddedShapeSuffix">_shape</Setting>
|
||||
<Setting
|
||||
name="AdjustCenter">0</Setting>
|
||||
<Setting
|
||||
name="AdjustFloor">0</Setting>
|
||||
<Setting
|
||||
name="AlwaysAddShapeSuffix">0</Setting>
|
||||
<Setting
|
||||
name="calcTangentSpace">0</Setting>
|
||||
<Setting
|
||||
name="CollapseSubmeshes">0</Setting>
|
||||
<Setting
|
||||
name="convertLeftHanded">0</Setting>
|
||||
<Setting
|
||||
name="DoScaleOverride">0</Setting>
|
||||
<Setting
|
||||
name="DoUpAxisOverride">0</Setting>
|
||||
<Setting
|
||||
name="findInstances">0</Setting>
|
||||
<Setting
|
||||
name="flipUVCoords">0</Setting>
|
||||
<Setting
|
||||
name="genUVCoords">0</Setting>
|
||||
<Setting
|
||||
name="IgnoreNodeScale">0</Setting>
|
||||
<Setting
|
||||
name="ImportMesh">1</Setting>
|
||||
<Setting
|
||||
name="invertNormals">0</Setting>
|
||||
<Setting
|
||||
name="JoinIdenticalVerts">0</Setting>
|
||||
<Setting
|
||||
name="limitBoneWeights">0</Setting>
|
||||
<Setting
|
||||
name="LODType">TrailingNumber</Setting>
|
||||
<Setting
|
||||
name="removeRedundantMats">0</Setting>
|
||||
<Setting
|
||||
name="reverseWindingOrder">0</Setting>
|
||||
<Setting
|
||||
name="ScaleOverride">1</Setting>
|
||||
<Setting
|
||||
name="TransformUVs">0</Setting>
|
||||
<Setting
|
||||
name="UpAxisOverride">Z_AXIS</Setting>
|
||||
<Group name="Meshes">
|
||||
<Setting name="AddedShapeSuffix">_shape</Setting>
|
||||
<Setting name="AdjustCenter">0</Setting>
|
||||
<Setting name="AdjustFloor">0</Setting>
|
||||
<Setting name="AlwaysAddShapeSuffix">0</Setting>
|
||||
<Setting name="calcTangentSpace">0</Setting>
|
||||
<Setting name="CollapseSubmeshes">0</Setting>
|
||||
<Setting name="convertLeftHanded">0</Setting>
|
||||
<Setting name="DoScaleOverride">0</Setting>
|
||||
<Setting name="DoUpAxisOverride">0</Setting>
|
||||
<Setting name="findInstances">0</Setting>
|
||||
<Setting name="flipUVCoords">0</Setting>
|
||||
<Setting name="genUVCoords">0</Setting>
|
||||
<Setting name="IgnoreNodeScale">0</Setting>
|
||||
<Setting name="ImportMesh">1</Setting>
|
||||
<Setting name="invertNormals">0</Setting>
|
||||
<Setting name="JoinIdenticalVerts">0</Setting>
|
||||
<Setting name="limitBoneWeights">0</Setting>
|
||||
<Setting name="LODType">TrailingNumber</Setting>
|
||||
<Setting name="removeRedundantMats">0</Setting>
|
||||
<Setting name="reverseWindingOrder">0</Setting>
|
||||
<Setting name="ScaleOverride">1</Setting>
|
||||
<Setting name="TransformUVs">0</Setting>
|
||||
<Setting name="UpAxisOverride">Z_AXIS</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Sounds">
|
||||
<Setting
|
||||
name="Compressed">0</Setting>
|
||||
<Setting
|
||||
name="PitchAdjust">1.0</Setting>
|
||||
<Setting
|
||||
name="VolumeAdjust">1.0</Setting>
|
||||
<Group name="Sounds">
|
||||
<Setting name="Compressed">0</Setting>
|
||||
<Setting name="PitchAdjust">1.0</Setting>
|
||||
<Setting name="VolumeAdjust">1.0</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group
|
||||
name="NewTest">
|
||||
<Group
|
||||
name="Animations">
|
||||
<Setting
|
||||
name="animFPS">2</Setting>
|
||||
<Setting
|
||||
name="animTiming">Seconds</Setting>
|
||||
<Setting
|
||||
name="ImportAnimations">1</Setting>
|
||||
<Setting
|
||||
name="SeparateAnimations">1</Setting>
|
||||
<Group name="NewTest">
|
||||
<Group name="Animations">
|
||||
<Setting name="animFPS">2</Setting>
|
||||
<Setting name="animTiming">Seconds</Setting>
|
||||
<Setting name="ImportAnimations">1</Setting>
|
||||
<Setting name="SeparateAnimations">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Collision">
|
||||
<Setting
|
||||
name="CollisionMeshPrefix">Col</Setting>
|
||||
<Setting
|
||||
name="GenCollisionType">CollisionMesh</Setting>
|
||||
<Setting
|
||||
name="GenerateCollisions">1</Setting>
|
||||
<Setting
|
||||
name="GenerateLOSCollisions">1</Setting>
|
||||
<Setting
|
||||
name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||
<Setting
|
||||
name="LOSCollisionMeshPrefix">LOS</Setting>
|
||||
<Group name="Collision">
|
||||
<Setting name="CollisionMeshPrefix">Col</Setting>
|
||||
<Setting name="GenCollisionType">CollisionMesh</Setting>
|
||||
<Setting name="GenerateCollisions">1</Setting>
|
||||
<Setting name="GenerateLOSCollisions">1</Setting>
|
||||
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
|
||||
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="General">
|
||||
<Setting
|
||||
name="AutomaticallyPromptMissingFiles">0</Setting>
|
||||
<Setting
|
||||
name="DuplicatAutoResolution">AutoPrune</Setting>
|
||||
<Setting
|
||||
name="PreventImportWithErrors">1</Setting>
|
||||
<Setting
|
||||
name="WarningsAsErrors">0</Setting>
|
||||
<Setting
|
||||
name="AddDirectoryPrefixToAssetName">0</Setting>
|
||||
<Group name="General">
|
||||
<Setting name="AddDirectoryPrefixToAssetName">0</Setting>
|
||||
<Setting name="AutomaticallyPromptMissingFiles">0</Setting>
|
||||
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
|
||||
<Setting name="PreventImportWithErrors">1</Setting>
|
||||
<Setting name="WarningsAsErrors">0</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Images">
|
||||
<Setting
|
||||
name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
||||
<Setting
|
||||
name="Compressed">1</Setting>
|
||||
<Setting
|
||||
name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
|
||||
<Setting
|
||||
name="GenerateMaterialOnImport">1</Setting>
|
||||
<Setting
|
||||
name="ImageType">N/A</Setting>
|
||||
<Setting
|
||||
name="IsHDR">0</Setting>
|
||||
<Setting
|
||||
name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
||||
<Setting
|
||||
name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
||||
<Setting
|
||||
name="PBRTypeSuffixes">_COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM</Setting>
|
||||
<Setting
|
||||
name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
||||
<Setting
|
||||
name="Scaling">1.0</Setting>
|
||||
<Setting
|
||||
name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
||||
<Setting
|
||||
name="TextureFilteringMode">Bilinear</Setting>
|
||||
<Setting
|
||||
name="UseMips">1</Setting>
|
||||
<Group name="Images">
|
||||
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
|
||||
<Setting name="Compressed">1</Setting>
|
||||
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL</Setting>
|
||||
<Setting name="GenerateMaterialOnImport">1</Setting>
|
||||
<Setting name="ImageType">N/A</Setting>
|
||||
<Setting name="IsHDR">0</Setting>
|
||||
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
|
||||
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
|
||||
<Setting name="PBRTypeSuffixes">_COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM</Setting>
|
||||
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
|
||||
<Setting name="Scaling">1.0</Setting>
|
||||
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
|
||||
<Setting name="TextureFilteringMode">Bilinear</Setting>
|
||||
<Setting name="UseMips">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Materials">
|
||||
<Setting
|
||||
name="CreateComposites">1</Setting>
|
||||
<Setting
|
||||
name="ImportMaterials">1</Setting>
|
||||
<Setting
|
||||
name="PopulateMaterialMaps">1</Setting>
|
||||
<Setting
|
||||
name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||
<Setting
|
||||
name="UseExistingMaterials">1</Setting>
|
||||
<Group name="Materials">
|
||||
<Setting name="CreateComposites">1</Setting>
|
||||
<Setting name="ImportMaterials">1</Setting>
|
||||
<Setting name="PopulateMaterialMaps">1</Setting>
|
||||
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
|
||||
<Setting name="UseExistingMaterials">1</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Meshes">
|
||||
<Setting
|
||||
name="AdjustCenter">0</Setting>
|
||||
<Setting
|
||||
name="AdjustFloor">0</Setting>
|
||||
<Setting
|
||||
name="calcTangentSpace">0</Setting>
|
||||
<Setting
|
||||
name="CollapseSubmeshes">0</Setting>
|
||||
<Setting
|
||||
name="convertLeftHanded">0</Setting>
|
||||
<Setting
|
||||
name="DoScaleOverride">0</Setting>
|
||||
<Setting
|
||||
name="DoUpAxisOverride">0</Setting>
|
||||
<Setting
|
||||
name="findInstances">0</Setting>
|
||||
<Setting
|
||||
name="flipUVCoords">0</Setting>
|
||||
<Setting
|
||||
name="genUVCoords">0</Setting>
|
||||
<Setting
|
||||
name="IgnoreNodeScale">0</Setting>
|
||||
<Setting
|
||||
name="ImportMesh">1</Setting>
|
||||
<Setting
|
||||
name="invertNormals">0</Setting>
|
||||
<Setting
|
||||
name="JoinIdenticalVerts">0</Setting>
|
||||
<Setting
|
||||
name="limitBoneWeights">0</Setting>
|
||||
<Setting
|
||||
name="LODType">TrailingNumber</Setting>
|
||||
<Setting
|
||||
name="removeRedundantMats">0</Setting>
|
||||
<Setting
|
||||
name="reverseWindingOrder">0</Setting>
|
||||
<Setting
|
||||
name="ScaleOverride">1</Setting>
|
||||
<Setting
|
||||
name="TransformUVs">0</Setting>
|
||||
<Setting
|
||||
name="UpAxisOverride">Z_AXIS</Setting>
|
||||
<Group name="Meshes">
|
||||
<Setting name="AdjustCenter">0</Setting>
|
||||
<Setting name="AdjustFloor">0</Setting>
|
||||
<Setting name="calcTangentSpace">0</Setting>
|
||||
<Setting name="CollapseSubmeshes">0</Setting>
|
||||
<Setting name="convertLeftHanded">0</Setting>
|
||||
<Setting name="DoScaleOverride">0</Setting>
|
||||
<Setting name="DoUpAxisOverride">0</Setting>
|
||||
<Setting name="findInstances">0</Setting>
|
||||
<Setting name="flipUVCoords">0</Setting>
|
||||
<Setting name="genUVCoords">0</Setting>
|
||||
<Setting name="IgnoreNodeScale">0</Setting>
|
||||
<Setting name="ImportMesh">1</Setting>
|
||||
<Setting name="invertNormals">0</Setting>
|
||||
<Setting name="JoinIdenticalVerts">0</Setting>
|
||||
<Setting name="limitBoneWeights">0</Setting>
|
||||
<Setting name="LODType">TrailingNumber</Setting>
|
||||
<Setting name="removeRedundantMats">0</Setting>
|
||||
<Setting name="reverseWindingOrder">0</Setting>
|
||||
<Setting name="ScaleOverride">1</Setting>
|
||||
<Setting name="TransformUVs">0</Setting>
|
||||
<Setting name="UpAxisOverride">Z_AXIS</Setting>
|
||||
</Group>
|
||||
<Group
|
||||
name="Sounds">
|
||||
<Setting
|
||||
name="Compressed">0</Setting>
|
||||
<Setting
|
||||
name="PitchAdjust">1.0</Setting>
|
||||
<Setting
|
||||
name="VolumeAdjust">1.0</Setting>
|
||||
<Group name="Sounds">
|
||||
<Setting name="Compressed">0</Setting>
|
||||
<Setting name="PitchAdjust">1.0</Setting>
|
||||
<Setting name="VolumeAdjust">1.0</Setting>
|
||||
</Group>
|
||||
</Group>
|
||||
</AssetImportSettings>
|
||||
|
|
|
|||
|
|
@ -518,9 +518,9 @@ $guiContent = new GuiControl(AssetBrowser) {
|
|||
|
||||
new GuiScrollCtrl() {
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "1";
|
||||
lockHorizScroll = "0";
|
||||
lockVertScroll = "0";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
|
|
@ -1084,6 +1084,22 @@ $guiContent = new GuiControl(AssetBrowser) {
|
|||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapCtrl() {
|
||||
bitmapAsset = "ToolsModule:smaller_image";
|
||||
position = "5 588";
|
||||
extent = "20 20";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "top";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiSliderCtrl() {
|
||||
range = "0 2";
|
||||
ticks = "5";
|
||||
|
|
@ -1092,7 +1108,7 @@ $guiContent = new GuiControl(AssetBrowser) {
|
|||
useFillBar = "0";
|
||||
fillBarColor = "255 255 255 255";
|
||||
renderTicks = "0";
|
||||
position = "8 588";
|
||||
position = "28 590";
|
||||
extent = "75 20";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
|
|
@ -1109,6 +1125,22 @@ $guiContent = new GuiControl(AssetBrowser) {
|
|||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapCtrl() {
|
||||
bitmapAsset = "ToolsModule:larger_image";
|
||||
position = "103 588";
|
||||
extent = "20 20";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "top";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ $guiContent = new GuiControl(AssetBrowser_newFolder) {
|
|||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
text = "Select";
|
||||
text = "OK";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
|
|
@ -65,6 +65,7 @@ $guiContent = new GuiControl(AssetBrowser_newFolder) {
|
|||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
accelerator = "return";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Cancel";
|
||||
|
|
@ -85,6 +86,7 @@ $guiContent = new GuiControl(AssetBrowser_newFolder) {
|
|||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
accelerator = "escape";
|
||||
};
|
||||
new GuiTextEditCtrl(AssetBrowser_newFolderNameTxt) {
|
||||
historySize = "0";
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ function AssetBrowser::initialize(%this)
|
|||
if(!isObject(AssetPreviewArray))
|
||||
new ArrayObject(AssetPreviewArray);
|
||||
|
||||
if(!isObject(ObjectCreator))
|
||||
new ScriptObject(ObjectCreator);
|
||||
|
||||
if(!isObject(%this.dirHandler))
|
||||
{
|
||||
%this.dirHandler = makedirectoryHandler(AssetBrowser-->filterTree, "cache,shaderCache", "");
|
||||
|
|
@ -279,6 +282,7 @@ function AssetBrowser::selectAsset( %this, %asset )
|
|||
%this.changeAsset();
|
||||
}
|
||||
|
||||
if(isObject(Inspector))
|
||||
Inspector.refresh();
|
||||
|
||||
AssetBrowser.hideDialog();
|
||||
|
|
@ -628,7 +632,8 @@ function AssetBrowser::loadDirectories( %this )
|
|||
|
||||
%this.loadTags();
|
||||
|
||||
%this.loadCreatorClasses();
|
||||
if (!%this.selectMode)
|
||||
%this.loadCreatorClasses();
|
||||
|
||||
//If set to, show core
|
||||
if(EditorSettings.value("Assets/Browser/showCoreModule", false) == 1)
|
||||
|
|
@ -984,14 +989,31 @@ function AssetBrowser::toggleTagFilterPopup(%this)
|
|||
|
||||
function AssetBrowser::changeAsset(%this)
|
||||
{
|
||||
%targetObject = %this.fieldTargetObject;
|
||||
%inspectorObject = "";
|
||||
|
||||
if(%this.fieldTargetObject.isInNamespaceHierarchy("GuiInspector"))
|
||||
{
|
||||
%inspectorObject = %this.fieldTargetObject;
|
||||
%targetObject = %inspectorObject.getInspectObject();
|
||||
}
|
||||
|
||||
//alright, we've selectd an asset for a field, so time to set it!
|
||||
if(%this.fieldTargetName $= "")
|
||||
%cmd = %this.fieldTargetObject @ ".apply(\""@ %this.selectedAsset @ "\");";
|
||||
%cmd = %targetObject @ ".apply(\""@ %this.selectedAsset @ "\");";
|
||||
else
|
||||
%cmd = %this.fieldTargetObject @ "." @ %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";";
|
||||
echo("Changing asset via the " @ %cmd @ " command");
|
||||
%cmd = %targetObject @ "." @ %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";";
|
||||
//echo("Changing asset via the " @ %cmd @ " command");
|
||||
eval(%cmd);
|
||||
|
||||
//Force update our object with the field change
|
||||
%targetObject.inspectPostApply();
|
||||
|
||||
if(isObject(%inspectorObject))
|
||||
{
|
||||
%inspectorObject.refresh();
|
||||
}
|
||||
|
||||
//Flag us as dirty for editing purposes
|
||||
EWorldEditor.setSceneAsDirty();
|
||||
}
|
||||
|
|
@ -2282,7 +2304,7 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
|
|||
|
||||
%assetType = %payload.assetType;
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||
%pos = ObjectCreator.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||
%module = %payload.moduleName;
|
||||
%asset = %payload.assetName;
|
||||
|
||||
|
|
@ -2316,6 +2338,53 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
|
|||
EWorldEditor.isDirty = true;
|
||||
}
|
||||
|
||||
function GuiEditor::onControlDropped(%this, %payload, %position)
|
||||
{
|
||||
Canvas.popDialog(EditorDragAndDropLayer);
|
||||
// Make sure we have the right kind of D&D.
|
||||
|
||||
if( !%payload.parentGroup.isInNamespaceHierarchy( "GuiDragAndDropControlType_GuiControl" ) &&
|
||||
!%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" ))
|
||||
return;
|
||||
|
||||
if( %payload.dragSourceControl == %this )
|
||||
return;
|
||||
|
||||
%pos = %payload.getGlobalPosition();
|
||||
%x = getWord(%pos, 0);
|
||||
%y = getWord(%pos, 1);
|
||||
|
||||
if(%payload.assetType !$= "Creator")
|
||||
{
|
||||
//dealing with an actual asset, so build the assetName
|
||||
%assetId = %payload.moduleName @ ":" @ %payload.assetName;
|
||||
%assetType = AssetDatabase.getAssetType(%assetId);
|
||||
|
||||
if(%assetType $= "ImageAsset")
|
||||
{
|
||||
%cmd = "return new guiBitmapCtrl();";
|
||||
%ctrl = eval( %cmd );
|
||||
%ctrl.bitmap = %assetId;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
%className = %payload.assetName;
|
||||
%cmd = "return new " @ %className @ "();";
|
||||
%ctrl = eval( %cmd );
|
||||
}
|
||||
|
||||
%this.addNewCtrl(%ctrl);
|
||||
|
||||
%ctrl.setPositionGlobal(%x, %y);
|
||||
%this.setFirstResponder();
|
||||
|
||||
if(EditorSettings.value("AssetManagement/Assets/closeBrowserOnDragAction", false))
|
||||
{
|
||||
AssetBrowser.hideDialog();
|
||||
}
|
||||
}
|
||||
|
||||
function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position )
|
||||
{
|
||||
Canvas.popDialog(EditorDragAndDropLayer);
|
||||
|
|
@ -2375,7 +2444,6 @@ function AssetBrowserFilterTree::onControlDropped( %this, %payload, %position )
|
|||
|
||||
function AssetBrowserFilterTree::onDragDropped( %this )
|
||||
{
|
||||
%asdgadfhg =true;
|
||||
}
|
||||
|
||||
function AssetBrowser::hasLooseFilesInDir(%this)
|
||||
|
|
@ -2487,3 +2555,50 @@ function AssetBrowser::importLooseFiles(%this)
|
|||
echo("Adding loose files at directory " @ %this.dirHandler.currentAddress);
|
||||
LooseFileAuditWindow.showDialog(%this.dirHandler.currentAddress);
|
||||
}
|
||||
|
||||
//
|
||||
function getAssetPreviewImage(%asset)
|
||||
{
|
||||
if(isFile(%asset))
|
||||
{
|
||||
%aq = new AssetQuery();
|
||||
%assetsFound = AssetDatabase.findAssetLooseFile(%aq, %asset);
|
||||
if(%assetsFound != 0)
|
||||
{
|
||||
%asset = %aq.getAsset(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
%previewPath = %asset;
|
||||
}
|
||||
|
||||
%aq.delete();
|
||||
}
|
||||
|
||||
if(AssetDatabase.isDeclaredAsset(%asset))
|
||||
{
|
||||
%moduleName = AssetDatabase.getAssetModule(%asset).ModuleId;
|
||||
%assetName = AssetDatabase.getAssetName(%asset);
|
||||
%previewAssetName = "ToolsModule:" @ %moduleName @ "_" @ %assetName @ "_PreviewImage";
|
||||
|
||||
if(AssetDatabase.isDeclaredAsset(%previewAssetName))
|
||||
{
|
||||
%previewDef = AssetDatabase.acquireAsset(%previewAssetName);
|
||||
%previewPath = %previewDef.getImagePath();
|
||||
AssetDatabase.releaseAsset(%previewAssetName);
|
||||
}
|
||||
else
|
||||
{
|
||||
%previewPath = %asset;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
%previewPath = %asset;
|
||||
}
|
||||
|
||||
if(%previewPath $= "")
|
||||
%previewPath = "ToolsModule:unknownImage_image";
|
||||
|
||||
return %previewPath;
|
||||
}
|
||||
|
|
@ -85,9 +85,9 @@ function ImportAssetWindow::onWake(%this)
|
|||
%this.importer.targetPath = AssetImportTargetAddress.getText();
|
||||
%this.importer.targetModuleId = AssetImportTargetModule.getText();
|
||||
|
||||
ImportActivityLog.empty();
|
||||
|
||||
%this.refresh();
|
||||
|
||||
toggleImportWindowVizBtn.setStateOn(EditorSettings.value("Assets/AutoImport"));
|
||||
}
|
||||
|
||||
//
|
||||
|
|
@ -181,6 +181,20 @@ function AssetBrowser::onBeginDropFiles( %this )
|
|||
|
||||
function AssetBrowser::onDropFile( %this, %filePath )
|
||||
{
|
||||
if(fileExt(%filePath) $= "")
|
||||
{
|
||||
//we're dealing with a folder, so we gotta parse through it
|
||||
|
||||
%file = findFirstFile( %filePath @ "/*" );
|
||||
while( %file !$= "" )
|
||||
{
|
||||
%this.onDropFile(%file);
|
||||
%file = findNextFile( %filePath @ "/*" );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(!AssetBrowser.isAwake() || !AssetBrowser.isVisible())
|
||||
{
|
||||
if(GuiEditorIsActive())
|
||||
|
|
@ -471,9 +485,7 @@ function ImportAssetWindow::doRefresh(%this)
|
|||
ImportAssetWindow.importer.processImportingAssets();
|
||||
//%this.processImportAssets();
|
||||
|
||||
//ImportAssetWindow.hasImportIssues = %this.validateAssets();
|
||||
|
||||
ImportAssetWindow.importer.validateImportingAssets();
|
||||
ImportAssetWindow.hasImportIssues = ImportAssetWindow.importer.hasImportIssues();
|
||||
|
||||
AssetImportCtrl-->NewAssetsTree.clear();
|
||||
AssetImportCtrl-->NewAssetsTree.insertItem(0, "Importing Assets");
|
||||
|
|
@ -503,7 +515,7 @@ function ImportAssetWindow::doRefresh(%this)
|
|||
}
|
||||
if(%this.autoRenamedAssets != 0)
|
||||
{
|
||||
%ImportActionSummary = %ImportActionSummary SPC %this.autoRenamedAssets @ " Auto Renamed|";
|
||||
%ImportActionSummary = %ImportActionSummary SPC %this.autoRenamedAssets @ " Automatically Renamed|";
|
||||
}
|
||||
|
||||
if(%ImportActionSummary !$= "")
|
||||
|
|
@ -519,7 +531,8 @@ function ImportAssetWindow::doRefresh(%this)
|
|||
if(ImportAssetWindow.importConfigsList.count() != 0
|
||||
&& EditorSettings.value("Assets/AssetImporDefaultConfig") !$= ""
|
||||
&& EditorSettings.value("Assets/AutoImport", false) == true
|
||||
&& ImportAssetWindow.hasImportIssues == false
|
||||
&& ImportAssetWindow.hasImportIssues() == false
|
||||
&& AssetBrowser.isAssetReImport == false
|
||||
&& ImportAssetWindow.allowAutoImport)
|
||||
{
|
||||
AssetImportCtrl.setHidden(true);
|
||||
|
|
@ -722,11 +735,7 @@ function NewAssetsPanelInputs::onRightMouseDown(%this)
|
|||
//
|
||||
function ImportAssetWindow::removeImportingAsset(%this)
|
||||
{
|
||||
ImportActivityLog.add("Removing Asset from Import");
|
||||
|
||||
%this.importer.deleteImportingAsset(ImportAssetActions.assetItem);
|
||||
|
||||
//ImportAssetWindow.refresh();
|
||||
}
|
||||
|
||||
function ImportAssetWindow::addNewImportingAsset(%this, %filterType)
|
||||
|
|
@ -924,9 +933,9 @@ function ImportAssetWindow::toggleLogWindow()
|
|||
}
|
||||
|
||||
ImportLogTextList.clear();
|
||||
for(%i=0; %i < ImportActivityLog.count(); %i++)
|
||||
for(%i=0; %i < ImportAssetWindow.importer.getActivityLogLineCount(); %i++)
|
||||
{
|
||||
ImportLogTextList.addRow(%i, ImportActivityLog.getKey(%i));
|
||||
ImportLogTextList.addRow(%i,ImportAssetWindow.importer.getActivityLogLine(%i));
|
||||
}
|
||||
}
|
||||
//
|
||||
|
|
@ -952,3 +961,12 @@ function ImportAssetModuleList::refresh(%this)
|
|||
}
|
||||
}
|
||||
//
|
||||
|
||||
//
|
||||
function toggleImportWindowViz()
|
||||
{
|
||||
%value = EditorSettings.value("Assets/AutoImport");
|
||||
EditorSettings.setValue("Assets/AutoImport", !%value);
|
||||
|
||||
}
|
||||
//
|
||||
|
|
|
|||
|
|
@ -3,12 +3,6 @@ function ImportAssetConfigList::onSelect( %this, %id, %text )
|
|||
//Apply our settings to the assets
|
||||
echo("Changed our import config!");
|
||||
|
||||
if(ImportActivityLog.count() != 0)
|
||||
ImportActivityLog.add("");
|
||||
|
||||
ImportActivityLog.add("Asset Import Configs set to " @ %text);
|
||||
ImportActivityLog.add("");
|
||||
|
||||
ImportAssetWindow.activeImportConfigIndex = %id;
|
||||
//ImportAssetWindow.activeImportConfig = ImportAssetWindow.importConfigsList.getKey(%id);
|
||||
|
||||
|
|
@ -35,6 +29,7 @@ function setupImportConfigSettingsList()
|
|||
ImportAssetConfigSettingsList.addNewConfigSetting("General/WarningsAsErrors", "Warnings As Errors", "bool", "", "0", "", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("General/PreventImportWithErrors", "Prevent Import With Errors", "bool", "", "1", "", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("General/AutomaticallyPromptMissingFiles", "Automatically Prompt Missing Files", "bool", "", "0", "", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("General/AddDirectoryPrefixToAssetName", "Adds the name of the folder to importing asset name", "bool", "", "0", "", "");
|
||||
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Meshes/ImportMesh", "Import Mesh", "bool", "", "1", "", "ToggleImportMesh");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Meshes/AlwaysAddShapeSuffix", "Always Add Shape Suffix", "bool", "", "0", "");
|
||||
|
|
@ -71,7 +66,7 @@ function setupImportConfigSettingsList()
|
|||
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/ImportMaterials", "Import Materials", "bool", "", "1", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/AlwaysAddMaterialSuffix", "Always Add Material Suffix", "bool", "", "1", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/AddedMaterialSuffix", "Added Material Suffix", "string", "", "_mat", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/CreateComposites", "Create Composites", "bool", "", "1", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/CreateORMConfig", "Create ORM Map", "bool", "", "1", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/UseDiffuseSuffixOnOriginImage", "Use Diffuse Suffix for Origin Image", "bool", "", "1", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/UseExistingMaterials", "Use Existing Materials", "bool", "", "1", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Materials/IgnoreMaterials", "Ignore Materials", "command", "", "", "");
|
||||
|
|
@ -114,9 +109,12 @@ function setupImportConfigSettingsList()
|
|||
ImportAssetConfigSettingsList.addNewConfigSetting("Images/GenerateMaterialOnImport", "Generate Material On Import", "bool", "", "1", "");
|
||||
|
||||
//Sounds
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Images/ImportSounds", "Import Sounds", "bool", "", "1", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Sounds/VolumeAdjust", "Volume Adjustment", "float", "", "1.0", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Sounds/PitchAdjust", "Pitch Adjustment", "float", "", "1.0", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Sounds/Compressed", "Is Compressed", "bool", "", "0", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Sounds/AlwaysAddSoundSuffix", "Always Add Sound Suffix", "bool", "", "1", "");
|
||||
ImportAssetConfigSettingsList.addNewConfigSetting("Sounds/AddedSoundSuffix", "Added Sound Suffix", "string", "", "_sound", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +186,7 @@ function ImportAssetOptionsWindow::editImportSettings(%this, %assetItem)
|
|||
else if(%assetType $= "MaterialAsset")
|
||||
{
|
||||
ImportOptionsList.startGroup("Material");
|
||||
ImportOptionsList.addField("CreateComposites", "Create Composite Textures", "bool", "", "1", "", %assetConfigObj);
|
||||
ImportOptionsList.addField("CreateORMConfig", "Create ORM Map", "bool", "", "1", "", %assetConfigObj);
|
||||
ImportOptionsList.endGroup();
|
||||
}
|
||||
else if(%assetType $= "ImageAsset")
|
||||
|
|
@ -233,12 +231,6 @@ function ImportAssetOptionsWindow::saveAssetOptions(%this)
|
|||
{
|
||||
%success = AssetImportSettings.write();
|
||||
|
||||
if(ImportActivityLog.count() != 0)
|
||||
ImportActivityLog.add("");
|
||||
|
||||
ImportActivityLog.add("Asset Import Configs saved, refreshing Import session");
|
||||
ImportActivityLog.add("");
|
||||
|
||||
ImportAssetWindow.refresh();
|
||||
ImportAssetOptionsWindow.setVisible(0);
|
||||
}
|
||||
|
|
@ -272,7 +264,7 @@ function ImportAssetConfigEditorWindow::populateConfigList(%this, %configName)
|
|||
%this.populateConfigListByGroup("Animations");
|
||||
%this.populateConfigListByGroup("Images");
|
||||
%this.populateConfigListByGroup("Collision");
|
||||
%this.populateConfigListByGroup("Sound");
|
||||
%this.populateConfigListByGroup("Sounds");
|
||||
|
||||
ImportOptionsConfigList.update();
|
||||
}
|
||||
|
|
@ -373,6 +365,8 @@ function ImportAssetConfigEditorWindow::addNewConfig(%this)
|
|||
AssetImportSettings.setValue("Sounds/VolumeAdjust", "1.0");
|
||||
AssetImportSettings.setValue("Sounds/PitchAdjust", "1.0");
|
||||
AssetImportSettings.setValue("Sounds/Compressed", "0");
|
||||
AssetImportSettings.setValue("Sounds/AlwaysAddSoundSuffix", "1");
|
||||
AssetImportSettings.setValue("Sounds/AddedSoundSuffix", "_sound");
|
||||
|
||||
AssetImportSettings.endGroup();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
function AssetImportConfigEditor::onWake(%this)
|
||||
{
|
||||
%this.refresh();
|
||||
|
||||
%index = AssetImportConfigList.findTextIndex(EditorSettings.value("Assets/AssetImporDefaultConfig", ""));
|
||||
AssetImportConfigList.setSelectedRow(%index);
|
||||
}
|
||||
|
||||
function AssetImportConfigEditor::refresh(%this)
|
||||
|
|
@ -38,10 +41,10 @@ function AssetImportConfigList::onSelect( %this, %id, %text )
|
|||
%this.populateConfigListByGroup("General");
|
||||
%this.populateConfigListByGroup("Meshes");
|
||||
%this.populateConfigListByGroup("Materials");
|
||||
%this.populateConfigListByGroup("Animations");
|
||||
%this.populateConfigListByGroup("Images");
|
||||
%this.populateConfigListByGroup("Collision");
|
||||
%this.populateConfigListByGroup("Sound");
|
||||
%this.populateConfigListByGroup("Sounds");
|
||||
%this.populateConfigListByGroup("Animations");
|
||||
//%this.populateConfigListByGroup("Collision");
|
||||
|
||||
ImportOptionsConfigList.update();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ function AssetBrowser::buildCreatorPreview(%this, %assetDef, %previewData)
|
|||
|
||||
%previewData.assetName = %name;
|
||||
%previewData.assetPath = "";
|
||||
%previewData.moduleName = "";
|
||||
|
||||
%previewData.previewImage = "ToolsModule:" @ %class @ "_image";
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ function AssetBrowser::onCreatorEditorDropped(%this, %assetDef, %position)
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ function spawnDatablockObject(%datablock)
|
|||
%cmd = %class @ "::create(" @ %name @ ");";
|
||||
|
||||
%shapePath = ( %datablock.shapeAsset !$= "" ) ? %datablock.shapeFile : %datablock.shapeName;
|
||||
%createCmd = "EWCreatorWindow.createObject( \"" @ %cmd @ "\" );";
|
||||
%createCmd = "ObjectCreator.createObject( \"" @ %cmd @ "\" );";
|
||||
return eval(%createCmd);//eval("showImportDialog( \"" @ %shapePath @ "\", \"" @ %createCmd @ "\" );");
|
||||
}
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ function AssetBrowser::onDatablockEditorDropped(%this, %assetDef, %position)
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
function AssetBrowser::createNewFolder(%this)
|
||||
{
|
||||
AssetBrowser_newFolderNameTxt.text = "NewFolder";
|
||||
Canvas.pushDialog(AssetBrowser_newFolder);
|
||||
Canvas.pushDialog(AssetBrowser_newFolder, 99, true);
|
||||
|
||||
AssetBrowser_newFolderNameTxt.selectAllText();
|
||||
}
|
||||
|
||||
function AssetBrowser::doCreateNewFolder(%this)
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ function AssetBrowser::dragAndDropGameObjectAsset(%this, %assetDef, %dropTarget)
|
|||
|
||||
getScene(0).add(%gameObject);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||
%pos = ObjectCreator.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||
|
||||
%gameObject.position = %pos;
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ function AssetBrowser::onGameObjectAssetEditorDropped(%this, %assetDef, %positio
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ function AssetBrowser::createMaterialAsset(%this)
|
|||
%assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
|
||||
|
||||
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
|
||||
%scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;
|
||||
|
||||
%asset = new MaterialAsset()
|
||||
{
|
||||
|
|
@ -16,13 +15,13 @@ function AssetBrowser::createMaterialAsset(%this)
|
|||
versionId = 1;
|
||||
materialDefinitionName = %assetName;
|
||||
scriptFile = %assetName @ "." @ $TorqueScriptFileExtension;
|
||||
|
||||
new Material(%assetName) {
|
||||
};
|
||||
};
|
||||
|
||||
TamlWrite(%asset, %tamlpath);
|
||||
|
||||
%mat = new Material(%assetName);
|
||||
%mat.save(%scriptPath);
|
||||
|
||||
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
|
||||
AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath);
|
||||
|
||||
|
|
@ -42,6 +41,7 @@ function AssetBrowser::editMaterialAsset(%this, %assetDef)
|
|||
|
||||
EditorGui.setEditor(MaterialEditorPlugin);
|
||||
|
||||
MaterialEditorGui.currentMaterialAsset = %assetDef.getAssetId();
|
||||
MaterialEditorGui.currentMaterial = %assetDef.materialDefinitionName;
|
||||
MaterialEditorGui.setActiveMaterial( %assetDef.materialDefinitionName );
|
||||
|
||||
|
|
@ -433,7 +433,7 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
|
|||
|
||||
%generatePreview = false;
|
||||
|
||||
%previewFilePath = %previewPath @ %assetDef.assetName @ "_Preview.png";
|
||||
%previewFilePath = %previewPath @ %assetDef.assetName @ "_Preview.dds";
|
||||
if(!isFile(%previewFilePath))
|
||||
{
|
||||
%generatePreview = true;
|
||||
|
|
@ -457,17 +457,11 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
|
|||
|
||||
if(isObject(%assetDef.materialDefinitionName))
|
||||
{
|
||||
if(isFile(%assetDef.materialDefinitionName.getDiffuseMap(0)))
|
||||
{
|
||||
%difMap = %assetDef.materialDefinitionName.getDiffuseMap(0);
|
||||
}
|
||||
else if(%assetDef.materialDefinitionName.getDiffuseMapAsset(0) !$= "")
|
||||
{
|
||||
%imgAsset = AssetDatabase.acquireAsset(%assetDef.materialDefinitionName.getDiffuseMapAsset(0));
|
||||
%difMap = %imgAsset.getImagePath();
|
||||
}
|
||||
%previewShapeDef = AssetDatabase.acquireAsset("ToolsModule:previewSphereShape");
|
||||
%generatedFilePath = %previewShapeDef.generateCachedPreviewImage(256, %assetDef.materialDefinitionName);
|
||||
|
||||
%success = saveScaledImage(%difMap, %previewFilePath);
|
||||
pathCopy(%generatedFilePath, %previewFilePath);
|
||||
fileDelete(%generatedFilePath);
|
||||
|
||||
%previewAsset = new ImageAsset()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function AssetBrowser::onPrefabEditorDropped(%this, %assetDef, %position)
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
|
|||
|
||||
%generatePreview = false;
|
||||
|
||||
%previewFilePath = %previewPath @ %assetDef.assetName @ "_Preview.png";
|
||||
%previewFilePath = %previewPath @ %assetDef.assetName @ "_Preview.dds";
|
||||
if(!isFile(%previewFilePath) || (compareFileTimes(%assetDef.getShapeFile(), %previewFilePath) == 1))
|
||||
{
|
||||
%generatePreview = true;
|
||||
|
|
@ -272,21 +272,11 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData)
|
|||
|
||||
//This is slightly hacky, but we're going to utilize the imposter/last detail system
|
||||
//to generate our previews for us and then clean up the unneeded bits
|
||||
%oldImposterSetting = $TSLastDetail::dumpImposters;
|
||||
$TSLastDetail::dumpImposters = true;
|
||||
|
||||
%filePath = %assetDef.generateCachedPreviewImage();
|
||||
|
||||
%imposterPath = %filePath @ ".imposter.png";
|
||||
pathCopy(%imposterPath, %previewFilePath);
|
||||
|
||||
//cleanup
|
||||
fileDelete(%imposterPath);
|
||||
fileDelete(%filePath @ ".imposter.dds");
|
||||
fileDelete(%filePath @ ".imposter_normals.png");
|
||||
fileDelete(%filePath @ ".imposter_normals.dds");
|
||||
|
||||
$TSLastDetail::dumpImposters = %oldImposterSetting;
|
||||
pathCopy(%filePath, %previewFilePath);
|
||||
fileDelete(%filePath); //cleanup
|
||||
|
||||
%previewAsset = new ImageAsset()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function AssetBrowser::onSoundAssetEditorDropped(%this, %assetDef, %position)
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,10 +15,37 @@ function AssetBrowser::createTerrainMaterialAsset(%this)
|
|||
{
|
||||
AssetName = %assetName;
|
||||
versionId = 1;
|
||||
scriptFile = %assetName @ "." @ $TorqueScriptFileExtension;
|
||||
materialDefinitionName = %assetName;
|
||||
};
|
||||
|
||||
%matDef = new TerrainMaterial(%assetName)
|
||||
{
|
||||
internalName = %moduleName @ ":" @ %assetName;
|
||||
diffuseMap = "";
|
||||
detailMap = "";
|
||||
detailSize = "10";
|
||||
isManaged = "1";
|
||||
detailBrightness = "1";
|
||||
Enabled = "1";
|
||||
diffuseSize = "200";
|
||||
};
|
||||
|
||||
%fxMatDef = new Material("TerrainFX_" @ %assetName)
|
||||
{
|
||||
mapTo = %assetName;
|
||||
footstepSoundId = 0;
|
||||
terrainMaterials = "1";
|
||||
ShowDust = "1";
|
||||
showFootprints = "1";
|
||||
materialTag0 = "Terrain";
|
||||
effectColor[0] = "0.42 0.42 0 1";
|
||||
effectColor[1] = "0.42 0.42 0 1";
|
||||
impactSoundId = "0";
|
||||
};
|
||||
|
||||
%asset.add(%matDef);
|
||||
%asset.add(%fxMatDef);
|
||||
|
||||
TamlWrite(%asset, %tamlpath);
|
||||
|
||||
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
|
||||
|
|
@ -28,35 +55,6 @@ function AssetBrowser::createTerrainMaterialAsset(%this)
|
|||
|
||||
AssetBrowser.refresh();
|
||||
|
||||
//AssetBrowserFilterTree.onSelect(%smItem);
|
||||
|
||||
%file = new FileObject();
|
||||
%templateFile = new FileObject();
|
||||
|
||||
%templateFilePath = %this.templateFilesPath @ "terrainMaterial." @ $TorqueScriptFileExtension @ ".template";
|
||||
|
||||
if(%file.openForWrite(%scriptPath) && %templateFile.openForRead(%templateFilePath))
|
||||
{
|
||||
while( !%templateFile.isEOF() )
|
||||
{
|
||||
%line = %templateFile.readline();
|
||||
%line = strreplace( %line, "@", %assetName );
|
||||
|
||||
%file.writeline(%line);
|
||||
//echo(%line);
|
||||
}
|
||||
|
||||
%file.close();
|
||||
%templateFile.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
%file.close();
|
||||
%templateFile.close();
|
||||
|
||||
warnf("CreateNewTerrainMaterialAsset - Something went wrong and we couldn't write thescript file!");
|
||||
}
|
||||
|
||||
//If we've got the terrain mat editor open, go ahead and update it all
|
||||
TerrainMaterialDlg.onWake();
|
||||
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ function AssetBrowser::addCreatorClass(%this, %class, %name, %buildfunc)
|
|||
else
|
||||
%cmd = "ObjectBuilderGui." @ %method @ "();";
|
||||
|
||||
%buildfunc = "ObjectBuilderGui.newObjectCallback = \"AssetBrowser.onFinishCreateObject\"; EWCreatorWindow.createObject( \"" @ %cmd @ "\" );";
|
||||
%buildfunc = "ObjectBuilderGui.newObjectCallback = \"AssetBrowser.onFinishCreateObject\"; ObjectCreator.createObject( \"" @ %cmd @ "\" );";
|
||||
}
|
||||
|
||||
%args = new ScriptObject();
|
||||
|
|
|
|||
|
|
@ -277,27 +277,46 @@ function directoryHandler::deleteFolder(%this, %folderPath)
|
|||
%fullPath = makeFullPath(%folderPath);
|
||||
|
||||
//First, wipe out any files inside the folder first
|
||||
%file = findFirstFileMultiExpr( %fullPath @ "/*.*", true);
|
||||
%file = findFirstFileMultiExpr( %fullPath @ "/*", true);
|
||||
|
||||
while( %file !$= "" )
|
||||
{
|
||||
%success = fileDelete( %file );
|
||||
|
||||
if(!%success)
|
||||
if (isFile(%file))
|
||||
{
|
||||
error("doDeleteFolder - unable to delete file " @ %file);
|
||||
return;
|
||||
}
|
||||
%success = fileDelete( %file );
|
||||
|
||||
%file = findNextFileMultiExpr( %fullPath @ "/*.*" );
|
||||
if(!%success)
|
||||
{
|
||||
error("doDeleteFolder - unable to delete file " @ %file);
|
||||
return;
|
||||
}
|
||||
}
|
||||
%file = findNextFileMultiExpr( %fullPath @ "/*" );
|
||||
}
|
||||
|
||||
//next, walk through and delete any subfolders that may be remaining
|
||||
%finalDeleteAttempt = false;
|
||||
while(IsDirectory(%fullPath) && fileDelete(%fullPath) == 0)
|
||||
{
|
||||
//We couldn't delete the folder, so get a directory list and recurse through it, deleteing them as we go
|
||||
%paths = getDirectoryList(%fullPath);
|
||||
for(%i=0; %i < getFieldCount(%paths); %i++)
|
||||
|
||||
// If nothing is in this directory, let the loop run once more and if that fails we're not going
|
||||
// to delete the folder. This prevents an infinite loop if for some reason the directory cannot
|
||||
// be deleted.
|
||||
%pathCount = getFieldCount(%paths);
|
||||
if (%pathCount == 0)
|
||||
{
|
||||
if (%finalDeleteattempt)
|
||||
{
|
||||
error("doDeleteFolder - unable to delete directory " @ %fullPath);
|
||||
return;
|
||||
}
|
||||
%finalDeleteAttempt = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
for(%i=0; %i < %pathCount; %i++)
|
||||
{
|
||||
%childPath = getField(%paths, %i);
|
||||
%this.deleteFolder(%fullPath @ "/" @ %childPath);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ function AssetBrowser::buildPopupMenus(%this)
|
|||
|
||||
item[ 0 ] = "Edit Asset" TAB "" TAB "AssetBrowser.editAsset();";
|
||||
item[ 1 ] = "Rename Asset" TAB "" TAB "AssetBrowser.renameAsset();";
|
||||
item[ 2 ] = "Refresh Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
|
||||
item[ 2 ] = "Reload Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
|
||||
item[ 3 ] = "Asset Properties" TAB "" TAB "AssetBrowser.editAssetInfo();";
|
||||
item[ 4 ] = "-";
|
||||
Item[ 5 ] = "Duplicate Asset" TAB "" TAB "AssetBrowser.duplicateAsset();";
|
||||
|
|
@ -50,7 +50,7 @@ function AssetBrowser::buildPopupMenus(%this)
|
|||
item[ 0 ] = "Edit Level" TAB "" TAB "AssetBrowser.editAsset();";
|
||||
item[ 1 ] = "Append as Sublevel" TAB "" TAB "AssetBrowser.appendSublevel();";
|
||||
item[ 2 ] = "Rename Asset" TAB "" TAB "AssetBrowser.renameAsset();";
|
||||
item[ 3 ] = "Refresh Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
|
||||
item[ 3 ] = "Reload Asset" TAB "" TAB "AssetBrowser.refreshAsset();";
|
||||
item[ 4 ] = "Asset Properties" TAB "" TAB "AssetBrowser.editAssetInfo();";
|
||||
item[ 5 ] = "-";
|
||||
Item[ 6 ] = "Duplicate Asset" TAB "" TAB "AssetBrowser.duplicateAsset();";
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function ConvexEditorGui::onWake( %this )
|
|||
%mat = %matName;
|
||||
}
|
||||
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.getDiffuseMap(0));
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap( getAssetPreviewImage(%mat.getDiffuseMap(0)));
|
||||
|
||||
ConvexEditorOptionsWindow.activeMaterial = %mat;
|
||||
}
|
||||
|
|
@ -51,6 +51,8 @@ function ConvexEditorGui::onSleep( %this )
|
|||
function ConvexEditorGui::createConvexBox( %this )
|
||||
{
|
||||
%obj = genericCreateObject( "ConvexShape" );
|
||||
%obj.setMaterial(%this.materialName); //set whatever the editor has as it's default material to the new one
|
||||
|
||||
%this.handleDeselect();
|
||||
%this.selectConvex( %obj );
|
||||
%this.dropSelectionAtScreenCenter();
|
||||
|
|
@ -76,7 +78,7 @@ function ConvexEditorGui::onSelectionChanged( %this, %shape, %face )
|
|||
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setText("");
|
||||
%shapeMat = %shape.getMaterial();
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%shapeMat.getDiffuseMap(0));
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(getAssetPreviewImage(%shapeMat.getDiffuseMap(0)));
|
||||
|
||||
ConvexEditorOptionsWindow.activeShape = %shape;
|
||||
|
||||
|
|
@ -175,7 +177,7 @@ function ConvexEditorMaterialBtn::gotMaterialName(%this, %name)
|
|||
}
|
||||
}
|
||||
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%diffusemap);
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(getAssetPreviewImage(%diffusemap));
|
||||
|
||||
ConvexEditorOptionsWindow.activeMaterial = %materialAsset.materialDefinitionName;
|
||||
}
|
||||
|
|
@ -191,7 +193,7 @@ function ConvexEditorMaterialLiftBtn::onClick(%this)
|
|||
{
|
||||
%mat = ConvexEditorGui.getSelectedFaceMaterial();
|
||||
ConvexEditorOptionsWindow.activeMaterial = %mat;
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.getDiffuseMap(0));
|
||||
ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(getAssetPreviewImage(%mat.getDiffuseMap(0)));
|
||||
}
|
||||
|
||||
function ConvexEditorMaterialResetBtn::onClick(%this)
|
||||
|
|
@ -240,7 +242,7 @@ function ConvexEditorDefaultMaterialBtn::gotMaterialName(%this, %name)
|
|||
}
|
||||
}
|
||||
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%diffusemap);
|
||||
ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(getAssetPreviewImage(%diffusemap));
|
||||
|
||||
ConvexEditorOptionsWindow.activeShape.setMaterial(%name);
|
||||
|
||||
|
|
|
|||
|
|
@ -326,51 +326,40 @@ function DecalInspector::removeDirty()
|
|||
|
||||
function DecalEditorGui::updateDecalPreview( %this, %material )
|
||||
{
|
||||
%previewImage = "";
|
||||
|
||||
if( isObject( %material ) )
|
||||
{
|
||||
DecalPreviewWindow-->decalPreview.setBitmap( %material.getDiffuseMap(0) );
|
||||
%previewImage = %material.getDiffuseMap(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(AssetDatabase.isDeclaredAsset(%material))
|
||||
{
|
||||
%assetDef = AssetDatabase.acquireAsset(%material);
|
||||
%difMap = %assetDef.materialDefinitionName.getDiffuseMap(0);
|
||||
AssetDatabase.acquireAsset(%material);
|
||||
|
||||
if(%difMap !$= "" && %difMap !$= "Core_Rendering:missingTexture")
|
||||
{
|
||||
DecalPreviewWindow-->decalPreview.setBitmap( %difMap );
|
||||
return;
|
||||
%previewImage = %material;
|
||||
}
|
||||
}
|
||||
DecalPreviewWindow-->decalPreview.setBitmap("ToolsModule:unknownImage_image");
|
||||
|
||||
DecalPreviewWindow-->decalPreview.setBitmap( getAssetPreviewImage(%previewImage) );
|
||||
}
|
||||
}
|
||||
|
||||
function DecalEditorGui::updateInstancePreview( %this, %material )
|
||||
{
|
||||
%previewImage = "";
|
||||
|
||||
if( isObject( %material ) )
|
||||
{
|
||||
DecalPreviewWindow-->instancePreview.setBitmap( %material.getDiffuseMap(0) );
|
||||
%previewImage = %material.getDiffuseMap(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(AssetDatabase.isDeclaredAsset(%material))
|
||||
{
|
||||
%assetDef = AssetDatabase.acquireAsset(%material);
|
||||
%difMap = %assetDef.materialDefinitionName.getDiffuseMap(0);
|
||||
AssetDatabase.acquireAsset(%material);
|
||||
|
||||
if(%difMap !$= "" && %difMap !$= "Core_Rendering:missingTexture")
|
||||
{
|
||||
DecalPreviewWindow-->instancePreview.setBitmap( %difMap );
|
||||
return;
|
||||
%previewImage = %material;
|
||||
}
|
||||
}
|
||||
|
||||
DecalPreviewWindow-->instancePreview.setBitmap("ToolsModule:unknownImage_image");
|
||||
}
|
||||
DecalPreviewWindow-->instancePreview.setBitmap( getAssetPreviewImage(%previewImage) );
|
||||
}
|
||||
|
||||
function DecalEditorGui::rebuildInstanceTree( %this )
|
||||
|
|
|
|||
|
|
@ -1251,7 +1251,7 @@ function ColladaImportDlg::showDialog(%this, %shapePath, %cmd)
|
|||
%this.cmd = %cmd;
|
||||
|
||||
// Only allow loading lights if creating a new scene object
|
||||
%canLoadLights = (strstr(%this.cmd, "EWCreatorWindow.create") != -1);
|
||||
%canLoadLights = (strstr(%this.cmd, "ObjectCreator.create") != -1);
|
||||
|
||||
// Check for an existing TSShapeConstructor object. Need to exec the script
|
||||
// manually as the DAE resource may not have been loaded yet
|
||||
|
|
|
|||
|
|
@ -53,26 +53,27 @@ function ESettingsWindow::onWake( %this )
|
|||
|
||||
function ESettingsWindow::hideDialog( %this )
|
||||
{
|
||||
%this.setVisible(false);
|
||||
Canvas.popDialog(EditorSettingsWindow);
|
||||
}
|
||||
|
||||
function ESettingsWindow::ToggleVisibility()
|
||||
{
|
||||
if ( ESettingsWindow.visible )
|
||||
if(ESettingsWindow.isAwake())
|
||||
{
|
||||
ESettingsWindow.setVisible(false);
|
||||
Canvas.popDialog(EditorSettingsWindow);
|
||||
}
|
||||
else
|
||||
{
|
||||
ESettingsWindow.setVisible(true);
|
||||
Canvas.pushDialog(EditorSettingsWindow);
|
||||
|
||||
ESettingsWindow.selectWindow();
|
||||
ESettingsWindow.setCollapseGroup(false);
|
||||
|
||||
ESettingsWindowList.clear();
|
||||
}
|
||||
|
||||
ESettingsWindowList.setSelectedById( 1 );
|
||||
}
|
||||
}
|
||||
|
||||
function ESettingsWindow::toggleProjectSettings(%this)
|
||||
{
|
||||
|
|
@ -528,7 +529,7 @@ function ESettingsWindow::getAssetEditingSettings(%this)
|
|||
}
|
||||
|
||||
SettingsInspector.startGroup("Assets Importing");
|
||||
SettingsInspector.addField("Edit Asset Configs", "Edit Asset Import Configs", "button", "Open Asset Import Config Editor", "", "Canvas.pushDialog(AssetImportConfigEditor);");
|
||||
SettingsInspector.addField("Edit Import Configs", "Edit Asset Import Configs", "button", "Open Asset Import Config Editor", "", "Canvas.pushDialog(AssetImportConfigEditor);");
|
||||
SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList);
|
||||
SettingsInspector.addSettingsField("Assets/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @
|
||||
"will attempt to automatically import any inbound assets"@
|
||||
|
|
|
|||
BIN
Templates/BaseGame/game/tools/gui/images/stencilIcons/larger.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="larger_image"
|
||||
imageFile="@assetFile=larger.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="smaller_image"
|
||||
imageFile="@assetFile=smaller.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 7.4 KiB |
|
|
@ -163,7 +163,8 @@ new GuiControlProfile (ToolsGuiWindowProfile)
|
|||
opaque = false;
|
||||
border = 1;
|
||||
fillColor = EditorSettings.value("Theme/tabsColor");
|
||||
fillColorHL = EditorSettings.value("Theme/tabsColor");
|
||||
fillColorHL = EditorSettings.value("Theme/tabsHLColor");
|
||||
fillColorSEL = EditorSettings.value("Theme/tabsSELColor");
|
||||
fillColorNA = EditorSettings.value("Theme/tabsColor");
|
||||
fontColor = EditorSettings.value("Theme/headerTextColor");
|
||||
fontColorHL = EditorSettings.value("Theme/headerTextColor");
|
||||
|
|
|
|||
|
|
@ -512,7 +512,8 @@ function UVEditor::showDialog( %this, %applyCallback, %obj, %uv)
|
|||
else if( %material.cubemap.cubeFace[0] !$= "" )
|
||||
%previewImage = %material.cubemap.cubeFace[0];
|
||||
}
|
||||
UVEditor-->bitmapPreview.setBitmap(%previewImage);
|
||||
|
||||
UVEditor-->bitmapPreview.setBitmap(getAssetPreviewImage(%previewImage));
|
||||
|
||||
// Set up the color popup
|
||||
%popup = UVEditor-->colorPopup;
|
||||
|
|
|
|||
|
|
@ -1010,76 +1010,6 @@ $guiContent = new GuiControl(GuiEditorGui, EditorGuiGroup) {
|
|||
};
|
||||
};
|
||||
|
||||
new GuiTabPageCtrl() {
|
||||
fitBook = "1";
|
||||
text = "Library";
|
||||
maxLength = "1024";
|
||||
docking = "client";
|
||||
Margin = "-1 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "ToolsGuiTabPageProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 20";
|
||||
Extent = "223 734";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "0";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "toolboxPage";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "ToolsGuiScrollProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 0";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "true";
|
||||
lockVertScroll = "false";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
docking = "client";
|
||||
|
||||
new GuiStackControl(GuiEditorToolbox) {
|
||||
StackingType = "Vertical";
|
||||
HorizStacking = "Left to Right";
|
||||
VertStacking = "Top to Bottom";
|
||||
Padding = "2";
|
||||
DynamicSize = "1";
|
||||
ChangeChildSizeToFit = "1";
|
||||
ChangeChildPosition = "1";
|
||||
isContainer = "1";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
position = "3 3";
|
||||
Extent = "419 10008";
|
||||
MinExtent = "16 16";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
new GuiTabPageCtrl() {
|
||||
fitBook = "1";
|
||||
text = "Profiles";
|
||||
|
|
|
|||
|
|
@ -668,30 +668,6 @@ function GuiEditor::onControlDragged( %this, %payload, %position )
|
|||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
function GuiEditor::onControlDropped(%this, %payload, %position)
|
||||
{
|
||||
// Make sure we have the right kind of D&D.
|
||||
|
||||
if( !%payload.parentGroup.isInNamespaceHierarchy( "GuiDragAndDropControlType_GuiControl" ) &&
|
||||
!%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" ))
|
||||
return;
|
||||
|
||||
%pos = %payload.getGlobalPosition();
|
||||
%x = getWord(%pos, 0);
|
||||
%y = getWord(%pos, 1);
|
||||
|
||||
%asset = %payload.assetName;
|
||||
%cmd = "return new " @ %asset @ "();";
|
||||
%ctrl = eval( %cmd );
|
||||
|
||||
%this.addNewCtrl(%ctrl);
|
||||
|
||||
%ctrl.setPositionGlobal(%x, %y);
|
||||
%this.setFirstResponder();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
||||
function GuiEditor::onGainFirstResponder(%this)
|
||||
{
|
||||
%this.enableMenuItems(true);
|
||||
|
|
@ -1047,11 +1023,6 @@ function GuiEditorGui::onWake( %this )
|
|||
|
||||
%this.initSettings();
|
||||
%this.readSettings();
|
||||
|
||||
// Initialize toolbox.
|
||||
|
||||
if( !GuiEditorToolbox.isInitialized )
|
||||
GuiEditorToolbox.initialize();
|
||||
|
||||
// Set up initial menu toggle states.
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ $guiContent = new GuiControl(MaterialEditorGui,EditorGuiGroup) {
|
|||
HorizSizing = "left";
|
||||
tooltip = "Swap material on the object with existing";
|
||||
bitmapAsset = "ToolsModule:change_material_btn_n_image";
|
||||
command = "materialSelector.showDialog(\"MaterialEditorGui.showMaterialChangeSaveDialog\");";
|
||||
command = "MaterialEditorGui.swapMaterial();";
|
||||
};
|
||||
|
||||
new GuiTextEditCtrl(){
|
||||
|
|
|
|||
|
|
@ -95,11 +95,15 @@ function MaterialEditorGui::open(%this)
|
|||
|
||||
%sounds = "<None>" TAB "<Soft>" TAB "<Hard>" TAB "<Metal>" TAB "<Snow>"; // Default sounds
|
||||
|
||||
// Get custom sound datablocks
|
||||
foreach (%db in DataBlockSet)
|
||||
%assetQuery = new AssetQuery();
|
||||
AssetDatabase.findAssetType(%assetQuery, "SoundAsset");
|
||||
|
||||
%count = %assetQuery.getCount();
|
||||
// Get custom sound assets
|
||||
for(%i=0; %i < %count; %i++)
|
||||
{
|
||||
if (%db.isMemberOfClass("SFXTrack"))
|
||||
%sounds = %sounds TAB %db.getName();
|
||||
%assetId = %assetQuery.getAsset(%i);
|
||||
%sounds = %sounds TAB %assetId;
|
||||
}
|
||||
|
||||
%count = getFieldCount(%sounds);
|
||||
|
|
@ -265,6 +269,7 @@ function SubMaterialSelector::onSelect( %this )
|
|||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorGui.currentMaterialAsset = %material;
|
||||
%assetDef = AssetDatabase.acquireAsset(%material);
|
||||
%material = %assetDef.materialDefinitionName;
|
||||
}
|
||||
|
|
@ -461,6 +466,9 @@ function MaterialEditorGui::setActiveMaterial( %this, %material )
|
|||
MaterialEditorGui.lastMaterial = %material;
|
||||
|
||||
// we create or recreate a material to hold in a pristine state
|
||||
if(isObject(notDirtyMaterial))
|
||||
notDirtyMaterial.delete();
|
||||
|
||||
singleton Material(notDirtyMaterial)
|
||||
{
|
||||
mapTo = "matEd_mappedMat";
|
||||
|
|
@ -797,174 +805,92 @@ function MaterialEditorGui::guiSync( %this, %material )
|
|||
%layer = MaterialEditorGui.currentLayer;
|
||||
|
||||
//Diffuse
|
||||
if((%material).getDiffuseMap(%layer) !$= "" && (%material).getDiffuseMapAsset(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
%difAsset = (%material).getDiffuseMapAsset(%layer);
|
||||
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( (%material).getDiffuseMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( (%material).getDiffuseMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%diffuseMap = (%material).getDiffuseMap(%layer);
|
||||
%diffuseMapText = %diffuseMap !$= "" && %diffuseMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getDiffuseMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( %diffuseMapText );
|
||||
MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( getAssetPreviewImage(%diffuseMap) );
|
||||
|
||||
//Normal
|
||||
if((%material).getNormalMap(%layer) !$= "" && (%material).getNormalMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->normalMapNameText.setText( (%material).getNormalMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( (%material).getNormalMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->normalMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%normalMap = (%material).getNormalMap(%layer);
|
||||
%normalMapText = %normalMap !$= "" && %normalMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getNormalMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->normalMapNameText.setText( %normalMapText );
|
||||
MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( getAssetPreviewImage(%normalMap) );
|
||||
|
||||
//ORM Config
|
||||
if((%material).getORMConfigMap(%layer) !$= "" && (%material).getORMConfigMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
%ormMap = (%material).getORMConfigMap(%layer);
|
||||
%hasOrmMap = (%ormMap !$= "" && %ormMap !$=$MaterialEditor::emptyMaterialImage);
|
||||
%ormMapText = %hasOrmMap ? (%material).getORMConfigMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText(%ormMapText );
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( getAssetPreviewImage(%ormMap) );
|
||||
|
||||
//show or hide depending on if we have a map assigned here
|
||||
MaterialEditorPropertiesWindow-->RoughnessTextEdit.setVisible(!%hasOrmMap);
|
||||
MaterialEditorPropertiesWindow-->RoughnessSlider.setVisible(!%hasOrmMap);
|
||||
MaterialEditorPropertiesWindow-->MetalnessTextEdit.setVisible(!%hasOrmMap);
|
||||
MaterialEditorPropertiesWindow-->MetalnessSlider.setVisible(!%hasOrmMap);
|
||||
|
||||
if(%hasOrmMap)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->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-->ORMConfigMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
|
||||
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);
|
||||
}
|
||||
MaterialEditorPropertiesWindow-->isSRGBCheckbox.setVisible(%hasOrmMap);
|
||||
MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setVisible(%hasOrmMap);
|
||||
|
||||
//AOMap
|
||||
if((%material).getAOMap(%layer) !$= "" && (%material).getAOMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText( (%material).getAOMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( (%material).getAOMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%aoMap = (%material).getAOMap(%layer);
|
||||
%aoMapText = %aoMap !$= "" && %aoMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getAOMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->aoMapNameText.setText( %aoMapText );
|
||||
MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( getAssetPreviewImage(%aoMap) );
|
||||
|
||||
//RoughMap
|
||||
if((%material).getRoughMap(%layer) !$= "" && (%material).getRoughMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText( (%material).getRoughMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( (%material).getRoughMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%roughMap = (%material).getRoughMap(%layer);
|
||||
%roughMapText = %roughMap !$= "" && %roughMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getRoughMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->roughMapNameText.setText( %roughMapText );
|
||||
MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( getAssetPreviewImage(%roughMap) );
|
||||
|
||||
//MetalMap
|
||||
if((%material).getMetalMap(%layer) !$= "" && (%material).getMetalMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText( (%material).getMetalMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( (%material).getMetalMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%metalMap = (%material).getMetalMap(%layer);
|
||||
%metalMapText = %metalMap !$= "" && %metalMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getMetalMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->metalMapNameText.setText( %metalMapText );
|
||||
MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( getAssetPreviewImage(%metalMap) );
|
||||
|
||||
//GlowMap
|
||||
if((%material).getGlowMap(%layer) !$= "" && (%material).getGlowMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->glowMapNameText.setText( (%material).getGlowMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( (%material).getGlowMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->glowMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%glowMap = (%material).getGlowMap(%layer);
|
||||
%glowMapText = %glowMap !$= "" && %glowMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getGlowMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->glowMapNameText.setText( %glowMapText );
|
||||
MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( getAssetPreviewImage(%glowMap) );
|
||||
|
||||
//Overlay
|
||||
if((%material).getOverlayMap(%layer) !$= "" && (%material).getOverlayMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->overlayMapNameText.setText( (%material).getOverlayMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( (%material).getOverlayMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->overlayMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%overlayMap = (%material).getOverlayMap(%layer);
|
||||
%overlayMapText = %overlayMap !$= "" && %overlayMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getOverlayMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->overlayMapNameText.setText( %overlayMapText );
|
||||
MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( getAssetPreviewImage(%overlayMap) );
|
||||
|
||||
//Detail
|
||||
if((%material).getDetailMap(%layer) !$= "" && (%material).getDetailMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailMapNameText.setText( (%material).getDetailMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( (%material).getDetailMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%detailMap = (%material).getDetailMap(%layer);
|
||||
%detailMapText = %detailMap !$= "" && %detailMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getDetailMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->detailMapNameText.setText( %detailMapText );
|
||||
MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( getAssetPreviewImage(%detailMap) );
|
||||
|
||||
//Detail Normal
|
||||
if((%material).getDetailNormalMap(%layer) !$= "" && (%material).getDetailNormalMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( (%material).getDetailNormalMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( (%material).getDetailNormalMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%detailNormalMap = (%material).getDetailNormalMap(%layer);
|
||||
%detailNormalMapText = %detailNormalMap !$= "" && %detailNormalMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getDetailNormalMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( %detailNormalMapText );
|
||||
MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( getAssetPreviewImage(%detailNormalMap) );
|
||||
|
||||
//Light
|
||||
if((%material).getLightMap(%layer) !$= "" && (%material).getLightMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->lightMapNameText.setText( (%material).getLightMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( (%material).getLightMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->lightMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%lightMap = (%material).getLightMap(%layer);
|
||||
%lightMapText = %lightMap !$= "" && %lightMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getLightMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->lightMapNameText.setText( %lightMapText );
|
||||
MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( getAssetPreviewImage(%lightMap) );
|
||||
|
||||
//Tone
|
||||
if((%material).getToneMap(%layer) !$= "" && (%material).getToneMap(%layer) !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->toneMapNameText.setText( (%material).getToneMapAsset(%layer) );
|
||||
MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( (%material).getToneMap(%layer) );
|
||||
}
|
||||
else
|
||||
{
|
||||
MaterialEditorPropertiesWindow-->toneMapNameText.setText( "None" );
|
||||
MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage );
|
||||
}
|
||||
%toneMap = (%material).getToneMap(%layer);
|
||||
%toneMapText = %toneMap !$= "" && %toneMap !$=$MaterialEditor::emptyMaterialImage ? (%material).getToneMapAsset(%layer) : "None";
|
||||
MaterialEditorPropertiesWindow-->toneMapNameText.setText( %toneMapText );
|
||||
MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( getAssetPreviewImage(%toneMap) );
|
||||
|
||||
MaterialEditorPropertiesWindow-->accuScaleTextEdit.setText((%material).accuScale[%layer]);
|
||||
MaterialEditorPropertiesWindow-->accuScaleTextEdit.setText((%material).accuScale[%layer]);
|
||||
|
|
@ -1247,12 +1173,9 @@ function MaterialEditorGui::doUpdateTextureMap( %this, %assetId )
|
|||
%bitmapCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapDisplayBitmap", true );
|
||||
%textCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapNameText", true );
|
||||
|
||||
%assetDef = AssetDatabase.acquireAsset(%assetId);
|
||||
|
||||
%texture = %assetDef.getImagePath();
|
||||
%texture = getAssetPreviewImage(%assetId);
|
||||
|
||||
//%texture = MaterialEditorGui.openFile("texture");
|
||||
if( %texture !$= "" )
|
||||
if( %texture !$= "" && %texture !$= $MaterialEditor::emptyMaterialImage)
|
||||
{
|
||||
%bitmapCtrl.setBitmap(%texture);
|
||||
|
||||
|
|
@ -1309,7 +1232,7 @@ function MaterialEditorGui::updateScrollOffset(%this, %isSlider, %onMouseUp)
|
|||
%Y = MaterialEditorPropertiesWindow-->ScrollTextEditV.getText();
|
||||
MaterialEditorPropertiesWindow-->ScrollCrosshair.setPosition( -(23 * %X)+20, -(23 * %Y)+20);
|
||||
|
||||
MaterialEditorGui.updateActiveMaterial("scrollDir[" @ %layer @ "]","\"" @ %X SPC %Y @ "\"",%isSlider,%onMouseUp);
|
||||
MaterialEditorGui.updateActiveMaterial("scrollDir[" @ %layer @ "]",%X SPC %Y,%isSlider,%onMouseUp);
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateScrollSpeed(%this, %isSlider, %onMouseUp)
|
||||
|
|
@ -1428,13 +1351,13 @@ function MaterialEditorGui::updateAnimationFlags(%this)
|
|||
%action.oldValue = %oldFlags;
|
||||
MaterialEditorGui.submitUndo( %action );
|
||||
|
||||
materialEd_previewMaterial.animFlags[MaterialEditorGui.currentLayer] = %flags;
|
||||
materialEd_previewMaterial.setAnimFlags(MaterialEditorGui.currentLayer, %flags);
|
||||
materialEd_previewMaterial.flush();
|
||||
materialEd_previewMaterial.reload();
|
||||
|
||||
if (MaterialEditorGui.livePreview == true)
|
||||
{
|
||||
MaterialEditorGui.currentMaterial.animFlags[MaterialEditorGui.currentLayer] = %flags;
|
||||
MaterialEditorGui.currentMaterial.setAnimFlags(MaterialEditorGui.currentLayer, %flags);
|
||||
MaterialEditorGui.currentMaterial.flush();
|
||||
MaterialEditorGui.currentMaterial.reload();
|
||||
}
|
||||
|
|
@ -1504,7 +1427,7 @@ function MaterialEditorGui::updateBehaviorSound(%this, %type, %sound)
|
|||
}
|
||||
|
||||
%this.updateActiveMaterial(%type @ "SoundId", %defaultId);
|
||||
%this.updateActiveMaterial("custom" @ %type @ "Sound", %customName);
|
||||
%this.updateActiveMaterial("custom" @ %type @ "SoundAsset", %customName);
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateSoundPopup(%this, %type, %defaultId, %customName)
|
||||
|
|
@ -1945,8 +1868,8 @@ function MaterialEditorGui::showMaterialChangeSaveDialog( %this, %toMaterial )
|
|||
|
||||
toolsMessageBoxYesNoCancel("Save Material?",
|
||||
"The material " @ %fromMaterial.getName() @ " has unsaved changes. <br>Do you want to save before changing the material?",
|
||||
"MaterialEditorGui.saveDialogSave(" @ %toMaterial @ "); MaterialEditorGui.changeMaterial(" @ %fromMaterial @ ", " @ %toMaterial @ ");",
|
||||
"MaterialEditorGui.saveDialogDontSave(" @ %toMaterial @ "); MaterialEditorGui.changeMaterial(" @ %fromMaterial @ ", " @ %toMaterial @ ");",
|
||||
"MaterialEditorGui.saveDialogSave(\"" @ %toMaterial @ "\"); MaterialEditorGui.changeMaterial(" @ %fromMaterial @ ", \"" @ %toMaterial @ "\");",
|
||||
"MaterialEditorGui.saveDialogDontSave(\"" @ %toMaterial @ "\"); MaterialEditorGui.changeMaterial(" @ %fromMaterial @ ", \"" @ %toMaterial @ "\");",
|
||||
"MaterialEditorGui.saveDialogCancel();" );
|
||||
}
|
||||
|
||||
|
|
@ -1982,11 +1905,23 @@ function MaterialEditorGui::saveDialogDontSave( %this, %material )
|
|||
|
||||
MaterialEditorGui.setMaterialNotDirty();
|
||||
|
||||
if(AssetDatabase.isDeclaredAsset(%material))
|
||||
{
|
||||
MaterialEditorGui.currentMaterialAsset = %material;
|
||||
%material = AssetDatabase.acquireAsset(%material).materialDefinitionName;
|
||||
}
|
||||
|
||||
MaterialEditorGui.setActiveMaterial( %material );
|
||||
}
|
||||
|
||||
function MaterialEditorGui::saveDialogSave( %this, %material )
|
||||
{
|
||||
if(AssetDatabase.isDeclaredAsset(%material))
|
||||
{
|
||||
MaterialEditorGui.currentMaterialAsset = %material;
|
||||
%material = AssetDatabase.acquireAsset(%material).materialDefinitionName;
|
||||
}
|
||||
|
||||
MaterialEditorGui.save();
|
||||
MaterialEditorGui.setActiveMaterial( %material );
|
||||
}
|
||||
|
|
@ -2013,8 +1948,18 @@ function MaterialEditorGui::save( %this )
|
|||
if( %currentMaterial.isAutoGenerated() )
|
||||
%currentMaterial.setAutoGenerated( false );
|
||||
|
||||
// Save the material using the persistence manager
|
||||
matEd_PersistMan.saveDirty();
|
||||
if(MaterialEditorGui.currentMaterialAsset !$= "")
|
||||
{
|
||||
MaterialEditorGui.copyMaterials( materialEd_previewMaterial, notDirtyMaterial );
|
||||
|
||||
%assetDef = AssetDatabase.acquireAsset(MaterialEditorGui.currentMaterialAsset);
|
||||
%assetDef.saveAsset(); //write it out
|
||||
}
|
||||
else
|
||||
{
|
||||
// Save the material using the persistence manager
|
||||
matEd_PersistMan.saveDirty();
|
||||
}
|
||||
|
||||
// Clean up the Material Editor
|
||||
MaterialEditorGui.copyMaterials( materialEd_previewMaterial, notDirtyMaterial );
|
||||
|
|
@ -2273,16 +2218,35 @@ function MaterialEditorGui::changeMaterial(%this, %fromMaterial, %toMaterial)
|
|||
%materialTarget = SubMaterialSelector.text;
|
||||
%action.materialTarget = %materialTarget;
|
||||
|
||||
%toMaterialDefinition = %toMaterial;
|
||||
|
||||
%isMatAsset = false;
|
||||
if(AssetDatabase.isDeclaredAsset(%toMaterial))
|
||||
{
|
||||
%isMatAsset = true;
|
||||
MaterialEditorGui.currentMaterialAsset = %toMaterial;
|
||||
%assetDef = AssetDatabase.acquireAsset(%toMaterial);
|
||||
%toMaterialDefinition = %assetDef.materialDefinitionName;
|
||||
%filename = %assetDef.getScriptPath();
|
||||
}
|
||||
|
||||
%action.fromMaterial = %fromMaterial;
|
||||
%action.toMaterial = %toMaterial;
|
||||
%action.toMaterialOldFname = %toMaterial.getFilename();
|
||||
%action.toMaterialOldFname = %toMaterialDefinition.getFilename();
|
||||
%action.object = MaterialEditorGui.currentObject;
|
||||
|
||||
if( MaterialEditorGui.currentMeshMode $= "Model" ) // Models
|
||||
{
|
||||
%action.mode = "model";
|
||||
|
||||
MaterialEditorGui.currentObject.changeMaterial( %materialTarget, %fromMaterial.getName(), %toMaterial.getName() );
|
||||
if(!%isMatAsset)
|
||||
{
|
||||
MaterialEditorGui.currentObject.changeMaterial( %materialTarget, %fromMaterial.getName(), %toMaterialDefinition.getName() );
|
||||
}
|
||||
else
|
||||
{
|
||||
eval("MaterialEditorGui.currentObject." @ %materialTarget @ " = " @ %toMaterial);
|
||||
}
|
||||
|
||||
if( MaterialEditorGui.currentObject.shapeName !$= "" )
|
||||
%sourcePath = MaterialEditorGui.currentObject.shapeName;
|
||||
|
|
@ -2292,6 +2256,8 @@ function MaterialEditorGui::changeMaterial(%this, %fromMaterial, %toMaterial)
|
|||
%sourcePath = MaterialEditorGui.currentObject.getDatablock().shapeFile;
|
||||
}
|
||||
|
||||
if(!%isMatAsset)
|
||||
{
|
||||
// Creating "to" path
|
||||
%k = 0;
|
||||
while( strpos( %sourcePath, "/", %k ) != -1 )
|
||||
|
|
@ -2304,28 +2270,33 @@ function MaterialEditorGui::changeMaterial(%this, %fromMaterial, %toMaterial)
|
|||
|
||||
%action.toMaterialNewFname = %fileName;
|
||||
|
||||
MaterialEditorGui.prepareActiveMaterial( %toMaterial, true );
|
||||
if( !MaterialEditorGui.isMatEditorMaterial( %toMaterial ) )
|
||||
MaterialEditorGui.prepareActiveMaterial( %toMaterialDefinition, true );
|
||||
if( !MaterialEditorGui.isMatEditorMaterial( %toMaterialDefinition ) )
|
||||
{
|
||||
matEd_PersistMan.removeObjectFromFile(%toMaterial);
|
||||
matEd_PersistMan.removeObjectFromFile(%toMaterialDefinition);
|
||||
}
|
||||
}
|
||||
|
||||
matEd_PersistMan.setDirty(%fromMaterial);
|
||||
matEd_PersistMan.setDirty(%toMaterial, %fileName);
|
||||
matEd_PersistMan.setDirty(%toMaterialDefinition, %fileName);
|
||||
matEd_PersistMan.saveDirty();
|
||||
|
||||
matEd_PersistMan.removeDirty(%fromMaterial);
|
||||
matEd_PersistMan.removeDirty(%toMaterial);
|
||||
matEd_PersistMan.removeDirty(%toMaterialDefinition);
|
||||
}
|
||||
else // EditorShapes
|
||||
{
|
||||
%action.mode = "editorShapes";
|
||||
|
||||
MaterialEditorGui.currentObject.setFieldValue(SubMaterialSelector.getText(), %toMaterial.getName());
|
||||
if(!%isMatAsset)
|
||||
MaterialEditorGui.currentObject.setFieldValue(SubMaterialSelector.getText(), %toMaterialDefinition.getName());
|
||||
else
|
||||
MaterialEditorGui.currentObject.setFieldValue(SubMaterialSelector.getText(), %toMaterial);
|
||||
|
||||
if( MaterialEditorGui.currentObject.isMethod("postApply") )
|
||||
MaterialEditorGui.currentObject.postApply();
|
||||
|
||||
MaterialEditorGui.prepareActiveMaterial( %toMaterial, true );
|
||||
MaterialEditorGui.prepareActiveMaterial( %toMaterialDefinition, true );
|
||||
}
|
||||
|
||||
MaterialEditorGui.submitUndo( %action );
|
||||
|
|
@ -2454,3 +2425,12 @@ function MaterialEditorGui::saveCompositeMap(%this)
|
|||
saveCompositeTexture(%aoMap,%roughMap,%metalMap,"",%channelKey, %saveAs);
|
||||
%dlg.delete();
|
||||
}
|
||||
|
||||
function MaterialEditorGui::swapMaterial(%this)
|
||||
{
|
||||
AssetBrowser.showDialog("MaterialAsset", %this @ ".doSwapMaterial", "", "", "");
|
||||
}
|
||||
function MaterialEditorGui::doSwapMaterial(%this, %materialAsset)
|
||||
{
|
||||
MaterialEditorGui.showMaterialChangeSaveDialog(%materialAsset);
|
||||
}
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 845 B After Width: | Height: | Size: 1.4 KiB |
|
|
@ -91,13 +91,13 @@ function NavEditorPlugin::onWorldEditorStartup(%this)
|
|||
ENavEditorSettingsPage.init();
|
||||
|
||||
// Add items to World Editor Creator
|
||||
EWCreatorWindow.beginGroup("Navigation");
|
||||
ObjectCreator.beginGroup("Navigation");
|
||||
|
||||
EWCreatorWindow.registerMissionObject("CoverPoint", "Cover point");
|
||||
EWCreatorWindow.registerMissionObject("NavPath", "Nav Path");
|
||||
EWCreatorWindow.registerMissionObject("NavMesh", "Navigation mesh");
|
||||
ObjectCreator.registerMissionObject("CoverPoint", "Cover point");
|
||||
ObjectCreator.registerMissionObject("NavPath", "Nav Path");
|
||||
ObjectCreator.registerMissionObject("NavMesh", "Navigation mesh");
|
||||
|
||||
EWCreatorWindow.endGroup();
|
||||
ObjectCreator.endGroup();
|
||||
}
|
||||
|
||||
function ENavEditorSettingsPage::init(%this)
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ $guiContent = new GuiWindowCollapseCtrl(PE_Window) {
|
|||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
bitmapAsset = "ToolsModule:new_image";
|
||||
bitmapAsset = "ToolsModule:new_n_image";
|
||||
tooltip = "Create New Emitter";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
|
|
|
|||
|
|
@ -57,24 +57,11 @@ function PE_ParticleEditor::guiSync( %this )
|
|||
%popup.sort();
|
||||
%popup.setSelected( %data );
|
||||
|
||||
%bitmap = %data.getTexture();//MaterialEditorGui.searchForTexture( %data.getName(), %data.getTexture() );
|
||||
if( %bitmap !$= "" )
|
||||
{
|
||||
PE_ParticleEditor-->PEP_previewImage.setBitmap( %bitmap );
|
||||
|
||||
%text = %data.getTextureAsset();
|
||||
if(%text $= "")
|
||||
%text = %bitmap;
|
||||
|
||||
PE_ParticleEditor-->PEP_previewImageName.setText( %text );
|
||||
PE_ParticleEditor-->PEP_previewImageName.tooltip = %bitmap;
|
||||
}
|
||||
else
|
||||
{
|
||||
PE_ParticleEditor-->PEP_previewImage.setBitmap( "" );
|
||||
PE_ParticleEditor-->PEP_previewImageName.setText( "None" );
|
||||
PE_ParticleEditor-->PEP_previewImageName.tooltip = "None";
|
||||
}
|
||||
%bitmap = %data.getTexture();
|
||||
%bitmapText = %bitmap !$= "" && %bitmap !$= $MaterialEditor::emptyMaterialImage ? %data.getTextureAsset() : "None";
|
||||
PE_ParticleEditor-->PEP_previewImageName.setText( %bitmapText );
|
||||
PE_ParticleEditor-->PEP_previewImageName.tooltip = %bitmapText;
|
||||
PE_ParticleEditor-->PEP_previewImage.setBitmap( getAssetPreviewImage(%bitmap) );
|
||||
|
||||
PE_ParticleEditor-->PEP_inverseAlpha.setValue( %data.useInvAlpha );
|
||||
|
||||
|
|
@ -396,6 +383,9 @@ function PE_ParticleEditor::loadNewParticle( %this, %particle )
|
|||
else
|
||||
%particle = PEP_ParticleSelector.getSelected();
|
||||
|
||||
if( !isObject( %particle ) )
|
||||
return;
|
||||
|
||||
PE_ParticleEditor.currParticle = %particle;
|
||||
|
||||
error("PE_ParticleEditor::loadNewParticle() - Loading particle: " @ %particle.getName());
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="pre40ImporterGuis"
|
||||
GUIFile="@assetFile=pre40ImporterGuis.gui"
|
||||
ScriptFile="@assetFile=pre40ImporterGuis.tscript"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiContainer(Pre40ImporterPage0) {
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "1 1";
|
||||
extent = "539 429";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
new GuiMLTextCtrl() {
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
text = "Next, we'll import in content files, such as image, models and sounds.";
|
||||
useURLMouseCursor = "0";
|
||||
position = "111 21";
|
||||
extent = "328 28";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiMLTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiMLTextCtrl() {
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
text = "Processing...";
|
||||
useURLMouseCursor = "0";
|
||||
position = "152 141";
|
||||
extent = "245 14";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "processingText";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
|
||||
new GuiContainer(Pre40ImporterPage1) {
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "1 1";
|
||||
extent = "539 429";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
new GuiMLTextCtrl() {
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
text = "Now, we'll import in script-based files such as guis, levels and scripts.";
|
||||
useURLMouseCursor = "0";
|
||||
position = "111 21";
|
||||
extent = "328 28";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiMLTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiMLTextCtrl() {
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
text = "Processing...";
|
||||
useURLMouseCursor = "0";
|
||||
position = "152 141";
|
||||
extent = "245 14";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "processingText";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
//==============================================================================
|
||||
// We first copy over binary files(images, shapes, sounds, etc) to the destination
|
||||
// module, then run the processing/import on them to generate the assets
|
||||
//==============================================================================
|
||||
function Pre40ImporterPage0::openPage(%this)
|
||||
{
|
||||
ProjectImportWindow-->nextButton.setActive(false);
|
||||
%this-->processingText.setText("Processing...");
|
||||
Canvas.repaint();
|
||||
|
||||
//copy binary files over
|
||||
for(%i=0; %i < $ProjectImporter::FileList.count(); %i++)
|
||||
{
|
||||
%file = $ProjectImporter::FileList.getKey(%i);
|
||||
%rootFileSectionObject = $ProjectImporter::FileList.getValue(%i);
|
||||
if(%rootFileSectionObject.binaryFile == true)
|
||||
{
|
||||
%filePath = filePath(%file);
|
||||
%fileName = %rootFileSectionObject.fileName;
|
||||
%fileBase = %rootFileSectionObject.fileBase;
|
||||
%fileExt = %rootFileSectionObject.fileExt;
|
||||
|
||||
//filter out some unneeded folders
|
||||
%slashCount = getTokenCount(%filePath, "/");
|
||||
%topFolder = getToken(%filePath, "/", %slashCount-1);
|
||||
if(%topFolder $= "")
|
||||
%topFolder = getToken(%filePath, "/", %slashCount-2);
|
||||
|
||||
if(%topFolder $= "creator" || %topFolder $= "tools" || %topFolder $= "web")
|
||||
{
|
||||
%file = findNextFileMultiExpr( $ProjectImporter::sourceContentFolder @ "/*.*" );
|
||||
continue;
|
||||
}
|
||||
|
||||
%targetFilePath = strReplace(%file, $ProjectImporter::sourceContentFolder, $ProjectImporter::modulePath);
|
||||
|
||||
%sanitizedFilename = sanitizeString(%fileBase);
|
||||
if(startsWith(%sanitizedFilename, "_"))
|
||||
{
|
||||
%sanitizedFilename = getSubstr(%sanitizedFilename, 1, -1);
|
||||
}
|
||||
if(%sanitizedFilename !$= %fileBase)
|
||||
{
|
||||
%targetFilePath = filePath(%targetFilePath) @ "/" @ %sanitizedFilename @ %fileExt;
|
||||
}
|
||||
|
||||
%targetFolder = filePath(%targetFilePath);
|
||||
|
||||
if(!isDirectory(%targetFolder))
|
||||
{
|
||||
DirectoryHandler::createFolder(0, %targetFolder);
|
||||
}
|
||||
|
||||
if(!pathCopy(%file, %targetFilePath, false))
|
||||
{
|
||||
$ProjectImporter::log.add("Legacy Project Importer, failed to copy file: " @ %file @ " to destination: " @ %targetFilePath);
|
||||
continue;
|
||||
}
|
||||
|
||||
%rootFileSectionObject.localPath = %targetFilePath;
|
||||
|
||||
//If it was an asset definition file, go ahead and register it
|
||||
if(%rootFileSectionObject.isAssetFile)
|
||||
{
|
||||
%moduleName = AssetBrowser.dirHandler.getModuleFromAddress(%targetFilePath).ModuleId;
|
||||
%moduleDef = ModuleDatabase.findModule(%moduleName, 1);
|
||||
|
||||
AssetDatabase.addDeclaredAsset(%moduleDef, %targetFilePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Now, we need to do some initial importing processing
|
||||
T3Dpre4ProjectImporter.doContentImport();
|
||||
|
||||
//Once that's done, update the text of the UI
|
||||
%this-->processingText.setText("Done!");
|
||||
ProjectImportWindow-->nextButton.setActive(true);
|
||||
Canvas.repaint();
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// This page actually invokes the processing of the script-based files and objects
|
||||
//==============================================================================
|
||||
function Pre40ImporterPage1::openPage(%this)
|
||||
{
|
||||
ProjectImportWindow-->nextButton.setActive(false);
|
||||
%this-->processingText.setText("Processing...");
|
||||
Canvas.repaint();
|
||||
|
||||
//Now, we need to do some initial importing processing
|
||||
T3Dpre4ProjectImporter.doScriptImport();
|
||||
|
||||
//Once that's done, update the text of the UI
|
||||
%this-->processingText.setText("Done!");
|
||||
ProjectImportWindow-->nextButton.setActive(true);
|
||||
Canvas.repaint();
|
||||
}
|
||||
|
||||
|
|
@ -24,11 +24,6 @@ function initializeProjectImporter()
|
|||
echo(" % - Initializing Project Importer");
|
||||
|
||||
exec("./scripts/projectImporter." @ $TorqueScriptFileExtension);
|
||||
|
||||
//Versioned actions
|
||||
exec("./scripts/pre40/T3Dpre4ProjectImporter." @ $TorqueScriptFileExtension);
|
||||
|
||||
|
||||
exec("./guis/projectImporter.gui");
|
||||
|
||||
new ScriptObject( ProjectImporterPlugin )
|
||||
|
|
@ -41,6 +36,7 @@ function initializeProjectImporter()
|
|||
//Input::GetEventManager().subscribe( ProjectImportCtrl, "EndDropFiles" );
|
||||
|
||||
$ProjectImporter::importer = new AssetImporter();
|
||||
$ProjectImporter::importer.dumpLogs = false; //we'll handle the log files ourselves
|
||||
|
||||
%importConfig = new AssetImportConfig();
|
||||
%importConfig.loadImportConfig(AssetImportSettings, "LegacyProjectImport");
|
||||
|
|
|
|||
|
|
@ -1,6 +0,0 @@
|
|||
<ShapeAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="ReflectProbeSphere"
|
||||
fileName="@assetFile=ReflectProbeSphere.dae"
|
||||
constuctorFileName="@assetFile=ReflectProbeSphere.tscript" />
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
singleton TSShapeConstructor(ReflectProbeSpheredae)
|
||||
{
|
||||
baseShapeAsset = "ToolsModule:ReflectProbeSphere";
|
||||
singleDetailSize = "0";
|
||||
flipUVCoords = "0";
|
||||
JoinIdenticalVerts = "0";
|
||||
reverseWindingOrder = "0";
|
||||
removeRedundantMats = "0";
|
||||
animFPS = "2";
|
||||
};
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<ShapeAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="previewSphereShape"
|
||||
fileName="@assetFile=previewSphereShape.dae"
|
||||
constuctorFileName="@assetFile=previewSphereShape.tscript" />
|
||||