Skip to content

Commit

Permalink
0_8_0
Browse files Browse the repository at this point in the history
  • Loading branch information
DigiKrafting committed Sep 10, 2019
1 parent d84f6c0 commit 4be4d9f
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 14 deletions.
Binary file modified Blender_Importer/Binaries/Win64/UE4Editor-Blender_Importer.dll
Binary file not shown.
Binary file modified Blender_Importer/Binaries/Win64/UE4Editor-Blender_Importer.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Blender_Importer/Blender_Importer.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "0.7.0",
"VersionName": "0.8.0",
"FriendlyName": "Blender Importer",
"Description": "Blender Addon UE Importer",
"Category": "Importers",
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

#include "BJD_Processer.h"
#include "Import_BJD_Processer.h"

#include "AssetRegistryModule.h"
#include "Editor/UnrealEd/Public/Editor.h"
Expand All @@ -22,7 +22,7 @@

#define LOCTEXT_NAMESPACE "FBlender_ImporterModule"

bool FBJD_Processer::Process_JSON_Open(const FString& Filename)
bool FImport_BJD_Processer::Process_JSON_Open(const FString& Filename)
{

FString JsonString;
Expand All @@ -48,7 +48,14 @@ bool FBJD_Processer::Process_JSON_Open(const FString& Filename)

}

UFbxImportUI* FBJD_Processer::Process_Options() {
bool FImport_BJD_Processer::Process_Auto()
{

return JsonObject->GetBoolField(TEXT("Auto"));

}

UFbxImportUI* FImport_BJD_Processer::Process_Options() {

UFbxImportUI* FBX_Options = NewObject<UFbxImportUI>();

Expand Down Expand Up @@ -119,7 +126,8 @@ UFbxImportUI* FBJD_Processer::Process_Options() {
return FBX_Options;

}
bool FBJD_Processer::Process_Materials()

bool FImport_BJD_Processer::Process_Materials()
{

const FString data_path = JsonObject->GetStringField(TEXT("Path"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved.

#include "Import_FBX_Factory.h"
#include "BJD_Processer.h"
#include "Import_BJD_Processer.h"
#include "Misc/Paths.h"
#include "AssetImportTask.h"
#include "Factories/FbxImportUI.h"
Expand All @@ -23,7 +23,7 @@ UImport_FBX_Factory::UImport_FBX_Factory(const FObjectInitializer& ObjectInitial
bOperationCanceled = false;
bDetectImportTypeOnImport = true;
ImportPriority = 200;

}

bool UImport_FBX_Factory::FactoryCanImport(const FString& Filename)
Expand All @@ -45,20 +45,20 @@ UObject* UImport_FBX_Factory::FactoryCreateFile(UClass* InClass, UObject* InPare

UObject* CreatedObject = NULL;

FBJD_Processer BJD_Processer;
FImport_BJD_Processer Import_BJD_Processer;

const FString JSON_Filename = Filename.Replace(TEXT(".fbx"), TEXT(".bjd"));

if (BJD_Processer.Process_JSON_Open(JSON_Filename)) {
if (Import_BJD_Processer.Process_JSON_Open(JSON_Filename)) {

UAssetImportTask* Task = NewObject<UAssetImportTask>();
Task->bAutomated = true;
Task->Options = BJD_Processer.Process_Options();;
Task->bAutomated = Import_BJD_Processer.Process_Auto();
Task->Options = Import_BJD_Processer.Process_Options();
SetAssetImportTask(Task);

CreatedObject = Super::FactoryCreateFile(InClass, InParent, InName, Flags, Filename, Parms, Warn, bOutOperationCanceled);

const bool _processed_materials = BJD_Processer.Process_Materials();
const bool _processed_materials = Import_BJD_Processer.Process_Materials();

remove(TCHAR_TO_ANSI(*JSON_Filename));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
#include "Factories/FbxAnimSequenceImportData.h"
#include "Factories/FbxImportUI.h"

class FBJD_Processer
class FImport_BJD_Processer
{

public:

bool Process_JSON_Open(const FString& Filename);
UFbxImportUI* Process_Options();
bool Process_Materials();

bool Process_Auto();

private:

TSharedPtr<FJsonObject> JsonObject;
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ This plugin utilises the standard built in FBX import by using "UFbxFactory" as
### {fbx_file_name}.bjd
~~~
{
"Auto": true,
"Path":"Meshes/Test/",
"Options":{
"ImportMesh":true,
Expand Down

0 comments on commit 4be4d9f

Please sign in to comment.