Can I run a kl function from Python?

Daniele NieroDaniele Niero Posts: 233 ✭✭
edited October 2016 in Python Bindings

Hi,

So in python with have RTVal that allow us to work with kl structs and object, but can I also just run function?

For example if I have this function in one of my custom extension:

function String helloWorld(in String myName) {
    String result ="Hello World from "+ myName;
    return result;
}

How can I run it from Python, if I can at all?

Thanks,
Daniele

P.S. Is the Python Bindings section closed?

Tagged:

Comments

  • borjaborja Administrator, Fabric Employee Posts: 480 admin

    You can if it is part of an object. Check FabricEngine\Samples\Python\Alembic to see how you can invoke AlembicArchiveReader methods within python. I will check with the team to see if this is possible with isolated functions.

    About the Python bindings forum section, there was a problem I just fixed it and moved this thread to it. Thanks for noticing!.

    Borja Morales
    Technical Product Manager
    Fabric Software Inc.

  • borjaborja Administrator, Fabric Employee Posts: 480 admin

    Hi Daniele

    I confirmed this is not currently possible (should it should be fairly straightforward to add) and I have filed the internal ticket FE-7364

    Borja Morales
    Technical Product Manager
    Fabric Software Inc.

  • EricTEricT Administrator, Moderator, Fabric Employee Posts: 305 admin

    What you could do is construct a graph and operator via the Fabric Python module and evaluate it. Look at %FABRIC_DIR%\Tests\Core\Python\ext-objects.py

    Eric Thivierge
    Kraken Developer
    Kraken Rigging Framework

Sign In or Register to comment.