FlorianANAYA / GrandMA2-help

This repository aims to provide useful tips to GrandMA2 programming, especially with macros
8 stars 3 forks source link

Colorpicker Macro position #1

Open DavidElenz opened 2 years ago

DavidElenz commented 2 years ago

Hi Florian,

I really like your Plugin and am using it for nearly all my shows since 2 Years. The only problem I have is that i need the first 99 macro slots for an Extron system and I cant move your Macros. Is it possible that you impliment an option to set the starting macro? And your Plugin needs an update. when changing the color, the filled color picture is not copied nor is the active color picture deleted.

Thank you!

With kind regards, David

FlorianANAYA commented 2 years ago

Hi,

Thank you for your feedback, I'm glad my plugin can be useful. As it is currently designed, this plugin creates the macros it needs on the first empty continuous macros (for example, if the plugins needs to create 50 macros, il will search the first 50 available macros in a row). A workaround is to create a few empty macros so that the plugin starts macros immediately after your last one (in the previous example, you would create macros 40, 80 and 99, the plugin would start at macro 100). When I'll have time, I will add this feature to the plugin.

For the second issue you are having, could you give me more details ? This looks like a bug that neither did I or anyone else I know using this plugin ever had. Does any error or weird output show up in command line feedback or system monitor ? Can you confirm that you didn't move the images ? Is the output of your fixtures affected ? Can you also confirm that you have updated the plugin to the latest version ? (there have been several updates in 2 years, it is currently in v9)

D3visionNL commented 2 years ago

Don't know if @DavidElenz managed to end up fixing this but I'll leave my findings here for others with a similar issue.

I had this same problem while trying to use the plugin from the USB stick I normally use for my showfiles. Loading the plugin from the plugins folder on my PC (in my case C:\ProgramData\MA Lighting Technologies\grandma\gma2_V_3.9.60\plugins) solved the issue and now the Color Picker is fully functional.

When looking at the errors in the command screen it looks like when you try to run the plugin is unable to import the XML files it exports when the plugin is in any other location besides the plugins folder on your pc. This bug is present on the latest version.

Hopefully this is helpful to someone.

FlorianANAYA commented 2 years ago

Thank you for your input.

I think I found the origin of the issue: when creating the file, the plugin uses gma.show.getvar('PATH') local fileName = "layouttemp.xml" local filePath = gma.show.getvar('PATH') .. '/importexport/' .. fileName local file = io.open(filePath, "w") file:write(xmlFileContent) file:close()

This method always returns the internal data folder (C:\ProgramData\MA Lighting Technologies\grandma\gma2_V_3.9.60 with onPC version, or the equivalent internal folder on a console).

The file is then imported via the standard method, which is using the import command

gma.cmd('Import "' .. fileName .. '" Layout ' .. layoutId)

The problem is that the import command uses the current drive, which is selected via the SelectDrive command, or when selecting a drive in the backup menu. I believe the issue is that your selected drive is your USB device in the backup menu when executing the plugin. Could you confirm that, by changing to internal in the backup menu, the plugin works as intended ? Just to be shure that this is the issue you are facing. If so, I will push a fix that selects the internal drive before importing (and then selects back the previously selected drive).

FlorianANAYA commented 2 years ago

Closed with commit #aa086ab50685674e88bb204b7b0f18bf0a63d0c2