Rename PluginInfo.LoadedFromType to PluginLoadedFrom.

[CL 2521047 by Ben Marsh in Main branch]
This commit is contained in:
Ben Marsh
2015-04-22 10:28:54 -04:00
committed by Ben.Marsh@epicgames.com
parent f26a552270
commit 1b1e409efd
2 changed files with 14 additions and 14 deletions

View File

@@ -8,18 +8,18 @@ using System.Linq;
namespace UnrealBuildTool
{
public enum PluginLoadedFrom
{
// Plugin is built-in to the engine
Engine,
// Project-specific plugin, stored within a game project directory
GameProject
}
[DebuggerDisplay("\\{{FileName}\\}")]
public class PluginInfo
{
public enum LoadedFromType
{
// Plugin is built-in to the engine
Engine,
// Project-specific plugin, stored within a game project directory
GameProject
};
// Plugin name
public readonly string Name;
@@ -33,14 +33,14 @@ namespace UnrealBuildTool
public PluginDescriptor Descriptor;
// Where does this plugin live?
public LoadedFromType LoadedFrom;
public PluginLoadedFrom LoadedFrom;
/// <summary>
/// Constructs a PluginInfo object
/// </summary>
/// <param name="InFileName"></param>
/// <param name="InLoadedFrom">Where this pl</param>
public PluginInfo(string InFileName, LoadedFromType InLoadedFrom)
public PluginInfo(string InFileName, PluginLoadedFrom InLoadedFrom)
{
Name = Path.GetFileNameWithoutExtension(InFileName);
FileName = Path.GetFullPath(InFileName);
@@ -65,7 +65,7 @@ namespace UnrealBuildTool
string EnginePluginsDir = Path.Combine(BuildConfiguration.RelativeEnginePath, "Plugins");
foreach(string PluginFileName in EnumeratePlugins(EnginePluginsDir))
{
PluginInfo Plugin = new PluginInfo(PluginFileName, PluginInfo.LoadedFromType.Engine);
PluginInfo Plugin = new PluginInfo(PluginFileName, PluginLoadedFrom.Engine);
Plugins.Add(Plugin);
}
@@ -75,7 +75,7 @@ namespace UnrealBuildTool
string ProjectPluginsDir = Path.Combine(Path.GetDirectoryName(ProjectFileName), "Plugins");
foreach(string PluginFileName in EnumeratePlugins(ProjectPluginsDir))
{
PluginInfo Plugin = new PluginInfo(PluginFileName, PluginInfo.LoadedFromType.GameProject);
PluginInfo Plugin = new PluginInfo(PluginFileName, PluginLoadedFrom.GameProject);
Plugins.Add(Plugin);
}
}

View File

@@ -308,7 +308,7 @@ namespace UnrealBuildTool
/// <returns>True if the plugin should be enabled for this project</returns>
public static bool IsPluginEnabledForProject(PluginInfo Plugin, ProjectDescriptor Project, UnrealTargetPlatform Platform)
{
bool bEnabled = Plugin.Descriptor.bEnabledByDefault || Plugin.LoadedFrom == PluginInfo.LoadedFromType.GameProject;
bool bEnabled = Plugin.Descriptor.bEnabledByDefault || Plugin.LoadedFrom == PluginLoadedFrom.GameProject;
if(Project != null && Project.Plugins != null)
{
foreach(PluginReferenceDescriptor PluginReference in Project.Plugins)