Merge remote-tracking branch 'origin/master' into navigation-features

# Conflicts:
#	Source/Editor/Content/Settings/NavigationSettings.cs
#	Source/Engine/Engine/PhysicalMaterial.cs
#	Source/Tools/Flax.Build/Bindings/BindingsGenerator.Api.cs
This commit is contained in:
Wojtek Figat
2021-01-04 14:31:56 +01:00
2425 changed files with 4606 additions and 30937 deletions

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using Newtonsoft.Json;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
namespace FlaxEditor.Content.Create
{

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Settings;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEditor.GUI;
using FlaxEditor.GUI.Drag;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEditor.GUI.Drag;
using FlaxEditor.SceneGraph;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
namespace FlaxEditor.Content
{

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
namespace FlaxEditor.Content.Import
{

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.ComponentModel;
using System.Reflection;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.ComponentModel;
using System.Runtime.CompilerServices;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using System.ComponentModel;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.IO;
@@ -58,7 +58,7 @@ namespace FlaxEditor.Content
public override bool OnMouseDoubleClick(Vector2 location, MouseButton button)
{
return Item.OnMouseDoubleClick(Item.ScreenToClient(ClientToScreen(location)), button);
return Item.OnMouseDoubleClick(Item.PointFromScreen(PointToScreen(location)), button);
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Text;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.Text;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#include "PreviewsCache.h"
#include "Engine/Core/Log.h"

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
#pragma once

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.IO;

View File

@@ -1,6 +1,7 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Threading.Tasks;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
using FlaxEngine;
@@ -40,5 +41,29 @@ namespace FlaxEditor.Content
if (Editor.CreateAsset(Editor.NewAssetType.CollisionData, outputPath))
throw new Exception("Failed to create new asset.");
}
/// <summary>
/// Create collision data from model.
/// </summary>
/// <param name="model">The associated model.</param>
public void CreateCollisionDataFromModel(Model model)
{
Action<ContentItem> created = contentItem =>
{
var ai = (AssetItem)contentItem;
var cd = FlaxEngine.Content.LoadAsync<CollisionData>(ai.ID);
if (cd == null || cd.WaitForLoaded())
{
Editor.LogError("Failed to load created collision data.");
return;
}
Task.Run(() =>
{
Editor.CookMeshCollision(ai.Path, CollisionDataType.TriangleMesh, model);
});
};
Editor.Instance.Windows.ContentWin.NewItem(this, null, created);
}
}
}

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.GUI.ContextMenu;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEditor.Windows;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Create;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,7 +1,8 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.Viewport.Previews;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
@@ -39,6 +40,19 @@ namespace FlaxEditor.Content
/// <inheritdoc />
public override Type AssetType => typeof(Model);
/// <inheritdoc />
public override void OnContentWindowContextMenu(ContextMenu menu, ContentItem item)
{
base.OnContentWindowContextMenu(menu, item);
menu.AddButton("Generate collision data", () =>
{
var model = FlaxEngine.Content.LoadAsync<Model>(((ModelAssetItem)item).ID);
var cdProxy = (CollisionDataProxy)Editor.Instance.ContentDatabase.GetProxy<CollisionData>();
cdProxy.CreateCollisionDataFromModel(model);
});
}
/// <inheritdoc />
public override void OnThumbnailDrawPrepare(ThumbnailRequest request)
{

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Create;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Create;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Windows;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Content.Thumbnails;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.ComponentModel;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.ComponentModel;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using System.Runtime.CompilerServices;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.ComponentModel;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.ComponentModel;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.ComponentModel;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.ComponentModel;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEngine;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.Collections.Generic;
using FlaxEditor.GUI;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System.IO;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using FlaxEngine.GUI;

View File

@@ -1,4 +1,4 @@
// Copyright (c) 2012-2020 Wojciech Figat. All rights reserved.
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
namespace FlaxEditor.Content
{