Posts by hepi

BECOME PART OF THE COMMUNITY - Sign up here

    Hi,

    Running onPC on Mac, OSX 13.2

    I can't seem to be able to trigger Exec Keys from the keyboard.

    I tried all the Ctrl+F1, Alt+F1, combinations.

    I also tried assigning F1 (with no modifier) to Exec 101


    3386-screenshot-2023-06-20-at-9-44-01-png

    I also disabled all the Ctrl+[Function key] in the system settings.

    ?thumbnail=1

    Nothing I do seems to work )-:

    Any ideas?

    Hi,

    The Story
    This may only interest you if you are developing interactive Custom Dialogs.
    I reported this, but I am sharing this here because this was the most difficult bug to find. I spent 3 days hunting for it, until I could reproduce it consistently with a simple piece of code.

    What made this bug so difficult to understand, is the fact that the thread simply aborts silently,
    and that left me chasing wild hypothesis I had...

    Bug description:

    (- See attached lua file)
    (- Using version 1.9.2.2)

    When:

    • A UIObject (like a button) has a clicked signal
    • And the button is clicked
    • And within the signal function we delete the same UIObject (The button)

    Then:

    • The thread running the signal function is aborted before reaching the end of the signal function.

    The simple workaround I found is to use Timer() to switch to another thread. (See the lua code)

    BTW: The plugin where I encountered this bug, is a dev tool for browsing the MA Object Tree.
    I hope to release it soon to the plugin developer community.

    Best,
    HEPi

    Hi,

    Running onPC on Mac, OSX 13.2
    I can't seem to be able to trigger Exec Keys from the keyboard.

    I tried all the Ctrl+F1, Alt+F1, combinations.
    I also tried assigning F1 (with no modifier) to Exec 101

    I also disabled all the Ctrl+[Function key] in the system settings.



    Nothing I do seems to work )-:

    Any ideas?

    Krzysztof Korzeniowski
    Yeah, that's the way to get the associated sequence.

    I personally don't like a solution that involves polling (sending the fader values every 0.5 second).

    So if you are going into resolving each exec's sequence, then you don't need polling to get the faders' values.
    You simply need to listen for the outgoing OSC messages of the sequences's MasterFader. )Oh, but what if the exec is a Temp fader.... you need to listen for a TempFader as well? I need to chan that)


    But in my opinion, if you go for resolving sequence, then you need to listen for changes in the assigned sequence of an executor.
    Or you can use your polling solution to resolve the exec=>seq mapping every 0.5 a second. Or maybe eve every 5 seconds. Or even, just make a plugin/macro that the user needs to run whenever they change the exec's target object (exec's sequence)

    Hi,

    Well the issues with sending Exec active state are:

    1) You need to resolve the Sequence to which an executor is assigned to.
    2) You need to hook the Executor for changes, in case the user assigned a different sequence to that exec.
    3) Although a Seq object has a "CURRENTCUE" property, when you hook the seq for change, the callback is NOT trigger when the current cue changes )-:
    4) So the only way I found to get notified when a sequence active state is changed, is to add commands to all the cues and to the OffCue. And use these commands to do whatever you want.

    So for conclusion.
    Too complicated for the value you'll get from all this.

    Storing State/Config in global variables

    Well, in some cases it is needed.
    I thought of a solution for the Show load issue.
    And my current solution is this:

    - When I install the plugin, I generate a uuid (unique identifier).
    - When I create my global variable (a table), I set the uuid on that table as a property.
    - I store this uuid in the AddonVars (which are within the ShowData)
    - Whenever I access the global table, I compare the uuid from AddonVars to the one in the global table. If they differ, it means that a new show was loaded. So I destroy the current global table, and create a new one.

    Does that sound reasonable?

    I didn't want to start risk trying to Hook the Show Load event. Especially since we don't have a proper StartUp macro yet.

    (Oh, BTW, I found a nice hack for having a StartUp macro, but it's not so easy to Install it for other people, it's good locally for your own system)

    Ok, Solved it.

    All I had to do was run "ReloadUI" after adding a menu (-:

    So to summarise, if you add somewhere under:
    .../MALightingTechnology/gma3_[version]/shared/resource/lib_menus


    These files:

    - my_menu.xml

    - my_menu.uixml

    - my_menu.lua


    And run "ReloadUI"

    Then you can load you menu using command: "Menu [You Menu Name]"


    Using it in a Plugin

    So I guess you plugin would have to "Install" the menu files in the menus folder
    (.../MALightingTechnology/gma3_[version]/shared/resource/lib_menus)
    which is not in the user library, it's part of the version.
    You need to make sure there is no collisions yeah !!!

    This means, your plugin should handle a case where the files are not there (if someone loaded an old show file with a newer version)

    Dialog Initial Focus

    Has anyone been able to set the focus to the popup dialog when it is opened?

    I tried messing with the global functions:
    FindBestFocus()

    and

    FindNextFocus()

    but without success.

    Tried adding Focus attribute (with "InitialFocus" or "CanHaveFocus") to some objects,
    but still no luck.

    Any ideas?

    mokaByls
    Great !
    Bare in mind that this "grandma3-ts-types" is constantly changing,
    and I consider it still unofficial, so I allow myself to make breaking changes.
    When it will become more stable, I start versioning it properly.
    I hope the version 1.0.x doesn't mislead.
    Maybe I should have stuck with 0.1.x ...

    At least If I make breaking changes, I will try to remember to increase the minor version. (e.g, 1.0.0, 1.1.0)
    And if it's just additions, then only the last digit (1.0.1)

    You can also take a look at my build tool:
    https://github.com/ma3-pro-plugins/build_plugin

    I in the progress of extracting it to a standalone package, it's not done yet.

    Hi,

    I researching the proper way to have custom dialogs.

    This useful post shows how to build custom dialogs directly with the Object API.
    RE: LUA: UI

    I am wondering if we can build menus and overlays the same way MA does it, as you can see in:
    .../MALightingTechnology/gma3_[version]/shared/resource/lib_menus

    Each Menu have these files:
    - menu.xml

    - menu.uixml

    - menu.lua


    The menu.xml file defines a menu name, for example

    Code
    <Menu Lock="Yes"  Name="AtFilterOverlay".../>


    These Menus are like Plugins, just instead of calling them with the "Plugin" keyword, we can call them with the "Menu" keyword.

    This command will open the "AtFilterOverlay":

    Menu AtFilterOverlay

    So what now?

    I can't seem to be able to add my own menu, that could be called with the "Menu" keyword.
    I tried putting the menu files under ".../MALightingTechnology/gma3_[version]/shared/resource/lib_menus" but with no success.

    Anyone wants to try and research this?