Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.



    I am having difficulties using the Action class in python. Attempting to use the assign function results in an exception:

    pya.Application.instance().main_window().menu().action('path to action').assign(pya.Action())
    argument 1 (impossible<bad format char>)

    I cannot pass the assign function an action object successfully. Is there something I am doing incorrectly? I have also tried with an action that had an on_triggered event and title.

    • CommentAuthorMatthias
    • CommentTimeDec 17th 2017 edited


    yes, thanks for mentioning this. Apparently something is wrong with the "assign" implementation in Python.

    But you can assign each property individually:

    new_a = ...
    old_a = pya.Application.instance().main_window().menu().action('path to action')
    old_a.title = new_a.title
    ... etc.


    • CommentAuthorMatthias
    • CommentTimeDec 17th 2017

    I have created a ticket at GitHub: