# Is it possible to call a blueprint function from python?

**URL:** <https://forums.unrealengine.com/t/is-it-possible-to-call-a-blueprint-function-from-python/447078>\
**Category:** Blueprint\
**Tags:** unreal-engine, CPP, question, Blueprint\
**Created:** [April 11, 2019, 11:40pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-call-a-blueprint-function-from-python/447078 "2019-04-11T23:40:45Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anonymous\_user\_0846af92](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0846af92](https://forums.unrealengine.com/u/anonymous_user_0846af92)\
**Post date:** [August 29, 2019, 2:35pm UTC](https://forums.unrealengine.com/t/is-it-possible-to-call-a-blueprint-function-from-python/447078/3 "2019-08-29T14:35:53Z")

</div>

At this time, python does not have access to blueprint functions, but it **does** have access to your C++ methods.  
So, the solution is to declare your blueprint function in C++ as a `BlueprintImplementableEvent`, and then override it in your blueprint.

I’d recommend checking it works by calling your `BlueprintImplementableEvent` from C++ before you move on.  
Next, make a secondary C++ function to call your `BlueprintImplementableEvent`.  
This function must be implemented as a `BlueprintCallable`, as these are the ones that are exposed to python.

Finally, once your C++ and blueprints are compiled, all you need to do is call your caller function from python;  
your C++ class will be visible as a normal C++ module like so: `unreal.YourClassName.yourCallerFunctionName(yourClassInstance, args)`  
Arguments and return values are handled exactly as you’d expect.  
You must pass your function the class instance you wish the function to run from. Very useful when manipulating specific AActor instances.

* * *

One final note; if you need your function to be implemented as a blueprint **function** rather than a blueprint **event** like I did, you must either make your function constant or give a return value (even if you don’t use it). Otherwise, it will appear in your blueprint overrides as an event.

Screens from my use case, obviously the specifics of my blueprint function implementation is irrelevant:  
**Blueprint function**

 ![Blueprint function implementation of clearSpline(), returning a boolean](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/e/c/0ec46be6c5cab8551a3ad166e231846f303ebac5.png)  
**.h**  
 ![Header file declaring my c++ functions (see image)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/3/7d3c1bdfcc8bc9f586e3f222cabb3d1b66e044eb.png)  
**.cpp**  
 ![Implementation of my caller utility function (see image)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/1/c/e1c1e6c5bd99d545e3c6e6fd16caf825742f180b.png)  
**.py**  
 ![My python code calling the caller function (see image)](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/1/f/c1fd7d7d2cd2ca3f9ff7a04fd6509d95180f716b.png)

---

_[View the full topic](https://forums.unrealengine.com/t/is-it-possible-to-call-a-blueprint-function-from-python/447078)._
