Skip to content

Commit

Permalink
Revamped UE4 integration:
Browse files Browse the repository at this point in the history
 - Many bug fixes and major improvements to workflow.
 - Added compatibility with UE4.25.
 - New First Steps Tutorial: https://www.noesisengine.com/docs/Gui.Core.UnrealTutorial.html
  • Loading branch information
s-fernandez-v committed Aug 1, 2020
1 parent dfca9d8 commit dcad0c1
Show file tree
Hide file tree
Showing 107 changed files with 2,949 additions and 1,561 deletions.
Binary file removed Content/Theme/Fonts/PT_Root_UI_Bold.uasset
Binary file not shown.
Binary file removed Content/Theme/Fonts/PT_Root_UI_Font.uasset
Binary file not shown.
Binary file removed Content/Theme/Fonts/PT_Root_UI_Regular.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkAqua.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkBlue.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkCrimson.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkEmerald.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkGreen.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkLime.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkOrange.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkPurple.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_DarkRed.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_LightAqua.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_LightBlue.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_LightGreen.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_LightLime.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_LightOrange.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_LightPurple.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Brushes_LightRed.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Colors_Dark.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Colors_Light.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkAqua.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkBlue.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkCrimson.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkEmerald.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkGreen.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkLime.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkOrange.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkPurple.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_DarkRed.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Fonts.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightAqua.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightBlue.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightCrimson.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightEmerald.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightGreen.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightLime.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightOrange.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightPurple.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_LightRed.uasset
Binary file not shown.
Binary file removed Content/Theme/NoesisTheme_Styles.uasset
Binary file not shown.
5 changes: 3 additions & 2 deletions NoesisGUI.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"Version": 1,
"VersionName": "GitHub",
"FriendlyName": "NoesisGUI",
"Description": "Lightweight cross-platform C++ game user interface library",
"Description": "Lightweight cross-platform C++ game user interface library based on XAML.",
"Category": "UI",
"CreatedBy": "Noesis Technologies",
"CreatedByURL": "https://www.noesisengine.com",
"DocsURL": "https://github.com/Noesis/UE4Plugin/blob/master/README.md",
"MarketplaceURL": "",
"SupportURL": "https://forums.noesisengine.com",
"EngineVersion": "4.24.0",
"EngineVersion": "4.25.0",
"CanContainContent": true,
"Installed": true,
"EnabledByDefault": false,
"Modules": [
{
"Name": "NoesisRuntime",
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a href="https://www.noesisengine.com/docs/Gui.Core.Index.html"><img alt="documentation" src="https://img.shields.io/badge/doc-index-blue.svg"></a>
<a href="https://twitter.com/NoesisEngine"><img src="https://img.shields.io/badge/twitter-%40NoesisEngine-55acee.svg?style=flat-square"></a>

# NoesisGUI Unreal Engine 4.24 Plugin
# NoesisGUI Unreal Engine 4.25 Plugin

> For your convenience, you can download a ready to use version of the plugin directly from [our website](https://www.noesisengine.com/developers/downloads.php). If you do so, you can skip the installation instructions and jump directly to the [Enabling and configuring the plugin](#enabling-and-configuring-the-plugin) section.
Expand Down Expand Up @@ -90,7 +90,6 @@ If all the steps so far have been successful, your Unreal Engine install should
```
[NoesisGUIRoot]
+-- Binaries
+-- Content
+-- Intermediate
+-- Resources
+-- Shaders
Expand Down
Binary file added Resources/About.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added Resources/RestartPreview_40x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
4 changes: 4 additions & 0 deletions Source/Noesis/Noesis.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ public Noesis(ReadOnlyTargetRules Target) : base(Target)
RuntimeDependencies.Add("$(EngineDir)" + NoesisDllTargetPath);
}
}
else if (Target.Platform == UnrealTargetPlatform.Linux)
{
PublicAdditionalLibraries.Add(NoesisBasePath + "Bin/linunx_x86_64/libNoesis.so");
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
PublicAdditionalLibraries.Add(NoesisBasePath + "Bin/macos/Noesis.dylib");
Expand Down
20 changes: 0 additions & 20 deletions Source/Noesis/NoesisSDK/COPY_NOESIS_SDK_HERE.txt

This file was deleted.

27 changes: 0 additions & 27 deletions Source/NoesisEditor/Classes/NoesisEditorUserSettings.h

This file was deleted.

2 changes: 1 addition & 1 deletion Source/NoesisEditor/Classes/NoesisXamlThumbnailRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ class UNoesisXamlThumbnailRenderer : public UDefaultSizedThumbnailRenderer

// UThumbnailRenderer interface
virtual bool CanVisualizeAsset(UObject* Object) override;
virtual void Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget*, FCanvas* Canvas) override;
virtual void Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget* Viewport, FCanvas* Canvas, bool bAdditionalViewFamily) override;
// End of UThumbnailRenderer interface
};
5 changes: 5 additions & 0 deletions Source/NoesisEditor/NoesisEditor.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public NoesisEditor(ReadOnlyTargetRules Target) : base(Target)
"RenderCore",
"Projects",
"Slate",
"ToolMenus",
"UMG",
"LevelEditor",
"WorkspaceMenuStructure",
"InputCore"
}
);

Expand Down
53 changes: 33 additions & 20 deletions Source/NoesisEditor/Private/K2Node_NoesisAssignAndNotify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static FText GetBaseTooltip(FName VarName)

}

static bool PropertyHasLocalRepNotify(UProperty const* VariableProperty)
static bool PropertyHasLocalRepNotify(FProperty const* VariableProperty)
{
if (VariableProperty != nullptr)
{
Expand Down Expand Up @@ -44,7 +44,7 @@ static bool PropertyHasLocalRepNotify(UProperty const* VariableProperty)
return false;
}

static FText GetPropertyTooltip(UProperty const* VariableProperty)
static FText GetPropertyTooltip(FProperty const* VariableProperty)
{
FText TextFormat;
FFormatNamedArguments Args;
Expand Down Expand Up @@ -116,7 +116,7 @@ static FText GetPropertyTooltip(UProperty const* VariableProperty)
}
}

static UBlueprintFieldNodeSpawner* CreateSpawnerFromMemberOrParam(TSubclassOf<UK2Node> Class, UProperty const* VarProperty)
static UBlueprintFieldNodeSpawner* CreateSpawnerFromMemberOrParam(TSubclassOf<UK2Node> Class, FProperty const* VarProperty)
{
check(VarProperty != nullptr);

Expand Down Expand Up @@ -158,16 +158,16 @@ static UBlueprintFieldNodeSpawner* CreateSpawnerFromMemberOrParam(TSubclassOf<UK
// Post-Spawn Setup
//--------------------------------------

auto MemberVarSetupLambda = [](UEdGraphNode* NewNode, UField const* InField)
auto MemberVarSetupLambda = [](UEdGraphNode* NewNode, FFieldVariant InField)
{
if (UProperty const* Property = Cast<UProperty>(InField))
if (FProperty const* Property = CastField<FProperty>(InField.ToField()))
{
UBlueprint* Blueprint = FBlueprintEditorUtils::FindBlueprintForNodeChecked(NewNode);
UClass* OwnerClass = Property->GetOwnerClass();

// We need to use a generated class instead of a skeleton class for IsChildOf, so if the OwnerClass has a Blueprint, grab the GeneratedClass
const bool bOwnerClassIsSelfContext = (Blueprint->SkeletonGeneratedClass->GetAuthoritativeClass() == OwnerClass) || Blueprint->SkeletonGeneratedClass->IsChildOf(OwnerClass);
const bool bIsFunctionVariable = Property->GetOuter()->IsA(UFunction::StaticClass());
const bool bIsFunctionVariable = Property->GetOwner<UFunction>() != nullptr;

UK2Node_NoesisAssignAndNotify* VarNode = CastChecked<UK2Node_NoesisAssignAndNotify>(NewNode);
VarNode->SetFromProperty(Property, bOwnerClassIsSelfContext && !bIsFunctionVariable, OwnerClass);
Expand Down Expand Up @@ -241,17 +241,17 @@ FText UK2Node_NoesisAssignAndNotify::GetTooltipText() const
void UK2Node_NoesisAssignAndNotify::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const
{
const UBlueprint* Blueprint = Cast<UBlueprint>(ActionRegistrar.GetActionKeyFilter());
if (Blueprint)
if (Blueprint && ActionRegistrar.IsOpenForRegistration(Blueprint))
{
for (TFieldIterator<UProperty> PropertyIt(Blueprint->SkeletonGeneratedClass, EFieldIteratorFlags::ExcludeSuper); PropertyIt; ++PropertyIt)
for (TFieldIterator<FProperty> PropertyIt(Blueprint->SkeletonGeneratedClass, EFieldIteratorFlags::ExcludeSuper); PropertyIt; ++PropertyIt)
{
UProperty* Property = *PropertyIt;
FProperty* Property = *PropertyIt;

bool const bIsAccessible = Property->HasAllPropertyFlags(CPF_BlueprintVisible);
bool const bIsReadOnly = Property->HasAllPropertyFlags(CPF_BlueprintReadOnly);
bool IsPropertyBlueprintVisible = !Property->HasAnyPropertyFlags(CPF_Parm) && bIsAccessible && !bIsReadOnly;

if (IsPropertyBlueprintVisible && ActionRegistrar.IsOpenForRegistration(Property))
if (IsPropertyBlueprintVisible)
{
UBlueprintNodeSpawner* SetterSpawner = CreateSpawnerFromMemberOrParam(UK2Node_NoesisAssignAndNotify::StaticClass(), Property);
ActionRegistrar.AddBlueprintAction(Blueprint, SetterSpawner);
Expand Down Expand Up @@ -295,7 +295,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com

if (CompilerContext.bIsFullCompile)
{
UProperty* VariableProperty = GetPropertyForVariable();
FProperty* VariableProperty = GetPropertyForVariable();

if (VariableProperty)
{
Expand All @@ -320,7 +320,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com

// Notify node
UK2Node_CallFunction* NotifyNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
if (VariableProperty->IsA<UArrayProperty>())
if (VariableProperty->IsA<FArrayProperty>())
{
NotifyNode->FunctionReference.SetExternalMember(TEXT("NotifyArrayChanged"), UNoesisFunctionLibrary::StaticClass());
}
Expand All @@ -343,7 +343,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com
UEdGraphPin* CompareNodeFirstInputPin = nullptr;
UEdGraphPin* CompareNodeSecondInputPin = nullptr;
UEdGraphPin* CompareNodeReturnValuePin = nullptr;
if (VariableProperty->IsA<UIntProperty>())
if (VariableProperty->IsA<FIntProperty>())
{
CompareNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
CompareNode->FunctionReference.SetExternalMember(TEXT("NotEqual_IntInt"), UKismetMathLibrary::StaticClass());
Expand All @@ -356,7 +356,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com
CompareNodeSecondInputPin = CompareNode->FindPin(TEXT("B"));
CompareNodeReturnValuePin = CompareNode->FindPin(TEXT("ReturnValue"));
}
else if (VariableProperty->IsA<UFloatProperty>())
else if (VariableProperty->IsA<FFloatProperty>())
{
CompareNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
CompareNode->FunctionReference.SetExternalMember(TEXT("NotEqual_FloatFloat"), UKismetMathLibrary::StaticClass());
Expand All @@ -369,7 +369,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com
CompareNodeSecondInputPin = CompareNode->FindPin(TEXT("B"));
CompareNodeReturnValuePin = CompareNode->FindPin(TEXT("ReturnValue"));
}
else if (VariableProperty->IsA<UBoolProperty>())
else if (VariableProperty->IsA<FBoolProperty>())
{
CompareNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
CompareNode->FunctionReference.SetExternalMember(TEXT("NotEqual_BoolBool"), UKismetMathLibrary::StaticClass());
Expand All @@ -382,7 +382,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com
CompareNodeSecondInputPin = CompareNode->FindPin(TEXT("B"));
CompareNodeReturnValuePin = CompareNode->FindPin(TEXT("ReturnValue"));
}
else if (VariableProperty->IsA<UStrProperty>())
else if (VariableProperty->IsA<FStrProperty>())
{
CompareNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
CompareNode->FunctionReference.SetExternalMember(TEXT("NotEqual_StrStr"), UKismetStringLibrary::StaticClass());
Expand All @@ -395,7 +395,20 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com
CompareNodeSecondInputPin = CompareNode->FindPin(TEXT("B"));
CompareNodeReturnValuePin = CompareNode->FindPin(TEXT("ReturnValue"));
}
else if (VariableProperty->IsA<UObjectProperty>())
else if (VariableProperty->IsA<FTextProperty>())
{
CompareNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
CompareNode->FunctionReference.SetExternalMember(TEXT("NotEqual_TextText"), UKismetTextLibrary::StaticClass());
CompareNode->AllocateDefaultPins();
CompareNodeExecPin = CompareNode->GetExecPin();
CompareNodeThenPin = CompareNode->FindPin(K2Schema->PN_Then);
UEdGraphPin* CompareNodeSelfPin = K2Schema->FindSelfPin(*CompareNode, EGPD_Input);
CompareNodeSelfPin->DefaultObject = UKismetStringLibrary::StaticClass()->GetDefaultObject();
CompareNodeFirstInputPin = CompareNode->FindPin(TEXT("A"));
CompareNodeSecondInputPin = CompareNode->FindPin(TEXT("B"));
CompareNodeReturnValuePin = CompareNode->FindPin(TEXT("ReturnValue"));
}
else if (VariableProperty->IsA<FObjectProperty>())
{
CompareNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
CompareNode->FunctionReference.SetExternalMember(TEXT("NotEqual_ObjectObject"), UKismetMathLibrary::StaticClass());
Expand All @@ -408,7 +421,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com
CompareNodeSecondInputPin = CompareNode->FindPin(TEXT("B"));
CompareNodeReturnValuePin = CompareNode->FindPin(TEXT("ReturnValue"));
}
else if (UStructProperty* StructProperty = Cast<UStructProperty>(VariableProperty))
else if (FStructProperty* StructProperty = CastField<FStructProperty>(VariableProperty))
{
CompareNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
CompareNode->FunctionReference.SetExternalMember(TEXT("NoesisStruct_NotEqual"), UNoesisFunctionLibrary::StaticClass());
Expand All @@ -424,7 +437,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com
CompareNodeFirstInputPin->PinType = VariableSetPin->PinType;
CompareNodeSecondInputPin->PinType = VariableSetPin->PinType;
}
else if (UByteProperty* ByteProperty = Cast<UByteProperty>(VariableProperty))
else if (FByteProperty* ByteProperty = CastField<FByteProperty>(VariableProperty))
{
CompareNode = CompilerContext.SpawnIntermediateNode<UK2Node_CallFunction>(this, SourceGraph);
CompareNode->FunctionReference.SetExternalMember(TEXT("NotEqual_ByteByte"), UKismetMathLibrary::StaticClass());
Expand All @@ -443,7 +456,7 @@ void UK2Node_NoesisAssignAndNotify::ExpandNode(class FKismetCompilerContext& Com
CompareNodeSecondInputPin->PinType = VariableSetPin->PinType;
}
}
else if (UArrayProperty* ArrayProperty = Cast<UArrayProperty>(VariableProperty))
else if (FArrayProperty* ArrayProperty = CastField<FArrayProperty>(VariableProperty))
{

}
Expand Down
16 changes: 16 additions & 0 deletions Source/NoesisEditor/Private/NoesisBlueprintApplicationMode.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
// NoesisGUI - http://www.noesisengine.com
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////

#include "NoesisBlueprintApplicationMode.h"

// NoesisEditor includes
#include "NoesisBlueprintEditor.h"
#include "NoesisBlueprintApplicationModes.h"

FNoesisBlueprintApplicationMode::FNoesisBlueprintApplicationMode(TSharedPtr<class FNoesisBlueprintEditor> InNoesisBlueprintEditor, FName InModeName)
: FBlueprintEditorApplicationMode(InNoesisBlueprintEditor, InModeName, FNoesisBlueprintApplicationModes::GetLocalizedMode, false, false)
, NoesisBlueprintEditor(InNoesisBlueprintEditor)
{
}
16 changes: 16 additions & 0 deletions Source/NoesisEditor/Private/NoesisBlueprintApplicationMode.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
// NoesisGUI - http://www.noesisengine.com
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////

#pragma once

class FNoesisBlueprintApplicationMode : public FBlueprintEditorApplicationMode
{
public:
FNoesisBlueprintApplicationMode(TSharedPtr<class FNoesisBlueprintEditor> InNoesisBlueprintEditor, FName InModeName);

TWeakPtr<class FNoesisBlueprintEditor> NoesisBlueprintEditor;

FWorkflowAllowedTabSet TabFactories;
};
30 changes: 30 additions & 0 deletions Source/NoesisEditor/Private/NoesisBlueprintApplicationModes.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
// NoesisGUI - http://www.noesisengine.com
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////

#include "NoesisBlueprintApplicationModes.h"

#define LOCTEXT_NAMESPACE "NoesisEditorModule"

const FName FNoesisBlueprintApplicationModes::PreviewMode("PreviewName");
const FName FNoesisBlueprintApplicationModes::GraphMode("GraphName");

FText FNoesisBlueprintApplicationModes::GetLocalizedMode(const FName InMode)
{
static TMap< FName, FText > LocModes;

if (LocModes.Num() == 0)
{
LocModes.Add(PreviewMode, LOCTEXT("PreviewName", "Preview"));
LocModes.Add(GraphMode, LOCTEXT("GraphName", "Graph"));
}

check(InMode != NAME_None);
const FText* OutDesc = LocModes.Find(InMode);
check(OutDesc);

return *OutDesc;
}

#undef LOCTEXT_NAMESPACE
17 changes: 17 additions & 0 deletions Source/NoesisEditor/Private/NoesisBlueprintApplicationModes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
// NoesisGUI - http://www.noesisengine.com
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////

#pragma once

struct FNoesisBlueprintApplicationModes
{
static const FName PreviewMode;
static const FName GraphMode;

static FText GetLocalizedMode(const FName InMode);

private:
FNoesisBlueprintApplicationModes() {}
};
10 changes: 8 additions & 2 deletions Source/NoesisEditor/Private/NoesisBlueprintAssetTypeActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

#include "NoesisBlueprintAssetTypeActions.h"

// NoesisEditor includes
#include "NoesisBlueprintEditor.h"

#define LOCTEXT_NAMESPACE "NoesisEditorModule"

FNoesisBlueprintAssetTypeActions::FNoesisBlueprintAssetTypeActions(EAssetTypeCategories::Type InCategories)
Expand Down Expand Up @@ -36,8 +39,11 @@ void FNoesisBlueprintAssetTypeActions::OpenAssetEditor(const TArray<UObject*>& I
auto Blueprint = Cast<UBlueprint>(*ObjIt);
if (Blueprint && Blueprint->SkeletonGeneratedClass && Blueprint->GeneratedClass)
{
FBlueprintEditorModule& BlueprintEditorModule = FModuleManager::LoadModuleChecked<FBlueprintEditorModule>("Kismet");
TSharedRef< IBlueprintEditor > NewKismetEditor = BlueprintEditorModule.CreateBlueprintEditor(Mode, EditWithinLevelEditor, Blueprint, false);
TSharedRef<FNoesisBlueprintEditor> NewBlueprintEditor(new FNoesisBlueprintEditor());

TArray<UBlueprint*> Blueprints;
Blueprints.Add(Blueprint);
NewBlueprintEditor->InitNoesisBlueprintEditor(Mode, EditWithinLevelEditor, Blueprints, false);
}
else
{
Expand Down
Loading

0 comments on commit dcad0c1

Please sign in to comment.