5 #include "DatasmithMaterialElements.h"
6 #include "IDatasmithSceneElements.h"
19 bool ParseFile(
const FString& InFilename, TSharedRef< IDatasmithScene >& OutScene,
bool bInAppend =
false);
20 bool ParseBuffer(
const FString& XmlBuffer, TSharedRef< IDatasmithScene >& OutScene,
bool bInAppend =
false);
23 bool ParseXmlFile(TSharedRef< IDatasmithScene >& OutScene,
bool bInAppend =
false);
25 void PatchUpVersion(TSharedRef< IDatasmithScene >& OutScene);
27 void ParseElement(FXmlNode* InNode, TSharedRef<IDatasmithElement> OutElement)
const;
28 void ParseLevelSequence(FXmlNode* InNode,
const TSharedRef<IDatasmithLevelSequenceElement>& OutElement)
const;
29 void ParseMesh(FXmlNode* InNode, TSharedPtr<IDatasmithMeshElement>& OutElement)
const;
30 void ParseTextureElement(FXmlNode* InNode, TSharedPtr<IDatasmithTextureElement>& OutElement)
const;
32 void ParseTransform(FXmlNode* InNode, TSharedPtr< IDatasmithActorElement >& OutElement)
const;
33 FTransform ParseTransform(FXmlNode* InNode)
const;
34 void ParseActor(FXmlNode* InNode, TSharedPtr<IDatasmithActorElement>& InOutElement, TSharedRef< IDatasmithScene > Scene, TMap< FString, TSharedPtr<IDatasmithActorElement> >& Actors)
const;
35 void ParseMeshActor(FXmlNode* InNode, TSharedPtr<IDatasmithMeshActorElement>& OutElement, TSharedRef< IDatasmithScene > Scene)
const;
36 void ParseHierarchicalInstancedStaticMeshActor(FXmlNode* InNode, TSharedPtr<IDatasmithHierarchicalInstancedStaticMeshActorElement>& OutElement, TSharedRef< IDatasmithScene > Scene)
const;
37 void ParseLight(FXmlNode* InNode, TSharedPtr<IDatasmithLightActorElement>& OutElement)
const;
38 void ParseCamera(FXmlNode* InNode, TSharedPtr<IDatasmithCameraActorElement>& OutElement)
const;
39 void ParsePostProcess(FXmlNode* InNode,
const TSharedPtr< IDatasmithPostProcessElement >& Element)
const;
40 void ParsePostProcessVolume(FXmlNode* InNode,
const TSharedRef< IDatasmithPostProcessVolumeElement >& Element)
const;
41 void ParseColor(FXmlNode* InNode, FLinearColor& OutColor)
const;
42 void ParseComp(FXmlNode* InNode, TSharedPtr< IDatasmithCompositeTexture >& OutCompTexture,
bool bInIsNormal =
false)
const;
43 void ParseMaterial(FXmlNode* InNode, TSharedPtr< IDatasmithMaterialElement >& OutElement)
const;
44 void ParseMasterMaterial(FXmlNode* InNode, TSharedPtr< IDatasmithMasterMaterialElement >& OutElement)
const;
45 void ParseUEPbrMaterial(FXmlNode* InNode, TSharedPtr< IDatasmithUEPbrMaterialElement >& OutElement)
const;
46 void ParseCustomActor(FXmlNode* InNode, TSharedPtr< IDatasmithCustomActorElement >& OutElement)
const;
47 void ParseMetaData(FXmlNode* InNode, TSharedPtr< IDatasmithMetaDataElement >& OutElement,
const TSharedRef< IDatasmithScene >& InScene, TMap< FString, TSharedPtr<IDatasmithActorElement> >& Actors)
const;
48 void ParseLandscape(FXmlNode* InNode, TSharedRef< IDatasmithLandscapeElement >& OutElement)
const;
50 template<
typename ElementType >
51 void ParseKeyValueProperties(
const FXmlNode* InNode, ElementType& OutElement)
const;
53 bool LoadFromFile(
const FString& InFilename);
54 bool LoadFromBuffer(
const FString& XmlBuffer);
56 FString ResolveFilePath(
const FString& InAssetFile)
const;
58 FQuat QuatFromHexString(
const FString& HexString)
const;
60 TUniquePtr< FXmlFile > XmlFile;