Posts by ispeedyg

BECOME PART OF THE COMMUNITY - Sign up here

    I am not sure what to tell you. I have never played with any hardware acceleration and the only time I get 1 fps. Is when I try and put in Generic LED RGB fixture to create a Video Wall to play with the new bitmap. That I never can get the fps down low with cant figure the best way for that yet. As you can see in my SS I have a lot running and still getting 11 fps in front view. Put it in top view and i get 37 fps. I put my 3dView settings window up in the SS as something to reference. But my M1 runs like a champ have never tried any hardware tweaking.

    Quote

    /Volumes/Showz/grandMA3/gma3_library/datapools/plugins/testies.lua which only has return function(); Printf("Testing the Testies file") ; end in it.

    I believe that satisfies the raw lua part you suggested above. And there were no other threads about modules that came close as this one to trying to handle one that always loads and runs. It needed revamped. And this is running in vs 2.0.0 with same results.

    I don't define the LuaFile. I thought that LuaFile was a command to run a LuaFile. Which is right where the other code has deciphered it to be. /Volumes/Showz/grandMA3/gma3_library/datapools/plugins/testies.lua which only has return function(); Printf("Testing the Testies file") ; end in it. on different lines.

    Syntax

    LuaFile ["AbsolutePathToLuaFile/FileName.lua"] is what i see in the manual. and I tried LuaFile(s_filepath) and LuaFile("s_filepath") where you see above with StringFormat puts the path and the lua file into the one variable s_filepath.

    I have been in class all week and coming back makes me realize i have to get better at commenting my code.

    I am not getting Hepi's component1 and component2 to work as described. But to describe what i have so far.

    Macro named "testies" with macroline: Lua "SP_RunPlugin3()"

    it triggers a plugin named "SP_Run3" who's code is:

    local E = Echo
    usbPath = true
    local SF = string.format
    SP_RunPlugin3 = function()
     package.loaded["drivePath"] = nil
     local drivePath = require"drivePath"
     Cmd('Lua "SP_RUNFilePath()"')

     local f_getFileName = function()
       local i_macro = GetFocus().OBJECTINDEX
       local o_macro = ObjectList('Macro '..i_macro)[1]
       local s_macroName = o_macro.NAME or ''
       usbPath = false
       return s_macroName
     end
    if usbPath then 
        SP_Filename = f_getFileName()
    end
    s_filePath = SF('%s/%s.lua', SP_Folder, SP_Filename)
    E(s_filePath)
    -- E("The Filepath and filename concat is: "..SP_Folder.."/"..SP_Filename)
    LuaFile(s_filePath) 
    end

    Now i tried to put drivePath on line 2 of the plugins lua coponents. But was doing something all wrong. Kept getting couldn't load error. So in a folder on my HD(on a Mac). Cannot remember how I located this folder but it is: /Users/speedy/MALightingTechnology/gma3_1.9.7/shared/resource/lib_plugins/requirements

    i placed the lua file named drivePath.lua which has code of:

    SP_RUNFilePath = function()
       Echo("This is coming from require script")
       local f_getdrivemac=function()
         Cmd("Select Drive 2")
         SP_Folder = tostring(GetPath("plugins", true))
        return SP_Folder
     end
      if HostOS() == "Mac" then
       SP_Folder = f_getdrivemac()
       Echo(SP_Folder)
     end 
    return SP_Folder
    end

    In my folder where the path that is in the screenshot is a luafile named "testies.lua" that has the code of:

    return function()

    Printf("testing the testies")

    end

    But as you see in the screen shot I am getting attempt to call a nil value (global 'LuaFile'). But I know s_filePath is not nil. I have tried as doc says to do the example. LuaFile("s_filePath") but it keeps saying nil value.

    I had seen the ../../../ in the forums somewhere before. But I know that doesnt work on the mac. I did however get this to work to find the main directory on USB.


    local E=Echo

    SP_RunPlugin=function()
    local f_getdrivemac=function()
    Cmd("Select Drive 2")
    SP_Folder = tostring(GetPath("plugins", true))
    return SP_Folder
    end
    local f_getFileName = function()
    local i_macro = GetFocus().OBJECTINDEX
    local o_macro = ObjectList('Macro '..i_macro)[1]
    local s_macroName = o_macro.NAME or ''
    return s_macroName
    end
    if HostOS() == "Mac" then
    s_path = f_getdrivemac()
    end
    if not s_file then
    SP_Filename = f_getFileName()
    end
    E("The Path is: "..s_path.."/"..SP_Filename)
    end

    Funny thing is I tried to post the code above copied from VSCode and it was definitely bigger. So I copied from MA3. Dont mind the 'if not s_file', it still works I had earlier tried to get the string of the file and wound up not changing that one. So basically if I could take the chunk that realized i'm on a mac. Then it gets the path to the USB directory for plugins. And put that into a require script. Have it return that path always to the plugin. I can take the other part of the chunk in to the plugin that gets the name I would be working on because it's name would be the name of the file.lua i am working on in VSCode.

    So my workflow is a Macro named the name of the plugin that i am working on in VSCode. where it has the .lua file

    line 1 of the macro is Lua "SP_RunPlugin" SP stands for speedy. which as you see triggers the plugin where SP_RunPlugin = function()

    Here is where I need the path to the folder that has the .lua file. which I am keeping in its place on the USB.

    after getting the path. I get the name of the macro. then concat them together.

    Redirect to the USB disk to run and not inside of the MA3 software. But as we come up with stupid ideas for plugins we can wind up with a lot of them. And I can make the text size 20 on MA3 but VSCode is just easier to read. If I have a .lua file that has the code to determine the path. I just need the macro with the name of the plugin that always triggers one plugin to reach into the USB and run that named plugin. Until the day when I can call it complete and create the .xml by exporting it and loading it in. As a note if you change the "Select Drive 1" in the beginning, on a Mac it will return the path inside of the Mac HD to where the plugin folder is. But relative path with '.'s and '/'s i cannot seem to manipulate folder hierarchy. Hopefully the method to my madness has made some sense.

    Now this is reviving an old post. But I have not found any better answers as I have been looking to do what Hepi was after. And your package.path solution looks very well done. I have not given it a try. But I was wanting to create a module to basically bring me back the path to either plugins on USB folder or Internal on my computer folder. and then pass the findings back into the script. This is for Mac by the way. Since my eyesight is not what it used to be and I can make the text larger in VSStudio Code is why I am after this. So in creating a plugin there is a lot of trial and error. Since the plugin section is not very friendly to quickly make changes to it on MA3. I want to create a path to a folder that has my plugins that I am creating with VSCode, brings it back as if it is sitting in the plugins folder on the software and run it. So with this topic and Andreas reply on the GetPath. I have been able to make a function to bring me back the path to the folder.

     Cmd("Select Drive 2")
        SP_Folder = tostring(GetPath("plugins", true))
        return SP_Folder

    which brings me back the path all the way to the plugins folder on my USB drive. If I select Drive 1 it will bring back the path all the way to the plugins folder on my Mac. Which I would like to be able to select a folder of my choosing but I am already deep in this can of worms. But in creating a module with the code above in it too return the answer of the path where my plugin is. Along with some more coding to return a name of the file that I want to run in .lua format. which i would take SP_Folder..name.lua. In typing this I am confusing myself. I trigger from a macro line (which the macro name is Test) Lua "Trigger()" , which then triggers a function in a plugin. that requires the name of the macro and the path to where it lives. So with the code above and getting the name Test adding .lua behind it. Inside the folder is Test.lua and proceeds to execute. Now mind you this is only because I cannot stand the interface on MA3, I might have when my eyesight was 20/20. But in the end of creating a working plugin. Its as simple as right clicking on an empty plugin, adding a lua component, edit and paste into the interface, save, close and have the plugin on my computer then just export it and there it is as Text.xml. That is a long ways to get too the xml I know. But say i have Plugin 1 thru Plugin 10 that I am working on, as the name of the macros with the line Lua"Trigger()". runs Trigger Plugin which first thing requires for the path and file name in a module that its only purpose in life is to return what is asked of it. Then takes that info and runs the plugin inside of MA3. Not even sure I make sense of this myself, I just see it in my head. I have tried to require Test in another plugin with errors. Not getting the component 1 and 2. Do i put get names in component 1 or require it from comp 2. Should I have install set to yes.

    I come up with wierd ideas for a plugins. One i call snowFlake. So when I create a base macro that gets the name of it and puts it in HDPlugin(snowFlake) to run the plugin from my HD. I would just copy that macro and rename it to another plugin I am working on. Where it would get the name of that macro put it in where it needs to be as it runs it goes and runs the plugin that runs the .lua file on my HD for that name that matches. That is why I would want to use names since I have a bunch of little plugins that there is no way I would remember what number is what. Then when I complete one. I can create an xml file for it for importing and exporting.

    Ok. This is going to sound very weird to you. So I know i am getting the name of the Plugin set in the variable. For mine I say Plugin 8 "109" which is where i put your plugin lua and named it Get Name. I trigger plugin 8 "109" from the macro line 1 and I get an error which is expected that there is no reference to main for plugin Get Name (Next line says) OK:Plugin 8 "109". Which is all good and all. I am actually wanting the name of the Macro that I named 109 for just testing purposes. I tried placing the Lua lines in the macro and it didn't like that. Because in the long run I am wanting to take the name of the Macro and throw it into a plugin lets call it HDPlugin(myMacroName) which in turn instead of going to the folder in my computer where MA3 holds plugins or a flash drive goes to a folder on my Hard drive where I have messed with Lua and run the name of that .lua file which happens to be the name of the macro. Which beats a lot of copy and pasting back and forth to the plugin each time i change something. It just runs the file on my computer that i messed with in VSCode. But in order to get there a plugin on MA needs to run that triggers going to the Hard drive but when it gets there needs to know the name of the file which is the name of the Macro. Not sure if I confused you enough. But it makes sense in my head LOL

    Thanks for the plugin. I have some work to do to get what I am after ready. But from what I am reading, having this at the top of the macro will set the variableSelection to the name of the macro that is just run correct? Which is exactly what I am looking for. Because the next step in it is to manipulate another variable in what i am running to equal to variableSelection for running.

    So thanks for the D i didn't even read it that close just copied and pasted it. But i am not getting a word wrap. Problem with the scroller as well. So I thought I would paste it here.


    return function()

     local dialog = GetFocusDisplay().ScreenOverlay:Append("BaseInput")
     dialog.H, dialog.W, dialog.Columns = 600, 800, 2
     dialog[2][2].SizePolicy = "Content"
     local scrollbox = dialog:Append("ScrollBox")
     scrollbox.Name = "INSTRUCTIONS"
     local scrollbar = dialog:Append("ScrollBarV")
     scrollbar.ScrollTarget = "../mybox"
     scrollbar.Anchors = '1,1'
     local button = scrollbox:Append("Button") 
     button.H, button.W = 800, 800
     button.TextAutoAdjust = True
     button.Text = "There is a whole lot of text here to see if it will autowrap to the next line. But I am seeing that it doesnt wrap to the next line. But if i expand the width of the box more text shows up"  
    end

    Quote

    Ohter question a lot of times i see Ipairs in LUA, i searched online but i don't understand what they say. Can you explain me in Dora and Diego language what Ipairs means and does?

    To my best understanding in the difference in pairs and ipairs is pairs is un-ordered. Every time you would run it, it will select a different variable. iPairs is ordered from start to finish.

    Quote


    button.TextAutoAjust = "Yes"


    I threw the line into the plugin and I am getting the error of

    wrong parameter #2

    Obj.Set (light_userdata:handle, string:property_name, string:property_value[,Enums.ChangeLevel:override change level]) returns nothing

    so i tried true instead of "Yes" and still get the same error.

    Any idea?

    I like this to be able to put instructions on doing something. But how do you put in multiple lines of Text. When I tried to add more text in the button.Text = "And put more than the end of the box. I put in \n for new line but is there a way to continue the text in the plugin on the next line instead of it going off to the right. Kind of like python when you put the line on different lines with the indent?