hoss
1) I have some documentation I wrote, I could share it on your REPO.
2) Also there is this TypeScript types repo which could also be a good source for documentation. I forked this repo and started adding types and jdoc comments as documentation.
For example here
Posts by hepi
BECOME PART OF THE COMMUNITY - Sign up here
-
-
Andreas
That API Description panel is nice, but I code in Visual Studio Code.
So I simply use the "LuaHelp" to produce the "grandMA3_lua_functions.txt" file -
ralfrottmann
I wrote support and here is what they answered:unfortunately, the whole grandMA3 Lua API is not very well documented (officially) at the moment. I will ask our TechDoc department about their future plans on this.
In the meantime, you can get a full overview of all available functions for the current software version if you run HelpLua in the command line. This will output a text file "grandMA3_lua_functions" to your gma3_library folder. Of course, this does not replace a proper documentation, but it gives you a list of all functions with arguments, return values and data types.
-
Hi,
I noticed that ToAddr and FromAddr functions are not symmetrical.
Form example, when running this plugin:Codereturn function() local app = Root()["ShowData"]["Appearances"]["Fixture"] local addr = ToAddr(app) Printf("ToAddr = " .. addr) local fromAddr = FromAddr(addr) Printf("FromAddr.name: " .. fromAddr.name) end
Anyone knows the correct syntax that FromAddr() is expecting?
Thanks -
Solved it.
In the case of a Layout Element, I just need to set the "Object" property.
I guess it's similar in other objects. -
-
Hi,
Is there a LUA Object-API function that does what the "Assign" command does?
I am trying to assign a macro to a layout (create a layout element)
I specifically DO NOT want to use the command-line syntax (using Cmd("Assign ....")),
because I don't want it to be included in the undo stack.
Alternatively,
Is there a way to issue CommandLine commands but have them excluded from the undo stack (Meaning that pressing "Oops" doesn't undo them)
Thanks,
HEPi -
Hi ALL !
Can we ask for documentation please for the Object API.
Does anyone have direct contact with MA Lighting?
What are they saying about this lack of documentation ??
Here is a list of all the known functions (not documented), in TypeScript definitionCode
Display Moreinterface Obj<ParentType, ChildType, PropName extends string = string> { name: string; index: number; AddListChildren(...args: any): any; AddListChildrenNames(...args: any): any; AddListLuaItem(...args: any): any; AddListLuaItems(...args: any): any; AddListNumericItem(...args: any): any; AddListNumericItems(...args: any): any; AddListObjectItem(...args: any): any; AddListPropertyItem(...args: any): any; AddListPropertyItems(...args: any): any; AddListRecursiveNames(...args: any): any; AddListStringItem(...args: any): any; AddListStringItems(...args: any): any; Addr(...args: any): any; AddrNative(...args: any): any; /** Adds a child to this object */ Append(clazz: string): ChildType; Aquire(...args: any): any; Changed(...args: any): any; Children(): ChildType[]; ClearList(...args: any): any; ClearUIChildren(...args: any): any; CommandAt(...args: any): any; CommandCall(...args: any): any; CommandCreateDefaults(...args: any): any; CommandDelete(...args: any): any; CommandStore(...args: any): any; Compare(...args: any): any; Copy(...args: any): any; Count(...args: any): any; Create(...args: any): any; CurrentChild(...args: any): ChildType | undefined; Delete(...args: any): any; Export(...args: any): any; Find(...args: any): any; FindListItemByName(...args: any): any; FindListItemByValueStr(...args: any): any; FindParent(...args: any): any; FindRecursive(...args: any): any; Get(propName: PropName): any; GetAssignedObj(...args: any): any; /** Get the child class name */ GetChildClass(): string; GetClass: () => string; GetDisplay(...args: any): any; GetDisplayIndex(...args: any): any; GetExportFileName(...args: any): any; GetFader(...args: any): any; GetFaderText(...args: any): any; GetListItemAppearance(...args: any): any; GetListItemButton(...args: any): any; GetListItemName(...args: any): any; GetListItemsCount(...args: any): any; GetListItemValueI64(...args: any): any; GetListItemValueStr(...args: any): any; GetListSelectedItemIndex(...args: any): any; GetOverlay(...args: any): any; GetScreen(...args: any): any; GetUIChild(...args: any): any; GetUIChildrenCount(...args: any): any; GridCellExists(...args: any): any; GridGetBase(...args: any): any; GridGetCellData(...args: any): any; GridGetCellDimensions(...args: any): any; GridGetData(...args: any): any; GridGetDimensions(...args: any): any; GridGetParentRowId(...args: any): any; GridGetScrollCell(...args: any): any; GridGetScrollOffset(...args: any): any; GridGetSelectedCells(...args: any): any; GridGetSelection(...args: any): any; GridGetSettings(...args: any): any; GridIsCellReadOnly(...args: any): any; GridIsCellVisible(...args: any): any; GridScrollCellIntoView(...args: any): any; GridSetColumnSize(...args: any): any; GridsGetExpandHeaderCell(...args: any): any; GridsGetLevelButtonWidth(...args: any): any; HasActivePlayback(...args: any): any; HasParent(...args: any): any; HookDelete(...args: any): any; Import(...args: any): any; Index: () => number; InputRun(...args: any): any; InputSetAdditionalParameter(...args: any): any; InputSetEditTitle(...args: any): any; InputSetTitle(...args: any): any; Insert(...args: any): any; IsClass(...args: any): any; IsEmpty(...args: any): any; IsListItemEmpty(...args: any): any; IsListItemEnabled(...args: any): any; IsValid(...args: any): any; Load(...args: any): any; MaxCount(...args: any): any; OverlaySetCloseCallback(...args: any): any; Parent(): ParentType; PropertyCount(...args: any): any; PropertyName(...args: any): any; PropertyType(...args: any): any; Ptr(...args: any): any; Remove(...args: any): any; RemoveListItem(...args: any): any; Resize(...args: any): any; Save(...args: any): any; ScrollDo(...args: any): any; ScrollGetInfo(...args: any): any; ScrollGetItemByOffset(...args: any): any; ScrollGetItemOffset(...args: any): any; ScrollGetItemSize(...args: any): any; ScrollIsNeeded(...args: any): any; SelectListItemByIndex(...args: any): any; SelectListItemByName(...args: any): any; SelectListItemByValue(...args: any): any; Set(...args: any): any; SetChildren(...args: any): any; SetEmptyListItem(...args: any): any; SetEnabledListItem(...args: any): any; SetFader(...args: any): any; SetListItemAppearance(...args: any): any; SetListItemName(...args: any): any; SetPositionHint(...args: any): any; ShowModal(...args: any): any; ToAddr(...args: any): any; UIChildren(...args: any): any; UILGGetColumnAbsXLeft(...args: any): any; UILGGetColumnAbsXRight(...args: any): any; UILGGetColumnWidth(...args: any): any; UILGGetRowAbsYBottom(...args: any): any; UILGGetRowAbsYTop(...args: any): any; UILGGetRowHeight(...args: any): any; WaitChildren(...args: any): any; WaitInit(...args: any): any; }
-
Yeah I thought about that.
I am finding a different solution... -
-
This simple plugin (which uses an undo block) causes a crash when it is "Oops"-ed
Codereturn function() local undo = CreateUndo("MyAction") Cmd("Delete Layout 1000.1", undo) Cmd("Assign Macro 1000 At Layout 1000", undo) CloseUndo(undo) end
How to reproducing the crash(MA3 1.8.8, 1.8.1)
1. Define a plugin with the above code
2. Run these commands:
3. Run the plugin once
4. Hit the "oops" button
5. Run the plugin again
6. CRASH BOOM BOOM !!
Enjoy -
HI,
My plugin has internal state, which is stored in a PluginVariable.
The "SetVar" Lua function has no "undo" argument. (AFIK)
And when the user presses "Oops" , these variable value is not changed back.
Suggested Solution:
I think the there should be a way to listen for "Oops" events on specific undo handles.
Something like this:Codefunction onUndo(undoName) Echo(undoName .. " was reverted" end local undo = CreateUndo("MyAction 1") undo.addListener(onUndo) Cmd("Store something", undo) CloseUndo(undo)
Workaround
Since I don't believe this already exists, we need to submit a feature request for it.
In the meantime, I can think of a workaround (didn't try it yet)
I can create a dummy Sequence, and for each undo block that I create I can add a cue to that sequence, and I register a hook on this sequence.
Then when the user Oops's, the cue would be deleted, and my hook would get called.
Does that sound like a decent workaround? -
Any idea what the "index" property means?
(In the table where the "token" property is) -
Amazing !!!
Many "Thank-You"s !
Andreas I guess you get ANOTHER free plugin (-:
This will be for the "True Temp Fader" plugin,
estimated release at March 2023.
In the meantime,
try BETA testing the Pool Browser.
http://www.ma3-pro-plugins.com -
-
Hi,
My plugin generates many appearances for it's UI layouts.
These appearance are of no interest to the user.I am trying to avoid them from being seen in the "Select Appearance" dialog:
I thought about putting them in a different DataPool, but it seems that Appearances are NOT part of the DataPool.
They are also not part of the User Profile.
So I guess they are global (right?)
Any ideas on how to achieve this? -
Hi,
I am trying to figure out if it is possible to modify system menus, and add features.
For example, I want to add a custom selection value to the "Group Pool Setting" window.
I was able to add the UI SwipeButton element, but modifying this file:
/Users/[your user]/MALightingTechnology/gma3_1.8.1/shared/resource/lib_menus/ui/window_context/context_group_pool.uixml
But I can't define the values for this SwipeButton,
and I can find how to listen for changes in it's values.
Does anyone have any idea about this subject.
It's not really plugin development, I guess it's kind of a hack... -
Andreas
I don't know when the "Execute" function is being run.
I put a "Printf" in it but I never see it being printed. (Only the Main and Cleanup are called)
How do you make the Execute function to be called?
Now, I was digging into MA3 lua code which can be found, for example, here:
/Users/[your user]/MALightingTechnology/gma3_1.8.1/shared/resource/lib_menus/ui/window_add/add_window.lua
And I see the signalTable being used as an event listener.
I was able to add a "Printf" in this function:
(line 15 of add_window.lua)signalTable.AddWindowLoaded = function(caller, status, creator)
I restarted MA3,
and when I click on an empty screen space, and the "Add Window" dialog appeared, I saw my debug line begin printed.
I am not sure this is relevant for Plugin development though.
I hope there might be an event like, "OnPluginLoaded" or something that will replace the need for a StartupMacro.
But there is no documentation about that.
And dumping the signalTable, yields nothing. -
local pluginName = select(1,...);
local componentName = select(2,...);
local signalTable = select(3,...);
local my_handle = select(4,...);- pluginName: is the plugin name which is the plugin's object name int the Plugins pool. Note that it can be change by the user, and your LUA code will NOT be aware of it !
- componentName: is the plugin's component's name. A plan may have several component, each having an index and name. When you click a plugin object in the plugins pool, it always runs the first component. You can run other components directly using the "Plugin" command, e.g. "Plugin 3.1" runs component 3 of plugin with index 1.
- signalTable: I don't know yet, but I guess it is some kind of object that you can put event listeners on, and listen to system events. I see it in use in the built in menus.
- my_handle: This is the plugin's object handle (UserData). you need this when you register hooks. -
There is an execute_example.lua file under:
.../MALightingTechnology/gma3_1.8.1/shared/resource/lib_plugins/examples/execute_example/execute_example.lua
This plugin returns:return Main,Cleanup,Execute
I am curious about the Execute function.
It is defined as such:-- ****************************************************************
-- plugin execute entry point
-- ****************************************************************local function Execute(Type,...)
E("Execute-Example: Execute called")
local func=signalTable[Type];
if(func) then
func(signalTable,...);
else
local debug_text=string.format("Execute %s not supported",Type);
E(debug_text);
end
endfunction signalTable:Key(Status,Source,Profile,Token)
local debug_text=F("Execute Key (%s) %s UserProfile %d : %s",Status,Source,Profile,Token);
E(debug_text);
endfunction signalTable:Fader(Status,Source,Profile,Token,Value)
local debug_text=F("Execute Fader (%s) %s UserProfile %d : %s %f",Status,Source,Profile,Token,Value);
E(debug_text);
end
I don't really understand it yet.
I don't understand what the signalTable is.
But the interesting part is the "signalTable:Fader",
could there be a way to listen to fader movement?
Any information about this signalTable would be appreciated 🙏