# About using the code of exporting a model with colors to Blender

**URL:** https://discourse.slicer.org/t/about-using-the-code-of-exporting-a-model-with-colors-to-blender/299
**Category:** Support
**Created:** [May 11, 2017, 12:37pm UTC](https://discourse.slicer.org/t/about-using-the-code-of-exporting-a-model-with-colors-to-blender/299 "2017-05-11T12:37:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Mohamed](https://avatars.discourse-cdn.com/v4/letter/m/d78d45/32.png) [@Mohamed](https://discourse.slicer.org/u/Mohamed)
#### Post date: [May 11, 2017, 12:37pm UTC](https://discourse.slicer.org/t/about-using-the-code-of-exporting-a-model-with-colors-to-blender/299/1 "2017-05-11T12:37:39Z")

</div>

Hello,  
I was trying to use the code of exporting a model with colors to Blender in the repository here: [Export a model to Blender, including color](https://www.slicer.org/wiki/Documentation/4.5/ScriptRepository)  
but it seems like the function of GetOutputPolyData has been modified in the new version of VTK. As it keeps giving me an error in the integrator.  
Anyone know a way to get its alternative?

Thank you

---

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [May 11, 2017, 2:25pm UTC](https://discourse.slicer.org/t/about-using-the-code-of-exporting-a-model-with-colors-to-blender/299/2 "2017-05-11T14:25:45Z")

</div>

I’ve fixed the obvious syntax errors (due to VTK library upgrades) in the [fiber tract export snippet](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Export_a_fiber_tracts_to_Blender.2C_including_color).

If you export generic models (not fiber tracts) then you can either [export the whole scene as VRML](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Export_entire_scene_as_VRML) or [export a colored model to ply](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Export_model_to_Blender.2C_including_color_by_scalar).
