# Wireframe in complex geometry exported from Blender

**URL:** <https://discourse.threejs.org/t/wireframe-in-complex-geometry-exported-from-blender/2172>\
**Category:** Questions\
**Tags:** models, loaders, geometry\
**Created:** [March 20, 2018, 1:44am UTC](https://discourse.threejs.org/t/wireframe-in-complex-geometry-exported-from-blender/2172 "2018-03-20T01:44:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alv16106](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@alv16106](https://discourse.threejs.org/u/alv16106)\
**Post date:** [March 20, 2018, 1:44am UTC](https://discourse.threejs.org/t/wireframe-in-complex-geometry-exported-from-blender/2172/1 "2018-03-20T01:44:03Z")

</div>

I have a complex geometric 3D object I exported from Blender, and need to put it in three.js, but leaving nothing but the wireframe/skeleton, how can I achieve this? I need to be able to change between wireframe and the “normal” look of the object

---

<div class="post-metadata">

**Author:** ![looeee](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/looeee/32/59_2.png) [@looeee](https://discourse.threejs.org/u/looeee)\
**Post date:** [March 20, 2018, 6:13am UTC](https://discourse.threejs.org/t/wireframe-in-complex-geometry-exported-from-blender/2172/2 "2018-03-20T06:13:37Z")

</div>

You could use a function like this:

```auto
function setWireframe( object, boolean ) {

	object.traverse( ( child ) => {

		if ( child.isMesh ) {

			if ( ! Array.isArray( child.material ) ) {

				if ( child.material.wireframe !== undefined ) child.material.wireframe = boolean;

			} else child.material.forEach( ( mat ) => {

			    if ( mat.wireframe !== undefined ) mat.wireframe = boolean;

		    } );

		}

	} );

}

```

Then you can call it like this to turn wireframe on:

```auto
setWireframe( objectLoadedFromBlender, true );

```

---

<div class="post-metadata">

**Author:** ![alv16106](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@alv16106](https://discourse.threejs.org/u/alv16106)\
**Post date:** [March 20, 2018, 5:00pm UTC](https://discourse.threejs.org/t/wireframe-in-complex-geometry-exported-from-blender/2172/3 "2018-03-20T17:00:04Z")

</div>

Hey, that is pretty good. Thank you!
