# Filter by material on Datasmith-imported Static Meshes?

**URL:** <https://forums.unrealengine.com/t/filter-by-material-on-datasmith-imported-static-meshes/1137336>\
**Category:** Pipeline & Plugins\
**Tags:** Dataprep, unreal-engine, question\
**Created:** [April 22, 2023, 8:50pm UTC](https://forums.unrealengine.com/t/filter-by-material-on-datasmith-imported-static-meshes/1137336 "2023-04-22T20:50:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PMcKenzie2004](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PMcKenzie2004](https://forums.unrealengine.com/u/PMcKenzie2004)\
**Post date:** [April 22, 2023, 8:50pm UTC](https://forums.unrealengine.com/t/filter-by-material-on-datasmith-imported-static-meshes/1137336/1 "2023-04-22T20:50:09Z")

</div>

Hi everyone,  
Is there a built-in function, that allows filtering Static Meshes in a Dataprep graph, where the Meshes themselves are named “Component\_1”, etc? My goal is to turn on Nanite for all geometry, imported from Sketchup 2022 via Datasmith, except for any materials whose name contains “glass”.  
Since the Static Meshes do not contain the Sketchup material name, I am looking at how else to filter them.  
I am wondering if this takes a custom Blueprint class?  
Thank you.

---

<div class="post-metadata">

**Author:** ![PMcKenzie2004](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PMcKenzie2004](https://forums.unrealengine.com/u/PMcKenzie2004)\
**Post date:** [April 23, 2023, 12:00am UTC](https://forums.unrealengine.com/t/filter-by-material-on-datasmith-imported-static-meshes/1137336/2 "2023-04-23T00:00:28Z")

</div>

This Python script, used after importing a Datasmith file, works for me! It tests all materials in the Scene, then turns Nanite on for meshes that are not transparent.

> **[Enable Nanite with Python | Community tutorial](https://dev.epicgames.com/community/learning/tutorials/4x7v/unreal-engine-enable-nanite-with-python)**
>
> This 2 part series covers the process procedurally enabling Nanite on all valid static meshes present in a level using the Unreal Python API. As of 5.1...
