Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BlueprintRetarget.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
"MarketplaceURL": "",
"SupportURL": "",
"CanContainContent": false,
"IsBetaVersion": false,
"Installed": true,
"Modules": [
{
"Name": "BlueprintRetarget",
"Type": "Editor",
"LoadingPhase": "Default"
}
]
}
}
8 changes: 1 addition & 7 deletions Config/FilterPlugin.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll
/Docs/...
2 changes: 1 addition & 1 deletion Source/BlueprintRetarget/Private/BlueprintRetarget.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2020 Piperift. All Rights Reserved.
// Copyright 2015-2019 Piperift. All Rights Reserved.

#include "BlueprintRetarget.h"
#include "ContentBrowserExtensions.h"
Expand Down
20 changes: 11 additions & 9 deletions Source/BlueprintRetarget/Private/ContentBrowserExtensions.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2020 Piperift. All Rights Reserved.
// Copyright 2015-2019 Piperift. All Rights Reserved.

#include "ContentBrowserExtensions.h"

Expand Down Expand Up @@ -38,6 +38,8 @@

#define LOCTEXT_NAMESPACE "BlueprintRetarget"

DEFINE_LOG_CATEGORY_STATIC(LogBlueprintReparent, Log, All);


class FRetargetBlueprintFilter : public IClassViewerFilter
{
Expand Down Expand Up @@ -119,7 +121,7 @@ struct FRetargetClassExtension : public FContentBrowserSelectedAssetExtensionBas
for (auto AssetIt = SelectedAssets.CreateConstIterator(); AssetIt; ++AssetIt)
{
const FAssetData& AssetData = *AssetIt;
if (TAssetPtr<UBlueprint> BP = Cast<UBlueprint>(AssetData.GetAsset()))
if (TSoftObjectPtr<UBlueprint> BP = Cast<UBlueprint>(AssetData.GetAsset()))
{
BPs.Add(BP.Get());
}
Expand Down Expand Up @@ -157,9 +159,9 @@ struct FRetargetClassExtension : public FContentBrowserSelectedAssetExtensionBas
Options.bShowObjectRootClass = true;

Options.bIsBlueprintBaseOnly = true; // Only want blueprint base classes
Options.bShowUnloadedBlueprints = true;

Options.ClassFilter = PrepareFilter(BPs);
Options.bShowUnloadedBlueprints = true;
Options.ClassFilters.Add(PrepareFilter(BPs).ToSharedRef());
}

// Temporally hide custom picker from ClassPicker
Expand Down Expand Up @@ -265,7 +267,7 @@ struct FRetargetClassExtension : public FContentBrowserSelectedAssetExtensionBas
void ReparentBlueprint(UBlueprint* Blueprint, UClass* ChosenClass) {
check(Blueprint);

if ((Blueprint != nullptr) && (ChosenClass != nullptr) && (ChosenClass != Blueprint->ParentClass))
if ((Blueprint != NULL) && (ChosenClass != NULL) && (ChosenClass != Blueprint->ParentClass))
{
// Notify user, about common interfaces
bool bReparent = true;
Expand Down Expand Up @@ -373,7 +375,7 @@ struct FRetargetClassExtension : public FContentBrowserSelectedAssetExtensionBas

void EnsureBlueprintIsUpToDate(UBlueprint* Blueprint) {

// Purge any nullptr graphs
// Purge any NULL graphs
FBlueprintEditorUtils::PurgeNullGraphs(Blueprint);

// Make sure the blueprint is cosmetically up to date
Expand Down Expand Up @@ -467,7 +469,7 @@ class FBlueprintRetargetContentBrowserExtensions_Impl
MenuBuilder.AddMenuEntry(
LOCTEXT("RetargetClass", "Retarget invalid parent"),
LOCTEXT("RetargetClass_Tooltip", "Reparents a blueprint's parent class (Useful when parent class is missing or invalid)"),
FSlateIcon(FEditorStyle::GetStyleSetName(), "ClassIcon.Note"),
FSlateIcon(FAppStyle::GetAppStyleSetName(), "ClassIcon.Note"),
Action_RetargetClass,
NAME_None,
EUserInterfaceActionType::Button);
Expand Down Expand Up @@ -503,7 +505,7 @@ class FBlueprintRetargetContentBrowserExtensions_Impl
return ContentBrowserModule.GetAllAssetViewContextMenuExtenders();
}

static bool IsInvalidBlueprint(const TAssetPtr<UBlueprint>& BP) {
static bool IsInvalidBlueprint(const TSoftObjectPtr<UBlueprint>& BP) {
return BP && (!BP->SkeletonGeneratedClass || !BP->GeneratedClass);
}
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2020 Piperift. All Rights Reserved.
// Copyright 2015-2019 Piperift. All Rights Reserved.

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion Source/BlueprintRetarget/Public/BlueprintRetarget.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2020 Piperift. All Rights Reserved.
// Copyright 2015-2019 Piperift. All Rights Reserved.

#pragma once

Expand Down