# How to use the blueprint of GLTF Exporter

**URL:** <https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960>\
**Category:** Pipeline & Plugins\
**Tags:** ImportExport, unreal-engine, UE5-0, Plugins, question\
**Created:** [July 25, 2022, 3:44pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960 "2022-07-25T15:44:58Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlvaroArranzCity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlvaroArranzCity](https://forums.unrealengine.com/u/AlvaroArranzCity)\
**Post date:** [July 25, 2022, 3:44pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/1 "2022-07-25T15:44:58Z")

</div>

Hi everyone!

I am trying to use the GLTF exporter through the blueprint, but I don’t see any result at the moment. I am not sure what should I put into the inputs and I don’t find any documentation

Any idea of what should I use ?  
That I want is to export a single object from Datasmith, that I have selected, to a GLTF file with its Metadata

Thank you

 ![GLTF export](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/e/d/aed862c4ea61a6f2e56dc978c74ebe5709c9ddcf.png)

---

<div class="post-metadata">

**Author:** ![UE\_FlavienP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ue_flavienp/32/1194546_2.png) [@UE\_FlavienP](https://forums.unrealengine.com/u/UE_FlavienP)\
**Post date:** [July 25, 2022, 4:39pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/2 "2022-07-25T16:39:12Z")

</div>

If you want to import an actor from the scene you are doing good but you still need to pass the level to the “object” input.

I think you could try to get it by taking your “part selected” \> get level \> get outer object.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/e/e5e2614ef5a915ac094327fcd5084fe25fdb7042.png)

---

<div class="post-metadata">

**Author:** ![AlvaroArranzCity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlvaroArranzCity](https://forums.unrealengine.com/u/AlvaroArranzCity)\
**Post date:** [July 25, 2022, 6:59pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/3 "2022-07-25T18:59:40Z")

</div>

Thank you @UE_FlavienP,  
With the changes you told me, I am able to export the whole level in a gltf file.

But, instead of that, that I need is to export a single file with the selected part.

The scene is composed of a building that I imported using Datasmith, so I have a building with its hierarchy of parts.  
In my blueprints I have some functionality to walk around the building and select and highlight parts doing Raycast. That’s the way I get the unique part of the building that I want to export.

What we need at the final is to have a gltf with the same hierarchy that we can see in Unreal after importing it using Datasmith. And if this is not possible to do using a single export from the root of the model, (we tried to export in edit time, using the export from the menu, and it didn’t export any hierarchy)  
the other approach that we are looking for is exporting all elements individually.

Thanks again. I appreciate your help

---

<div class="post-metadata">

**Author:** ![AlvaroArranzCity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlvaroArranzCity](https://forums.unrealengine.com/u/AlvaroArranzCity)\
**Post date:** [July 25, 2022, 7:09pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/4 "2022-07-25T19:09:53Z")

</div>

I just noticed that the “SelectedActors” input is to filter and export only the wanted parts. So I think I get it now.

So my main doubt right now is if this exporter can put all the metadata of the object into the gltf file… Or I need to do something manually or some modification in C++

---

<div class="post-metadata">

**Author:** ![UE\_FlavienP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ue_flavienp/32/1194546_2.png) [@UE\_FlavienP](https://forums.unrealengine.com/u/UE_FlavienP)\
**Post date:** [July 25, 2022, 7:12pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/5 "2022-07-25T19:12:40Z")

</div>

First you need to make sure that on runtime import the hierarchy option is to keep full hierarchy and prevent datastmith to bundle all in one actor ( I think you are already doing that).

Second, correct my method will export full level if you pass an empty Set of selected actors. If you pass only the actors you want in the selected actors Set. Only those should be exported in your glTF file.

By default the glTF export should preserve the hierarchy of elements you are exporting. You should be able to check that if you open the glTF in a DCC such as blender.

You can also create a variable of glTFExportOption and edit its options to your needs and pass it to the “Export to glTF” function.

---

<div class="post-metadata">

**Author:** ![AlvaroArranzCity](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AlvaroArranzCity](https://forums.unrealengine.com/u/AlvaroArranzCity)\
**Post date:** [July 26, 2022, 4:37pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/6 "2022-07-26T16:37:09Z")

</div>

Hi Flavien. This is good, thank you for your help. I tried to create the export options variable via blueprints but I don’t see any block with that Make function. Is it possible to do with blueprint? or should I use C++ for that?

---

<div class="post-metadata">

**Author:** ![UE\_FlavienP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ue_flavienp/32/1194546_2.png) [@UE\_FlavienP](https://forums.unrealengine.com/u/UE_FlavienP)\
**Post date:** [July 26, 2022, 5:37pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/7 "2022-07-26T17:37:16Z")

</div>

You could try something like that:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/1/0/31002f36fd6e9e3e79dac6f8e220223c1781814f.png)

then you can set variables on the gltfExportOptions variable before using it in the export to gltf function.

---

<div class="post-metadata">

**Author:** ![cgiteach](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cgiteach/32/559818_2.png) [@cgiteach](https://forums.unrealengine.com/u/cgiteach)\
**Post date:** [August 4, 2022, 1:11pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/8 "2022-08-04T13:11:52Z")

</div>

I’m using UE5. The gltfExportOptions just wants to reference something from the content browser, there are no options to set in the variable. But I can’t figure out how to create that type of asset in the content browser.  
Does anyone have a sample of this BP working for any kind of mesh?

---

<div class="post-metadata">

**Author:** ![Razivoid](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Razivoid](https://forums.unrealengine.com/u/Razivoid)\
**Post date:** [August 13, 2022, 5:03pm UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/9 "2022-08-13T17:03:53Z")

</div>

Here’s an export setup using UE4.27.2 with custom selection:

1. Create **BP\_ExportManager** Blueprint with **Export** Custom Event
2. Mark **ExportSelectedActors** var to be editable
3. Drag the manager into the level and populate **ExportSelectedActors**
4. Setup a trigger event: **Export** through a Widget UI or keystroke

 ![gltf-exporter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/7/d3719f5697c0f0d45193cdf666cdadb2677050e1.png)

---

<div class="post-metadata">

**Author:** ![cgiteach](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cgiteach/32/559818_2.png) [@cgiteach](https://forums.unrealengine.com/u/cgiteach)\
**Post date:** [August 19, 2022, 10:12am UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/10 "2022-08-19T10:12:54Z")

</div>

Can you, Razivoid, please share with us how you set up the GltfExportOptions ? I can make it as a variable but it will reference a content browser item from where it doesn’t seem to be possible to create such an asset.

---

<div class="post-metadata">

**Author:** ![UE\_FlavienP](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ue_flavienp/32/1194546_2.png) [@UE\_FlavienP](https://forums.unrealengine.com/u/UE_FlavienP)\
**Post date:** [August 19, 2022, 10:50am UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/11 "2022-08-19T10:50:51Z")

</div>

1. Drag the Options pin and “promote to variable”  

2. You will still need to do the Construct GltfExportOptions on “begin play”/“Event Construct” to initialize the variable. Select “construct object from class” function + Select “gltf export options” in the class variable of your function.

3. Fill it the way you want. All variables can be found in the options instance  

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/c/2/ac2f01a42fa84615789c776d30241a0c90896424.png)

---

<div class="post-metadata">

**Author:** ![UnrealVijay](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/unrealvijay/32/773990_2.png) [@UnrealVijay](https://forums.unrealengine.com/u/UnrealVijay)\
**Post date:** [January 12, 2024, 1:37am UTC](https://forums.unrealengine.com/t/how-to-use-the-blueprint-of-gltf-exporter/613960/13 "2024-01-12T01:37:02Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/5/7/b576ac97907a70e8cc374c4932eb30d92d27b942.png)
