Various minor improvements
This commit is contained in:
@@ -368,7 +368,7 @@ namespace FlaxEditor.Surface
|
||||
}
|
||||
if (!asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
var parameters = window.VisjectSurface.Parameters;
|
||||
|
||||
@@ -166,10 +166,9 @@ namespace FlaxEditor.Windows.Assets
|
||||
public override void Initialize(LayoutElementsContainer layout)
|
||||
{
|
||||
var proxy = (PropertiesProxy)Values[0];
|
||||
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
}
|
||||
if (!materialInstance.IsLoaded || (materialInstance.BaseMaterial && !materialInstance.BaseMaterial.IsLoaded))
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
var parameters = materialInstance.Parameters;
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (MeshesPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
proxy._materialSlotComboBoxes.Clear();
|
||||
@@ -402,7 +402,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (MaterialsPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (UVsPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -713,7 +713,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (ImportPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (PropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (MeshesPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
proxy._materialSlotComboBoxes.Clear();
|
||||
@@ -289,7 +289,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (SkeletonPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
var lods = proxy.Asset.LODs;
|
||||
@@ -492,7 +492,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (MaterialsPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (UVsPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -788,7 +788,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (RetargetPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
if (proxy.Setups == null)
|
||||
@@ -998,7 +998,7 @@ namespace FlaxEditor.Windows.Assets
|
||||
var proxy = (ImportPropertiesProxy)Values[0];
|
||||
if (proxy.Asset == null || !proxy.Asset.IsLoaded)
|
||||
{
|
||||
layout.Label("Loading...");
|
||||
layout.Label("Loading...", TextAlignment.Center);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ AnimSubGraph* AnimGraphBase::LoadSubGraph(const void* data, int32 dataLength, co
|
||||
auto subGraph = New<AnimSubGraph>(_graph);
|
||||
|
||||
// Load graph
|
||||
MemoryReadStream stream((byte*)data, dataLength);
|
||||
MemoryReadStream stream((const byte*)data, dataLength);
|
||||
if (subGraph->Load(&stream, false))
|
||||
{
|
||||
// Load failed
|
||||
|
||||
@@ -92,7 +92,6 @@ public:
|
||||
}
|
||||
|
||||
#if USE_PRECISE_MESH_INTERSECTS
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collision proxy used by the mesh.
|
||||
/// </summary>
|
||||
@@ -100,7 +99,6 @@ public:
|
||||
{
|
||||
return _collisionProxy;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
@@ -155,15 +155,6 @@ public:
|
||||
/// <returns>True whether the two objects intersected</returns>
|
||||
bool Intersects(const Ray& ray, const Transform& transform, Real& distance, Vector3& normal) const;
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the eight corners of the bounding box.
|
||||
/// </summary>
|
||||
/// <param name="corners">An array of points representing the eight corners of the bounding box.</param>
|
||||
FORCE_INLINE void GetCorners(Vector3 corners[8]) const
|
||||
{
|
||||
_box.GetCorners(corners);
|
||||
}
|
||||
|
||||
public:
|
||||
/// <summary>
|
||||
/// Draws the mesh. Binds vertex and index buffers and invokes the draw call.
|
||||
|
||||
@@ -135,8 +135,7 @@ BoundingBox SkinnedModelLOD::GetBox(const Matrix& world) const
|
||||
for (int32 j = 0; j < Meshes.Count(); j++)
|
||||
{
|
||||
const auto& mesh = Meshes[j];
|
||||
mesh.GetCorners(corners);
|
||||
|
||||
mesh.GetBox().GetCorners(corners);
|
||||
for (int32 i = 0; i < 8; i++)
|
||||
{
|
||||
Vector3::Transform(corners[i], world, tmp);
|
||||
@@ -154,7 +153,7 @@ BoundingBox SkinnedModelLOD::GetBox(const Matrix& world, int32 meshIndex) const
|
||||
Vector3 tmp, min = Vector3::Maximum, max = Vector3::Minimum;
|
||||
Vector3 corners[8];
|
||||
const auto& mesh = Meshes[meshIndex];
|
||||
mesh.GetCorners(corners);
|
||||
mesh.GetBox().GetCorners(corners);
|
||||
for (int32 i = 0; i < 8; i++)
|
||||
{
|
||||
Vector3::Transform(corners[i], world, tmp);
|
||||
@@ -172,8 +171,7 @@ BoundingBox SkinnedModelLOD::GetBox() const
|
||||
Vector3 corners[8];
|
||||
for (int32 j = 0; j < Meshes.Count(); j++)
|
||||
{
|
||||
Meshes[j].GetCorners(corners);
|
||||
|
||||
Meshes[j].GetBox().GetCorners(corners);
|
||||
for (int32 i = 0; i < 8; i++)
|
||||
{
|
||||
min = Vector3::Min(min, corners[i]);
|
||||
|
||||
Reference in New Issue
Block a user