Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glTFLoader
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kai Westerkamp
glTFLoader
Commits
6c3f8ba7
Commit
6c3f8ba7
authored
Jan 30, 2017
by
Kai Westerkamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compile and execute
parent
e838ab2a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
9 deletions
+14
-9
UE4Editor-GLTFLoader.dll
Binaries/Win64/UE4Editor-GLTFLoader.dll
+0
-0
UE4Editor.modules
Binaries/Win64/UE4Editor.modules
+3
-2
GLTFFactory.cpp
Source/GLTFLoader/Private/GLTFFactory.cpp
+2
-2
GLTFLoader.cpp
Source/GLTFLoader/Private/GLTFLoader.cpp
+7
-3
GLTFMeshBuilder.cpp
Source/GLTFLoader/Private/GLTFMeshBuilder.cpp
+0
-0
GLTFMeshBuilder.h
Source/GLTFLoader/Private/GLTFMeshBuilder.h
+2
-2
No files found.
Binaries/Win64/UE4Editor-GLTFLoader.dll
View file @
6c3f8ba7
No preview for this file type
Binaries/Win64/UE4Editor.modules
View file @
6c3f8ba7
{
{
"Changelist" : 3013449,
"Changelist" : 3249277,
"BuildId" : "521bff43-3bc1-4230-8558-29af88fc728e",
"CompatibleChangelist" : 3195953,
"BuildId" : "afcfff98-97a3-4269-9c38-2ec2156cd5a3",
"Modules" :
"Modules" :
{
{
"GLTFLoader" : "UE4Editor-GLTFLoader.dll"
"GLTFLoader" : "UE4Editor-GLTFLoader.dll"
...
...
Source/GLTFLoader/Private/GLTFFactory.cpp
View file @
6c3f8ba7
...
@@ -32,7 +32,7 @@ UGLTFFactory::UGLTFFactory(const FObjectInitializer& ObjectInitializer)
...
@@ -32,7 +32,7 @@ UGLTFFactory::UGLTFFactory(const FObjectInitializer& ObjectInitializer)
bDetectImportTypeOnImport
=
false
;
bDetectImportTypeOnImport
=
false
;
}
}
//This function is adapted from
UFbxFactory
::CreateBinary()
//This function is adapted from
::CreateBinary()
UObject
*
UGLTFFactory
::
FactoryCreateBinary
UObject
*
UGLTFFactory
::
FactoryCreateBinary
(
(
UClass
*
Class
,
UClass
*
Class
,
...
@@ -123,7 +123,7 @@ UObject* UGLTFFactory::FactoryCreateBinary
...
@@ -123,7 +123,7 @@ UObject* UGLTFFactory::FactoryCreateBinary
int32
NodeIndex
=
0
;
int32
NodeIndex
=
0
;
int32
ImportedMeshCount
=
0
;
int32
ImportedMeshCount
=
0
;
UStaticMesh
*
NewStaticMesh
=
NULL
;
UStaticMesh
Component
*
NewStaticMesh
=
NULL
;
if
(
bCombineMeshes
)
if
(
bCombineMeshes
)
{
{
...
...
Source/GLTFLoader/Private/GLTFLoader.cpp
View file @
6c3f8ba7
...
@@ -216,7 +216,8 @@ TSharedRef<SDockTab> FGLTFLoaderModule::OnSpawnPluginTab(const FSpawnTabArgs& Sp
...
@@ -216,7 +216,8 @@ TSharedRef<SDockTab> FGLTFLoaderModule::OnSpawnPluginTab(const FSpawnTabArgs& Sp
void
FGLTFLoaderModule
::
OpenImportWindow
()
void
FGLTFLoaderModule
::
OpenImportWindow
()
{
{
TArray
<
FString
>
Filenames
;
/*
//TArray<FString> Filenames;
if (FDesktopPlatformModule::Get()->OpenFileDialog(nullptr,
if (FDesktopPlatformModule::Get()->OpenFileDialog(nullptr,
TEXT("Choose a GLTF file to import"),
TEXT("Choose a GLTF file to import"),
...
@@ -230,11 +231,14 @@ void FGLTFLoaderModule::OpenImportWindow()
...
@@ -230,11 +231,14 @@ void FGLTFLoaderModule::OpenImportWindow()
{
{
UE_LOG(LogTemp, Log, TEXT("File: %s"), *File);
UE_LOG(LogTemp, Log, TEXT("File: %s"), *File);
}
}
*/
FAssetToolsModule
&
AssetToolsModule
=
FModuleManager
::
Get
().
LoadModuleChecked
<
FAssetToolsModule
>
(
"AssetTools"
);
FAssetToolsModule
&
AssetToolsModule
=
FModuleManager
::
Get
().
LoadModuleChecked
<
FAssetToolsModule
>
(
"AssetTools"
);
TArray
<
FString
>
Filenames
;
Filenames
.
Add
(
"D:/Dropbox/Studium/MasterArbeit/glTF-Sample-Models/1.0/Box/glTF/Box.gltf"
);
AssetToolsModule
.
Get
().
ImportAssets
(
Filenames
,
FString
(
"/Game/Content"
));
AssetToolsModule
.
Get
().
ImportAssets
(
Filenames
,
FString
(
"/Game/Content"
));
}
//
}
}
}
void
FGLTFLoaderModule
::
PluginButtonClicked
()
void
FGLTFLoaderModule
::
PluginButtonClicked
()
...
...
Source/GLTFLoader/Private/GLTFMeshBuilder.cpp
View file @
6c3f8ba7
This diff is collapsed.
Click to expand it.
Source/GLTFLoader/Private/GLTFMeshBuilder.h
View file @
6c3f8ba7
...
@@ -56,7 +56,7 @@ public:
...
@@ -56,7 +56,7 @@ public:
/// @param InName The name of the package to be saved.
/// @param InName The name of the package to be saved.
/// @param Flags Metadata used for the creation of the new package.
/// @param Flags Metadata used for the creation of the new package.
/// @param InStaticMesh A pointer to the StaticMesh to be built and have this new geometry added to it.
/// @param InStaticMesh A pointer to the StaticMesh to be built and have this new geometry added to it.
UStaticMesh
*
ImportStaticMeshAsSingle
(
UObject
*
InParent
,
TArray
<
FString
>&
MeshNameArray
,
const
FName
InName
,
EObjectFlags
Flags
,
UStaticMesh
*
InStaticMesh
);
UStaticMesh
Component
*
ImportStaticMeshAsSingle
(
UObject
*
InParent
,
TArray
<
FString
>&
MeshNameArray
,
const
FName
InName
,
EObjectFlags
Flags
,
UStaticMeshComponent
*
InStaticMesh
);
/// Obtains the geometry data from the file and adds it to the RawMesh ready to be built for the StaticMesh.
/// Obtains the geometry data from the file and adds it to the RawMesh ready to be built for the StaticMesh.
/// This function mirrors that in FFbxImporter of the same name.
/// This function mirrors that in FFbxImporter of the same name.
...
@@ -65,7 +65,7 @@ public:
...
@@ -65,7 +65,7 @@ public:
/// @param MeshMaterials An array of materials to convert to those used by the engine and send to the build process.
/// @param MeshMaterials An array of materials to convert to those used by the engine and send to the build process.
/// @param LODIndex Level of detail for this mesh - currently unused i.e. always 0.
/// @param LODIndex Level of detail for this mesh - currently unused i.e. always 0.
/// @param RawMesh The intermediate container for the data between the external format (glTF in our case) and the built StaticMesh.
/// @param RawMesh The intermediate container for the data between the external format (glTF in our case) and the built StaticMesh.
bool
BuildStaticMeshFromGeometry
(
tinygltf
::
Mesh
*
Mesh
,
UStaticMesh
*
StaticMesh
,
int
LODIndex
,
FRawMesh
&
RawMesh
);
bool
BuildStaticMeshFromGeometry
(
tinygltf
::
Mesh
*
Mesh
,
UStaticMesh
Component
*
StaticMesh
,
int
LODIndex
,
FRawMesh
&
RawMesh
);
/// Material/texture system does nothing currently.
/// Material/texture system does nothing currently.
UMaterialInterface
*
ToUMaterial
(
tinygltf
::
Material
*
Material
);
UMaterialInterface
*
ToUMaterial
(
tinygltf
::
Material
*
Material
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment