# How to input data to blendspace via code?

**URL:** <https://forums.unrealengine.com/t/how-to-input-data-to-blendspace-via-code/316952>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [April 30, 2015, 8:17am UTC](https://forums.unrealengine.com/t/how-to-input-data-to-blendspace-via-code/316952 "2015-04-30T08:17:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mirsabayu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mirsabayu](https://forums.unrealengine.com/u/mirsabayu)\
**Post date:** [April 30, 2015, 8:17am UTC](https://forums.unrealengine.com/t/how-to-input-data-to-blendspace-via-code/316952/1 "2015-04-30T08:17:56Z")

</div>

hello,  
so i am here wanted to play a blendspace via code. and when i open the class for the blendspace (blendspace.h and blendspaceBase.h) i can’t find a way to input the data. are we directly input data to SampleData variables. or there is some function that we can use in that two class to input data to blendspace.  
thx

---

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [April 30, 2015, 8:58am UTC](https://forums.unrealengine.com/t/how-to-input-data-to-blendspace-via-code/316952/2 "2015-04-30T08:58:22Z")

</div>

#Custom Anim Instance

One solution is to store your Blend Space in an Anim Blueprint that is based on a **C++ Anim Instance** and then feed your C++ values into the Blend Space from C++ by accessing your casted C++ Anim Instance

#Wiki on C++ Anim BPs

> **[Unreal Engine | The most powerful real-time 3D creation platform](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> Unreal Engine is the world’s most open and advanced real-time 3D creation platform for photoreal visuals and immersive experiences.

🙂

Rama

---

<div class="post-metadata">

**Author:** ![mirsabayu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mirsabayu](https://forums.unrealengine.com/u/mirsabayu)\
**Post date:** [April 30, 2015, 9:31am UTC](https://forums.unrealengine.com/t/how-to-input-data-to-blendspace-via-code/316952/3 "2015-04-30T09:31:16Z")

</div>

thx rama, at first i wanted to do it like a single node animation (without using animation blueprint, just run single animation - run it using mesh-\>PlayAnimation() ). i just think it’s funny if there is no way to directly feed the input in the blendspace via code, without using the animation graph or animation blueprint.

---

<div class="post-metadata">

**Author:** ![mirsabayu](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mirsabayu](https://forums.unrealengine.com/u/mirsabayu)\
**Post date:** [May 4, 2015, 3:35am UTC](https://forums.unrealengine.com/t/how-to-input-data-to-blendspace-via-code/316952/4 "2015-05-04T03:35:31Z")

</div>

yeeey, i found the function in AnimSingleNodeInstance named SetBlendSpaceInput. jejeje thx for the revelation rama. jejeje
