Commit 15fb776a by wester

Merge branch 'Assimp' of ssh://git.breab.org:2223/kai/MasterTestProjekt into Assimp

# Conflicts: # Content/MobileStarterContent/Maps/Minimal_Default.umap # Content/MobileStarterContent/Maps/Minimal_Default_BuiltData.uasset # Source/MasterTestProject/ue4-assimp/ProceduralEntity.cpp
parents 8495d8c4 113e3ce1
...@@ -23,6 +23,9 @@ public: ...@@ -23,6 +23,9 @@ public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Generation") UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Generation")
FString _filePath; FString _filePath;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Materials")
UMaterialInterface * MasterMaterialRef;
// Sets default values for this actor's properties // Sets default values for this actor's properties
AProceduralEntity(); AProceduralEntity();
...@@ -37,6 +40,12 @@ public: ...@@ -37,6 +40,12 @@ public:
UFUNCTION(BlueprintCallable, Category = ProceduralEntity) UFUNCTION(BlueprintCallable, Category = ProceduralEntity)
void loadModelFromBlueprint(); void loadModelFromBlueprint();
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Materials")
TMap<int32, UMaterialInterface *> MaterialMap;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Materials")
UTexture2D* diffTexture;
private: private:
int32 _selectedVertex; int32 _selectedVertex;
int32 _meshCurrentlyProcessed; int32 _meshCurrentlyProcessed;
...@@ -51,6 +60,8 @@ private: ...@@ -51,6 +60,8 @@ private:
TArray<TArray<FVector2D>> _uvs; TArray<TArray<FVector2D>> _uvs;
TArray<TArray<FProcMeshTangent>> _tangents; TArray<TArray<FProcMeshTangent>> _tangents;
TArray<TArray<FColor>> _vertexColors; TArray<TArray<FColor>> _vertexColors;
//USceneComponent* _rootComp; //USceneComponent* _rootComp;
...@@ -67,4 +78,8 @@ private: ...@@ -67,4 +78,8 @@ private:
void processMesh(aiMesh* mesh, const aiScene* scene); void processMesh(aiMesh* mesh, const aiScene* scene);
void processNode(aiNode* node, const aiScene* scene); void processNode(aiNode* node, const aiScene* scene);
void loadModel(std::string path); void loadModel(std::string path);
UMaterialInterface *GetMaterialForIndex(unsigned int index, const aiScene* scene);
UTexture2D* LoadTexture(FString Folder, FString FileName);
UTexture2D* Victory_LoadTexture2D_FromFile(const FString& FullFilePath, bool& IsValid, int32& Width, int32& Height);
}; };
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment