Merge branch 'stabilization/2110' into Prism/DeleteUpdateGemsUI
commit
3d21a9f4bd
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cf441215a769562f88aa20711aee68dadcbf02597d1e2270547055e8e6aec6a3
|
||||
size 77
|
||||
@ -1,178 +0,0 @@
|
||||
----------------------------------------------------------------------------------------------------
|
||||
--
|
||||
-- Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
-- For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
--
|
||||
-- SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
--
|
||||
--
|
||||
--
|
||||
----------------------------------------------------------------------------------------------------
|
||||
Script.ReloadScript("scripts/Utils/EntityUtils.lua")
|
||||
|
||||
GeomCache =
|
||||
{
|
||||
Properties = {
|
||||
geomcacheFile = "EngineAssets/GeomCaches/defaultGeomCache.cax",
|
||||
bPlaying = 0,
|
||||
fStartTime = 0,
|
||||
bLooping = 0,
|
||||
objectStandIn = "",
|
||||
materialStandInMaterial = "",
|
||||
objectFirstFrameStandIn = "",
|
||||
materialFirstFrameStandInMaterial = "",
|
||||
objectLastFrameStandIn = "",
|
||||
materialLastFrameStandInMaterial = "",
|
||||
fStandInDistance = 0,
|
||||
fStreamInDistance = 0,
|
||||
Physics = {
|
||||
bPhysicalize = 0,
|
||||
}
|
||||
},
|
||||
|
||||
Editor={
|
||||
Icon = "animobject.bmp",
|
||||
IconOnTop = 1,
|
||||
},
|
||||
|
||||
bPlaying = 0,
|
||||
currentTime = 0,
|
||||
precacheTime = 0,
|
||||
bPrecachedOutputTriggered = false,
|
||||
}
|
||||
|
||||
function GeomCache:OnLoad(table)
|
||||
self.currentTime = table.currentTime;
|
||||
end
|
||||
|
||||
function GeomCache:OnSave(table)
|
||||
table.currentTime = self.currentTime;
|
||||
end
|
||||
|
||||
function GeomCache:OnSpawn()
|
||||
self.currentTime = self.Properties.fStartTime;
|
||||
self:SetFromProperties();
|
||||
end
|
||||
|
||||
function GeomCache:OnReset()
|
||||
self.currentTime = self.Properties.fStartTime;
|
||||
self.bPrecachedOutputTriggered = true;
|
||||
self:SetFromProperties();
|
||||
end
|
||||
|
||||
function GeomCache:SetFromProperties()
|
||||
local Properties = self.Properties;
|
||||
|
||||
if (Properties.geomcacheFile == "") then
|
||||
do return end;
|
||||
end
|
||||
|
||||
self:LoadGeomCache(0, Properties.geomcacheFile);
|
||||
|
||||
self.bPlaying = Properties.bPlaying;
|
||||
if (self.bPlaying == 0) then
|
||||
self.currentTime = Properties.fStartTime;
|
||||
end
|
||||
|
||||
self:SetGeomCachePlaybackTime(self.currentTime);
|
||||
self:SetGeomCacheParams(Properties.bLooping, Properties.objectStandIn, Properties.materialStandInMaterial, Properties.objectFirstFrameStandIn,
|
||||
Properties.materialFirstFrameStandInMaterial, Properties.objectLastFrameStandIn, Properties.materialLastFrameStandInMaterial,
|
||||
Properties.fStandInDistance, Properties.fStreamInDistance);
|
||||
self:SetGeomCacheStreaming(false, 0);
|
||||
|
||||
if (Properties.Physics.bPhysicalize == 1) then
|
||||
local tempPhysParams = EntityCommon.TempPhysParams;
|
||||
self:Physicalize(0, PE_ARTICULATED, tempPhysParams);
|
||||
end
|
||||
|
||||
self:Activate(1);
|
||||
end
|
||||
|
||||
function GeomCache:PhysicalizeThis()
|
||||
local Physics = self.Properties.Physics;
|
||||
EntityCommon.PhysicalizeRigid(self, 0, Physics, false);
|
||||
end
|
||||
|
||||
function GeomCache:OnUpdate(dt)
|
||||
if (self.bPlaying == 1) then
|
||||
self:SetGeomCachePlaybackTime(self.currentTime);
|
||||
end
|
||||
|
||||
if (self:IsGeomCacheStreaming() and not self.bPrecachedOutputTriggered) then
|
||||
local precachedTime = self:GetGeomCachePrecachedTime();
|
||||
if (precachedTime >= self.precacheTime) then
|
||||
self:ActivateOutput("Precached", true);
|
||||
self.bPrecachedOutputTriggered = true;
|
||||
end
|
||||
end
|
||||
|
||||
if (self.bPlaying == 1) then
|
||||
self.currentTime = self.currentTime + dt;
|
||||
end
|
||||
end
|
||||
|
||||
function GeomCache:OnPropertyChange()
|
||||
self:SetFromProperties();
|
||||
end
|
||||
|
||||
function GeomCache:Event_Start(sender, val)
|
||||
self.bPlaying = 1;
|
||||
end
|
||||
|
||||
function GeomCache:Event_Stop(sender, value)
|
||||
self.bPlaying = 0;
|
||||
end
|
||||
|
||||
function GeomCache:Event_SetTime(sender, value)
|
||||
self.currentTime = value;
|
||||
end
|
||||
|
||||
function GeomCache:Event_StartStreaming(sender, value)
|
||||
self.bPrecachedOutputTriggered = false;
|
||||
self:SetGeomCacheStreaming(true, self.currentTime);
|
||||
end
|
||||
|
||||
function GeomCache:Event_StopStreaming(sender, value)
|
||||
self:SetGeomCacheStreaming(false, 0);
|
||||
end
|
||||
|
||||
function GeomCache:Event_PrecacheTime(sender, value)
|
||||
self.precacheTime = value;
|
||||
end
|
||||
|
||||
function GeomCache:Event_Hide(sender, value)
|
||||
self:Hide(1);
|
||||
end
|
||||
|
||||
function GeomCache:Event_Unhide(sender, value)
|
||||
self:Hide(0);
|
||||
end
|
||||
|
||||
function GeomCache:Event_StopDrawing(sender, value)
|
||||
self:SetGeomCacheDrawing(false);
|
||||
end
|
||||
|
||||
function GeomCache:Event_StartDrawing(sender, value)
|
||||
self:SetGeomCacheDrawing(true);
|
||||
end
|
||||
|
||||
GeomCache.FlowEvents =
|
||||
{
|
||||
Inputs =
|
||||
{
|
||||
Start = { GeomCache.Event_Start, "any" },
|
||||
Stop = { GeomCache.Event_Stop, "any" },
|
||||
SetTime = { GeomCache.Event_SetTime, "float" },
|
||||
StartStreaming = { GeomCache.Event_StartStreaming, "any" },
|
||||
StopStreaming = { GeomCache.Event_StopStreaming, "any" },
|
||||
PrecacheTime = { GeomCache.Event_PrecacheTime, "float" },
|
||||
Hide = { GeomCache.Event_Hide, "any" },
|
||||
Unhide = { GeomCache.Event_Unhide, "any" },
|
||||
StopDrawing = { GeomCache.Event_StopDrawing, "any" },
|
||||
StartDrawing = { GeomCache.Event_StartDrawing, "any" },
|
||||
},
|
||||
Outputs =
|
||||
{
|
||||
Precached = "bool",
|
||||
},
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="15px" height="14px" viewBox="0 0 15 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>Icons / Hub / Download Copy 5</title>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Screen-1-Copy-80" transform="translate(-425.000000, -251.000000)">
|
||||
<g id="Icons-/-Hub-/-Download-Copy-5" transform="translate(424.573941, 250.098705)">
|
||||
<rect id="Icon-Background" x="0" y="0" width="16" height="16"></rect>
|
||||
<path d="M8,1.33333333 C11.6818983,1.33333333 14.6666667,4.31810167 14.6666667,8 C14.6666667,11.6818983 11.6818983,14.6666667 8,14.6666667 C4.31810167,14.6666667 1.33333333,11.6818983 1.33333333,8 C1.33333333,4.31810167 4.31810167,1.33333333 8,1.33333333 Z M12.0947571,4 L5.96649831,10.1282588 L3.60947571,7.77123617 L2.66666667,8.71404521 L5.96649831,12.0138769 L13.0375661,4.94280904 L12.0947571,4 Z" id="Combined-Shape" fill="#58BC61"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -1,37 +0,0 @@
|
||||
<ObjectStream version="3">
|
||||
<Class name="AZStd::vector" type="{82FC5264-88D0-57CD-9307-FC52E4DAD550}">
|
||||
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
|
||||
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
|
||||
<Class name="AZ::Uuid" field="guid" value="{1AE9C4CB-FF24-594B-BC2F-071268E0D6AB}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
</Class>
|
||||
<Class name="unsigned int" field="platformFlags" value="255" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
<Class name="AZStd::string" field="pathHint" value="engineassets/geomcaches/defaultgeomcache.cax" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
</Class>
|
||||
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
|
||||
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
|
||||
<Class name="AZ::Uuid" field="guid" value="{E9C38BAA-2A29-532E-AA92-4F66F95E8242}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
</Class>
|
||||
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
<Class name="AZStd::string" field="pathHint" value="engineassets/textures/defaults/spot_default.dds" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
</Class>
|
||||
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
|
||||
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
|
||||
<Class name="AZ::Uuid" field="guid" value="{0BFF7DC2-B7B0-530E-A70E-A082F7AF6678}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
</Class>
|
||||
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
<Class name="AZStd::string" field="pathHint" value="engineassets/materials/decals/default.mtl" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
</Class>
|
||||
<Class name="SeedInfo" field="element" version="2" type="{FACC3682-2ACA-4AA4-B85A-07AD276D18A0}">
|
||||
<Class name="AssetId" field="assetId" version="1" type="{652ED536-3402-439B-AEBE-4A5DBC554085}">
|
||||
<Class name="AZ::Uuid" field="guid" value="{1213DEB1-FC2B-566A-86AA-E82D93D8AE2F}" type="{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}"/>
|
||||
<Class name="unsigned int" field="subId" value="0" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
</Class>
|
||||
<Class name="unsigned int" field="platformFlags" value="127" type="{43DA906B-7DEF-4CA8-9790-854106D3F983}"/>
|
||||
<Class name="AZStd::string" field="pathHint" value="engineassets/materials/lens_optics.mtl" type="{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}"/>
|
||||
</Class>
|
||||
</Class>
|
||||
</ObjectStream>
|
||||
|
||||
Loading…
Reference in New Issue