-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'support-reimport-asset-operation'
- Loading branch information
Showing
13 changed files
with
276 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2016-2018 mik14a / Admix Network. All Rights Reserved. | ||
|
||
#include "VoxAssetImportData.h" | ||
|
||
UVoxAssetImportData::UVoxAssetImportData() | ||
: VoxImportType(EVoxImportType::StaticMesh) | ||
, bImportXForward(true) | ||
, bImportXYCenter(true) | ||
, Scale(10.f) | ||
{ | ||
} | ||
|
||
void UVoxAssetImportData::ToVoxImportOption(UVoxImportOption& OutVoxImportOption) | ||
{ | ||
OutVoxImportOption.VoxImportType = VoxImportType; | ||
OutVoxImportOption.bImportXForward = bImportXForward; | ||
OutVoxImportOption.bImportXYCenter = bImportXYCenter; | ||
OutVoxImportOption.Scale = Scale; | ||
OutVoxImportOption.BuildSettings.BuildScale3D = FVector(Scale); | ||
} | ||
|
||
void UVoxAssetImportData::FromVoxImportOption(const UVoxImportOption& VoxImportOption) | ||
{ | ||
VoxImportType = VoxImportOption.VoxImportType; | ||
bImportXForward = VoxImportOption.bImportXForward; | ||
bImportXYCenter = VoxImportOption.bImportXYCenter; | ||
Scale = VoxImportOption.Scale; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2016-2018 mik14a / Admix Network. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "EditorFramework/AssetImportData.h" | ||
#include "VoxImportOption.h" | ||
#include "VoxAssetImportData.generated.h" | ||
|
||
/** | ||
* | ||
*/ | ||
UCLASS() | ||
class UVoxAssetImportData : public UAssetImportData | ||
{ | ||
GENERATED_BODY() | ||
|
||
public: | ||
|
||
EVoxImportType VoxImportType; | ||
|
||
UPROPERTY(EditAnywhere, Category = Generic) | ||
uint32 bImportXForward : 1; | ||
|
||
UPROPERTY(EditAnywhere, Category = Generic) | ||
uint32 bImportXYCenter : 1; | ||
|
||
UPROPERTY(EditAnywhere, Category = Generic) | ||
float Scale; | ||
|
||
public: | ||
|
||
UVoxAssetImportData(); | ||
|
||
void ToVoxImportOption(UVoxImportOption& OutVoxImportOption); | ||
|
||
void FromVoxImportOption(const UVoxImportOption& VoxImportOption); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,6 @@ class UVoxImportOption : public UObject | |
|
||
FMeshBuildSettings BuildSettings; | ||
|
||
friend class UVoxAssetImportData; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2016-2018 mik14a / Admix Network. All Rights Reserved. | ||
|
||
#include "VoxelAssetTypeActions.h" | ||
|
||
FVoxelAssetTypeActions::FVoxelAssetTypeActions() | ||
{ | ||
} | ||
|
||
FText FVoxelAssetTypeActions::GetName() const | ||
{ | ||
return NSLOCTEXT("VOX4U", "VoxelAssetTypeActionsName", "Voxel Asset Type Actions."); | ||
} | ||
|
||
UClass* FVoxelAssetTypeActions::GetSupportedClass() const | ||
{ | ||
return UVoxel::StaticClass(); | ||
} | ||
|
||
FColor FVoxelAssetTypeActions::GetTypeColor() const | ||
{ | ||
return FColor::Cyan; | ||
} | ||
|
||
uint32 FVoxelAssetTypeActions::GetCategories() | ||
{ | ||
return EAssetTypeCategories::Misc; | ||
} | ||
|
||
bool FVoxelAssetTypeActions::IsImportedAsset() const | ||
{ | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2016-2018 mik14a / Admix Network. All Rights Reserved. | ||
|
||
#pragma once | ||
|
||
#include "CoreMinimal.h" | ||
#include "AssetTypeActions_Base.h" | ||
|
||
class FVoxelAssetTypeActions : public FAssetTypeActions_Base | ||
{ | ||
public: | ||
FVoxelAssetTypeActions(); | ||
|
||
virtual FText GetName() const override; | ||
|
||
virtual UClass* GetSupportedClass() const override; | ||
|
||
virtual FColor GetTypeColor() const override; | ||
|
||
virtual uint32 GetCategories() override; | ||
|
||
virtual bool IsImportedAsset() const override; | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.