Building GUIs With Fusion's UI Manager

User avatar
PeterLoveday
Fusioneer
Posts: 155
Joined: Sun Sep 14, 2014 6:09 pm
Answers: 6
Been thanked: 17 times

Re: Building GUIs With Fusion's UI Manager

#166

Post by PeterLoveday » Tue Nov 06, 2018 4:44 pm

The tab bar provides a set of tabs that are typically used to switch through pages of a UI, most commonly alongside something like ui:Stack.

Here's a rough outline of what's available for ui:TabBar:

Code: Select all

Properties:
	CurrentIndex                - The index of the active tab [integer RW]
	UsesScrollButtons           - Show buttons to allow tab scrolling [boolean RW]
	TabsClosable                - Show closer icons on the tabs [boolean RW]
	Expanding                   - Expand tabs to use up available space [boolean RW]
	Movable                     - Allow drag-reordering of tabs [boolean RW]
	DocumentMode                - Visually style for document selection [boolean RW]
	DrawBase                    - Draw the base line for the tab bar [boolean RW]

	TabText[index]              - The label for Tab at <index> [string RW]
	TabToolTip[index]           - The tooltip for Tab at <index> [string RW]
	TabTxtColor[index]          - The label colour Tab at <index> [colour RW]

Methods:
	AddTab(label)               - Adds a tab with text <label>. Returns new index
	InsertTab(index, label)     - Insert a tab with text <label> at <index>.  Returns new index
	Count()                     - Returns the number of tabs
	RemoveTab(index)            - Remove the tab at <index>
	MoveTab(fromindex, toindex) - Move a tab, from <fromindex> to <toindex>

Events:
	CurrentChanged              - Current tab changed to ev.Index.  Enabled by default.
	CloseRequested              - Closer clicked on tab at ev.Index.
	TabMoved                    - Tab dragged from ev.From to ev.To.
	TabBarClicked               - Tab clicked at ev.Index.
	TabBarDoubleClicked         - Tab double clicked at ev.Index.
... and here's a quick example:
  1. ui = fu.UIManager
  2. disp = bmd.UIDispatcher(ui)
  3.  
  4. win = disp:AddWindow(
  5. {
  6.     ID = "MyWin",
  7.     WindowTitle = "Tab test",
  8.     Geometry = { 100,100,400,300 },
  9.  
  10.     ui:VGroup
  11.     {
  12.         ui:TabBar { Weight = 0.0, ID = "MyTabs", },
  13.         ui:VGap(0, 10),
  14.         ui:Stack
  15.         {
  16.             Weight = 1.0,
  17.             ID = "MyStack",
  18.  
  19.             ui:Button { Text = "Button One", ID = "Button1" },
  20.             ui:Slider { ID = "Slider1", Minimum = 0, Maximum = 100 },
  21.             ui:HGroup
  22.             {
  23.                 ui:Button { Text = "A", ID = "ButtonA" },
  24.                 ui:Button { Text = "B", ID = "ButtonB" },
  25.                 ui:Button { Text = "C", ID = "ButtonC" },
  26.             },
  27.         },
  28.         ui:VGap(0, 10),
  29.     },
  30. })
  31.  
  32. itm = win:GetItems()
  33.  
  34. itm.MyStack.CurrentIndex = 0
  35.  
  36. itm.MyTabs:AddTab("One")
  37. itm.MyTabs:AddTab("Two")
  38. itm.MyTabs:AddTab("Three")
  39.  
  40. function win.On.MyTabs.CurrentChanged(ev)
  41.     itm.MyStack.CurrentIndex = ev.Index
  42. end
  43.  
  44. function win.On.Slider1.ValueChanged(ev)
  45.     local v = 1 - ev.Value/100
  46.  
  47.     itm.MyTabs.TabTextColor[0] = { R=1, G=v, B=v, A=1 }
  48.     itm.MyTabs.TabTextColor[1] = { R=v, G=1, B=v, A=1 }
  49.     itm.MyTabs.TabTextColor[2] = { R=v, G=v, B=1, A=1 }
  50. end
  51.  
  52. function win.On.Button1.Clicked(ev)
  53.     itm.MyTabs.TabText[0] = "One"
  54.     itm.MyTabs.TabText[1] = "Two"
  55.     itm.MyTabs.TabText[2] = "Three"
  56. end
  57.  
  58. function win.On.ButtonA.Clicked(ev)
  59.     itm.MyTabs.TabText[0] = "A"
  60. end
  61.  
  62. function win.On.ButtonB.Clicked(ev)
  63.     itm.MyTabs.TabText[1] = "B"
  64. end
  65.  
  66. function win.On.ButtonC.Clicked(ev)
  67.     itm.MyTabs.TabText[2] = "C"
  68. end
  69.  
  70. function win.On.MyWin.Close(ev)
  71.     disp:ExitLoop()
  72. end
  73.  
  74. win:Show()
  75. disp:RunLoop()
  76. win:Hide()

Tags:

User avatar
SirEdric
Fusionator
Posts: 1960
Joined: Tue Aug 05, 2014 10:04 am
Answers: 4
Real name: Eric Westphal
Been thanked: 136 times
Contact:

Re: Building GUIs With Fusion's UI Manager

#167

Post by SirEdric » Tue Nov 06, 2018 9:03 pm

Hey Peter.

Thanks a lot for the enlightment!

Cheerio.

Eric.

User avatar
AlbertoGZ
Posts: 40
Joined: Sat Apr 21, 2018 3:15 am
Location: Barcelona, Spain
Contact:

Re: Building GUIs With Fusion's UI Manager

#168

Post by AlbertoGZ » Thu Dec 13, 2018 5:23 am

I'm trying to do a ui.ComboBox in python language, but I do not reaching to port the lua syntax for AddItem. It's ui.ComboBox currently supported in python GUI Manager?

  1.  
  2. # Window vars
  3. xpos = 100
  4. ypos = 300
  5. width = 230
  6. height = 200
  7.  
  8. ###  UI DEFINITION  ###
  9.  
  10. ui = fu.UIManager
  11. disp = bmd.UIDispatcher(ui)
  12.  
  13. ###  MAIN WINDOW  ###
  14. dlg = disp.AddWindow({'ID': 'SaverFilename', 'WindowTitle': 'SaverFilename', 'Geometry': [ xpos, ypos, width, height ],},
  15. [
  16.     # Add your GUI elements here:
  17.         ui.ComboBox({   'ID': 'Res',
  18.                         'Text': 'aaa'
  19.                     }),
  20.  
  21. ])
  22.  
  23. itm = dlg.GetItems()
  24. toollist = comp.GetToolList(True)
  25. itm['Res'].AddItem = '3K'
  26.  
  27.  
  28. # The window was closed
  29. def _func(ev):
  30.     disp.ExitLoop()
  31. dlg.On.SaverFilename.Close = _func
  32.  
  33. dlg.SetAttribute('WA_TranslucentBackground', False)
  34. dlg.Show()
  35. disp.RunLoop()
  36. dlg.Hide()
  37.  

User avatar
AndrewHazelden
Fusionator
Posts: 1387
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 4
Location: West Dover, Nova Scotia, Canada
Been thanked: 59 times
Contact:

Fusion Global Variable Viewer

#169

Post by AndrewHazelden » Thu Dec 13, 2018 7:14 am

Here is a new debugging and research tool for browsing Fusion's Lua based global variables. The scope you run this script inside of changes the output.

If you want to match the scope of what you'd get back from manually typing in and running your own code in the Fusion Console then you should run this script by copy/pasting text script into the Console view and pressing enter to run it, too.

This script was originally mentioned on this WSL thread.

Screenshot

Fusion Global Variable Viewer.png

Script

Code: [Select all] [Expand/Collapse] [Download] (Fusion Global Variable Viewer.lua)
  1. --[[
  2. Fusion Global Variable Viewer - v1 2018-12-07
  3. by Andrew Hazelden
  4. Email: <andrew@andrewhazelden.com>
  5. Web: www.andrewhazelden.com
  6. ----------------------------------------------
  7.  
  8. # Overview #
  9.  
  10. This code snippet writes out the value of *all* Fusion internal global variables to disk by saving it to a PathMap file located at "Temp:/FusionGlobals.txt".
  11.  
  12. This script is compatible with Fusion 9.0.2+ and uses UI Manager for the GUI.
  13.  
  14. # Usage #
  15.  
  16. Step 1. Save your Fusion composite to disk.
  17.  
  18. Step 2. Open the "Fusion Global Variable Viewer.lua" document up in a text editor like notepad++ or BBEdit. Copy the full lua script contents into your clipboard and paste it into the Fusion Console window's single line text field. This will run the script with the same scope as your own code you would type into the Console.
  19.  
  20. Step 3. The script will save a file with all the active global variables to "Temp:/Fusion/FusionGlobals.txt". Then 10 seconds later that document will open up in a Fusion UI Manager based syntax highlighted text editor view.
  21.  
  22.  
  23. # Linux Note #
  24.  
  25. If you run this script on Linux and it crashes Fusion the error is likey related to the Syntax Highlighting code.
  26.  
  27. Try disabling this line of code by adding two dashes -- as comment to the start of the line:
  28.  
  29. Lexer = 'fusion',},
  30.  
  31. --]]--
  32.  
  33. print('----------------------------------------------')
  34. print('Fusion Global Variable Viewer - v1 2018-12-07')
  35. print('by Andrew Hazelden')
  36. print('Email: <andrew@andrewhazelden.com>')
  37. print('Web: www.andrewhazelden.com')
  38. print('----------------------------------------------')
  39.  
  40. local ui = fu.UIManager
  41. local disp = bmd.UIDispatcher(ui)
  42.  
  43. win = disp:AddWindow({
  44.     ID = 'EditWin',
  45.     TargetID = 'EditWin',
  46.     Geometry = {0, 0, 600, 600},
  47.     WindowTitle = 'Fusion Global Variable Viewer',
  48.     ui:VGroup{
  49.         ID = "root",
  50.        
  51.         -- Add your GUI elements here:
  52.         ui:HGroup{
  53.         Weight = 1,
  54.         ui:TextEdit{
  55.             ID = 'TextEdit',
  56.             TabStopWidth = 28,
  57.             Font = ui:Font{
  58.                 Family = 'Droid Sans Mono',
  59.                 StyleName = 'Regular',
  60.                 PixelSize = 12,
  61.                 MonoSpaced = true,
  62.                 StyleStrategy = {
  63.                     ForceIntegerMetrics = true
  64.                 },
  65.                 ReadOnly = true,
  66.             },
  67.             LineWrapMode = 'NoWrap',
  68.             AcceptRichText = false,
  69.  
  70.             -- Use the Fusion hybrid lexer module to add syntax highlighting
  71.             Lexer = 'fusion',
  72.             },
  73.         },
  74.        
  75.         ui:HGroup{
  76.             Weight = 0.1,
  77.             ui:Button{ID = "Refesh", Text = "Refresh Document",},
  78.         },
  79.        
  80.     },
  81. })
  82.  
  83. itm = win:GetItems()
  84.  
  85. -- Add your GUI element based event functions here:
  86.  
  87. -- Track the Fusion save events
  88. ui:AddNotify("Comp_Save", comp)
  89. ui:AddNotify("Comp_SaveVersion", comp)
  90. ui:AddNotify("Comp_SaveAs", comp)
  91. ui:AddNotify("Comp_SaveCopyAs", comp)
  92.  
  93. -- The window was closed
  94. function win.On.EditWin.Close(ev)
  95.     disp:ExitLoop()
  96. end
  97.  
  98. -- The "Refresh" button was pressed.
  99. function win.On.Refesh.Clicked(ev)
  100.     print('[Update] Refreshing the view.')
  101.     RefeshDocument()
  102. end
  103.  
  104. -- The Fusion "Save" command was used
  105. function disp.On.Comp_Save(ev)
  106.     print('[Update] Comp saved. Refreshing the view.')
  107.     RefeshDocument()
  108. end
  109.  
  110. -- The Fusion "Save Version" command was used
  111. function disp.On.Comp_SaveVersion(ev)
  112.     print('[Update] Comp saved as a new version. Refreshing the view.')
  113.     RefeshDocument()
  114. end
  115.  
  116. -- The Fusion "Save As" command was used
  117. function disp.On.Comp_SaveAs(ev)
  118.     print('[Update] Comp saved to a new file. Refreshing the view.')
  119.     RefeshDocument()
  120. end
  121.  
  122. -- The Fusion "Save Copy As" command was used
  123. function disp.On.Comp_SaveCopyAs(ev)
  124.     print('[Update] Comp saved as a copy to a new file. Refreshing the view.')
  125.     RefeshDocument()
  126. end
  127.  
  128. -- Load the current Fusion composite source contents into the viewer:
  129. function RefeshDocument()
  130.     print('Please be patient for about 10 seconds as this script runs. A 5 MB text file will be saved and opened.')
  131.    
  132.     -- The Fusion "Temp:/Fusion/" PathMap folder is created.
  133.     local pathFolder = app:MapPath('Temp:/Fusion/')
  134.     if bmd.direxists(pathFolder) == false then
  135.         bmd.createdir(pathFolder)
  136.         print('[Created Temp Folder] ' .. pathFolder)
  137.     end
  138.    
  139.     -- File to save to disk
  140.     globalsExportFile = app:MapPath(pathFolder .. 'FusionGlobals.txt')
  141.    
  142.     -- Write the Fusion internal global variables to disk
  143.     print('[Saving file] ' .. tostring(globalsExportFile))
  144.     bmd.writefile(globalsExportFile, dumptostring(getfenv()):gsub('\t', [[
  145.     ]]))
  146.    
  147.     -- Read in the active .txt as a file from disk then trim off the final null character from the file
  148.     print('[Reading file]')
  149.     rawDocument = io.open(globalsExportFile, 'r'):read('*all')
  150.     --document = rawDocument:sub(1,-2)
  151.     document = rawDocument:sub(1,-2):gsub([[\\n]], '\n')
  152.    
  153.     -- Update the TextEdit field contents
  154.     itm.TextEdit.PlainText = document
  155.    
  156.     -- Update the window title caption with the filename
  157.     -- itm.EditWin.WindowTitle = 'Fusion Global Variable Viewer: ' .. globalsExportFile
  158.    
  159.     -- Open up a desktop folder browsing window to this location
  160.     print('[Show Temp Folder] ' .. pathFolder)
  161.     bmd.openfileexternal("Open", pathFolder)
  162. end
  163.  
  164.  
  165. RefeshDocument()
  166.  
  167. win:Show()
  168. bgcol = { R=0.125, G=0.125, B=0.125, A=1 }
  169. itm.TextEdit.BackgroundColor = bgcol
  170. itm.TextEdit:SetPaletteColor('All', 'Base', bgcol)
  171.  
  172. -- The app:AddConfig() command that will capture the "Control + W" or "Control + F4" hotkeys so they will close the window instead of closing the foreground composite.
  173. app:AddConfig('EditWin', {
  174.     Target {
  175.         ID = 'EditWin',
  176.     },
  177.  
  178.     Hotkeys {
  179.         Target = 'EditWin',
  180.         Defaults = true,
  181.        
  182.         CONTROL_W = 'Execute{cmd = [[app.UIManager:QueueEvent(obj, "Close", {})]]}',
  183.         CONTROL_F4 = 'Execute{cmd = [[app.UIManager:QueueEvent(obj, "Close", {})]]}',
  184.     },
  185. })
  186.  
  187. disp:RunLoop()
  188. win:Hide()
  189.  
You do not have the required permissions to view the files attached to this post.

User avatar
Greg Bovine
Double M
Posts: 129
Joined: Fri Feb 02, 2018 6:07 am
Location: Oslo, Norway
Been thanked: 2 times
Contact:

Re: Building GUIs With Fusion's UI Manager

#170

Post by Greg Bovine » Thu Dec 13, 2018 7:29 am

AlbertoGZ wrote:
Thu Dec 13, 2018 5:23 am
I'm trying to do a ui.ComboBox in python language, but I do not reaching to port the lua syntax for AddItem. It's ui.ComboBox currently supported in python GUI Manager?
Have you tried reaching out to the Resolve support team at Blackmagic to request more developer-focused PDF documentation on scripting?

Possibly, if more people reached out and expressed an interest to BMD for newer and more detailed PDF guides covering scripting in the Fusion page then I suspect things would be less hit and miss. :)

User avatar
AndrewHazelden
Fusionator
Posts: 1387
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 4
Location: West Dover, Nova Scotia, Canada
Been thanked: 59 times
Contact:

FuScript Subtype Essentials

#171

Post by AndrewHazelden » Thu Dec 13, 2018 7:37 am

Overview

A little-known feature of the scripting modes in Resolve Studio, Generation, FusionServer, Fusion Studio, StudioPlayer, the Fusion Bin, and the Fusion Render manager is that they all allow for remote usage via FuScript. This is done via FuScript using the following Lua function:

bmd.scriptapp(host, ip, timeout, uuid, subtype)

I posted a small Reactor package called "Fusion Comp Link Atom" earlier this year that showed how the full-featured versions of Fusion Studio and Resolve Studio could be interconnected bi-directionally via FuScript.

Below is a new script that exposes and explains a few more details about the undocumented bmd.scriptapp() parameters like subtype that can be used to dramatically improve how you do pipeline integrations between BMD/Eyeon's post-production software. :)

Screenshot

FuScript and Subtype Essentials.png

FuScript ScriptApp Tips

1. You can probe the UUID value (which acts like a PID code) for multiple concurrent Fusion Studio sessions operating on a single host using:

Code: Select all

uuid = bmd.getappuuid()
bmd.setclipboard(uuid)
print('[UUID] ' .. uuid)
A real-world UUID value looks like this:

dbf0dc72-c9d5-46ce-bf46-6c5c4b7f9bc6

An empty UUID value of zero (0) can be used if you don't want to use the UUID property.

2. You can probe the active FuScript hosted systems on your network using:

dump(bmd.pinghosts())

or

==bmd.pinghosts()

The "bmd.pinghosts()" function returns a result table with content like this:

Code: Select all

table: 0x64c550d8
1 = table: 0x64c55120
	HostName = Pine.local
	IP = 10.20.30.82
	Hosts = table: 0x64c54f88
		1 = FusionServer
		2 = Fusion
		3 = Fusion
		4 = StudioPlayer
	UserName = andrew
	Platform = macOS
	Version = 9.0.2

If you wanted to gather the list of network accessible FuScript hosts from the terminal/command prompt you could use:

Code: Select all

'/Applications/Blackmagic Fusion 9/Fusion.app/Contents/MacOS/fuscript' -l lua -x 'dump(bmd.pinghosts())'

3. When using the bmd.scriptapp() Function, the host argument could be a string like:
  • Fusion
  • Resolve
  • Generation
  • StudioPlayer
  • FusionServer
When you are inside of the host app's Fusion console or a tool/comp script you can run this command to print back the active host app name:

dump(GetAppName())

In Fusion Studio you would get back a value of "Fusion" when you run that code snippet. And Yes. That snippet is written correctly. There is no bmd prefix needed to run the "GetAppName()" function.

Script

Code: [Select all] [Expand/Collapse] [Download] (FuScript Subtype Essentials.lua)
  1.  
  2. --[[--
  3. FuScript Subtype Essentials - v1 2018-12-13
  4. By Andrew Hazelden <andrew@andrewhazelden.com>
  5. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  6.  
  7. ## Overview ##
  8.  
  9. Resolve Studio, Generation, Fusion Studio, the Fusion Bin Player, and the Fusion Render manager all allow for remote usage via FuScript.
  10.  
  11. This is done via FuScript using the following Lua function:
  12.  
  13.     bmd.scriptapp(host, ip, timeout, uuid, subtype)
  14.  
  15. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  16.  
  17. ## Script Output ##
  18.  
  19. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  20. FuScript and Subtype Essentials - v1 2018-12-13
  21. By Andrew Hazelden <andrew@andrewhazelden.com>
  22. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23.  
  24. [ScriptApp Session]
  25. table: 0x6341c938
  26.     FUSIONS_CLVendor = Intel
  27.     FUSIONS_FileName = /Applications/Blackmagic Fusion 9/Fusion.app/Contents/MacOS/Fusion
  28.     FUSIONH_CurrentComp = Composition (0x0x7f9cfa132200) [App: 'Fusion' on 127.0.0.1, UUID: dbf0dc72-c9d5-46ce-bf46-6c5c4b7f9bc6]
  29.     FUSIONI_PhysicalRAMTotalMB = 16384
  30.     FUSIONS_CLVersion = OpenCL 1.2  1.1
  31.     FUSIONI_VersionLo = 131079
  32.     FUSIONS_MachineType = IA32
  33.     FUSIONI_PhysicalRAMFreeMB = 11041
  34.     FUSIONI_VersionHi = 589824
  35.     FUSIONB_IsManager = false
  36.     FUSIONS_Version = 9.0.2
  37.     FUSIONS_CLType = CPU
  38.     FUSIONS_CLDevice = Intel(R) Core(TM) i7-4578U CPU @ 3.00GHz
  39.     FUSIONI_SerialHi = XXXXXXXXX
  40.     FUSIONI_VirtualRAMTotalMB = 16384
  41.     FUSIONS_GLVendor = Intel Inc.
  42.     FUSIONS_GLVersion = 2.1 INTEL-10.36.19
  43.     FUSIONI_VirtualRAMUsedMB = 5342
  44.     FUSIONB_IsRenderNode = false
  45.     FUSIONS_GLDevice = Intel Iris OpenGL Engine
  46.     FUSIONI_NumProcessors = 4
  47.     FUSIONI_SerialLo = 0
  48.  
  49.  
  50. [Comp Session]
  51. table: 0x678962a8
  52.     COMPN_LastFrameRendered = -2000000000
  53.     COMPB_HiQ = true
  54.     COMPI_RenderFlags = 131088
  55.     COMPN_ElapsedTime = 0
  56.     COMPN_AverageFrameTime = 0
  57.     COMPB_Locked = false
  58.     COMPB_Modified = false
  59.     COMPN_TimeRemaining = 0
  60.     COMPN_CurrentTime = 1
  61.     COMPN_RenderEnd = 1
  62.     COMPN_AudioOffset = 0
  63.     COMPS_Name = LookingGlassRenderer3D.comp
  64.     COMPN_GlobalStart = 1
  65.     COMPI_RenderStep = 1
  66.     COMPS_FileName = /Volumes/Media/LookingGlassRenderer3D.comp
  67.     COMPB_Rendering = false
  68.     COMPN_RenderStartTime = 1
  69.     COMPN_GlobalEnd = 2
  70.     COMPN_RenderEndTime = 1
  71.     COMPN_RenderStart = 1
  72.     COMPN_LastFrameTime = 0
  73.     COMPB_Proxy = false
  74.  
  75. ## Tips ##
  76.  
  77. 1. You can probe the UUID value (which acts like a PID code) for multiple concurrent Fusion Studio sessions operating on a single host using:
  78.  
  79. uuid = bmd.getappuuid()
  80. bmd.setclipboard(uuid)
  81. print('[UUID] ' .. uuid)
  82.  
  83. A real-world UUID value looks like this:
  84.  
  85.     dbf0dc72-c9d5-46ce-bf46-6c5c4b7f9bc6
  86.  
  87. An empty UUID value of zero (0) can be used if you don't want to use the UUID property.
  88.  
  89. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  90.  
  91.  
  92. 2. You can probe the active FuScript hosted systems on your network using:
  93.  
  94.     dump(bmd.pinghosts())
  95.    
  96.     or
  97.    
  98.     ==bmd.pinghosts()
  99.  
  100. The "bmd.pinghosts()" function returns a result table with content like this:
  101.  
  102. table: 0x64c550d8
  103. 1 = table: 0x64c55120
  104.     HostName = Pine.local
  105.     IP = 10.20.30.82
  106.     Hosts = table: 0x64c54f88
  107.         1 = FusionServer
  108.         2 = Fusion
  109.         3 = Fusion
  110.         4 = StudioPlayer
  111.     UserName = andrew
  112.     Platform = macOS
  113.     Version = 9.0.2
  114.    
  115.    
  116. If you wanted to gather the list of network accessible FuScript hosts from the terminal/command prompt you could use:
  117.  
  118.     '/Applications/Blackmagic Fusion 9/Fusion.app/Contents/MacOS/fuscript' -l lua -x 'dump(bmd.pinghosts())'
  119.  
  120.  
  121. 3. When using the bmd.scriptapp() Function, the host argument could be a string like:
  122.  
  123. Fusion
  124. Resolve
  125. Generation
  126. StudioPlayer
  127. FusionServer
  128.  
  129. When you are inside of the host app's Fusion console or a tool/comp script you can run this command to print back the active host app name:
  130.  
  131. dump(GetAppName())
  132.  
  133. In Fusion Studio you would get back a value of "Fusion" when you run that code snippet. And Yes. That snippet is written correctly. There is no bmd prefix needed to run the "GetAppName()" function.
  134.  
  135. --]]--
  136.  
  137. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  138. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  139.  
  140. print('\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
  141. print('FuScript and Subtype Essentials - v1 2018-12-13')
  142. print('By Andrew Hazelden <andrew@andrewhazelden.com>')
  143. print('-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n\n')
  144.  
  145. -- bmd.scriptapp() Connection settings
  146.  
  147. -- Choose which API you want to connect to (Fusion vs Resolve)
  148. -- Link to the Fusion() API in a comp session
  149. local host = 'Fusion'
  150.  
  151. -- Links to Resolve() API in a Resolve video editing session
  152. -- local host = 'Resolve'
  153.  
  154. -- You also have the option to binding against these APIs too:
  155. -- local host = 'Generation'
  156. -- local host = 'StudioPlayer'
  157. -- local host = 'FusionServer'
  158.  
  159. -- The remote system's IP address or domain name for FuScript to connect to
  160. -- For your own system the "localhost" value can also be "127.0.0.1"
  161. local ip = '127.0.0.1'
  162.  
  163.  
  164. -- (Optional) Define a timeout value should the connection request fail
  165. local timeout = 0.0
  166.  
  167.  
  168. -- (Optional) Define which Fusion session you want to connect to - If multiple are running on the same computer
  169. local uuid = 0
  170.  
  171.  
  172. -- A sub-type is the type of FuScript process you are connecting to on the remote system:
  173. -- local subtype = 'Resolve' -- Resolve GUI session
  174. local subtype = 'Interactive' -- Fusion GUI session
  175. -- local subtype = 'Bins' -- Fusion Studio Bin window
  176. -- local subtype = 'Playback'-- Fusion Studio Bin - Playback window
  177. -- local subtype = 'RenderManager' -- Fusion Studio Render Manager GUI (master)
  178. -- local subtype = 'RenderManagerLite' -- Fusion (Free)  Render Manager GUI (master)
  179. -- local subtype = 'Renderer' -- A Fusion render node (slave)
  180. -- local subtype = 'RendererLite' -- A Fusion (Free) GUI render session (slave)
  181.  
  182.  
  183. -- Connection parameters: bmd.scriptapp(host, ip, timeout, uuid, subtype)
  184. local remoteFu = bmd.scriptapp(host, ip, timeout, uuid, subtype)
  185.  
  186. if remoteFu then
  187.     -- List the scriptapp session details
  188.     print('\n[ScriptApp Session]')
  189.     dump(remoteFu:GetAttrs())
  190.    
  191.     if host == 'Fusion' then
  192.         -- List the comp session details
  193.         remoteComp = remoteFu.CurrentComp
  194.         if remoteComp then
  195.             print('\n[Comp Session]')
  196.             dump(remoteComp:GetAttrs())
  197.         end
  198.     end
  199. else
  200.     print('[Error] Failed to connect to ' .. tostring(subtype) .. '@' .. tostring(ip) .. '.')
  201. end
  202.  
  203. print('\n\n-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-')
  204. print('[Done]')
  205.  

Bonus Tip


Besides using the bmd.scriptapp() FuScript command inside of Fusion/Resolve/Generation's GUI you can also do all of these tasks from the terminal/command prompt using the FuScript executable.

In this example you can run a Lua script from the terminal via FuScript with all of the extra parameters needed to connect to a local system via "localhost" using the following BASH terminal window command.

If you wanted, you could change the "localhost" value to be a remote machine with LAN based IP address like "10.20.30.100" or "192.168.0.100".

This example passes a Lua table value from the FuScript CLI to the Reactor provided "Atomizer" package editor. This value passing approach causes a specific .atom file to be loaded in the atomizer GUI automatically:

Code: Select all

'/Applications/Blackmagic Fusion 9/Fusion.app/Contents/MacOS/fuscript' -l lua -x 'fusion = bmd.scriptapp("Fusion", "localhost", 0.0, 0, "Interactive");if fusion ~= nil then fu = fusion;app = fu;composition = fu.CurrentComp;comp = composition;SetActiveComp(comp) else print("[Error] Please open up the Fusion GUI before running this tool.") end comp:RunScript(fusion:MapPath("Reactor:/System/UI/Atomizer.lua"), {atomFile = "Reactor:/Atoms/Reactor/com.AndrewHazelden.Atomizer.atom"})'
In this example you could change the macOS file path to FuScript over to the Windows based executable path of:
C:\Program Files\Blackmagic Design\Fusion 9\FuScript.exe


or the Linux FuScript path of:
/opt/BlackmagicDesign/Fusion9/fuscript


If you wanted the Resolve Fusion page to be the program to run your Fuscript commands on your local system you could use:

Code: Select all

'/Applications/DaVinci Resolve/DaVinci Resolve.app/Contents/Libraries/Fusion/fuscript' -l lua -x 'fusion = bmd.scriptapp("Fusion", "localhost", 0.0, 0, "Resolve");if fusion ~= nil then fu = fusion;app = fu;composition = fu.CurrentComp;comp = composition;SetActiveComp(comp) else print("[Error] Please open up the Fusion GUI before running this tool.") end comp:RunScript(fusion:MapPath("Reactor:/System/UI/Atomizer.lua"), {atomFile = "Reactor:/Atoms/Reactor/com.AndrewHazelden.Atomizer.atom"})'
You do not have the required permissions to view the files attached to this post.

User avatar
SirEdric
Fusionator
Posts: 1960
Joined: Tue Aug 05, 2014 10:04 am
Answers: 4
Real name: Eric Westphal
Been thanked: 136 times
Contact:

Re: Building GUIs With Fusion's UI Manager

#172

Post by SirEdric » Thu Dec 13, 2018 10:00 am

@AndrewHazelden , man, your retirement from Fusion works wonders...:-)
Awesome! Thanks for sharing!

User avatar
AndrewHazelden
Fusionator
Posts: 1387
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 4
Location: West Dover, Nova Scotia, Canada
Been thanked: 59 times
Contact:

Re: Building GUIs With Fusion's UI Manager

#173

Post by AndrewHazelden » Thu Dec 13, 2018 10:27 am

SirEdric wrote:
Thu Dec 13, 2018 10:00 am
@AndrewHazelden , man, your retirement from Fusion works wonders...:-)
LOL... I wouldn't quite say that. :roll:

There is still a small backlog of unpublished things I made this year that were on hold while Resolve was in beta. I will be pushing those out on WSL before Xmas arrives. New Reactor atoms for December will include a special KaraVR v4 for Reactor release as a free download for WSL members. ETA for that is ~Dec 17th, 2018.

Sometime, down the road, I should show you the advanced stuff I am working on in SilhouetteFX v7 and Houdini Indie. Now *that* is cool tech... which will hopefully compete with the best of what Fraunhofer IIS (DE) is working on in their R&D labs. :P

Speaking candidly, BMD's "Vision" quest + Resolve's management staff didn't like my suggestions for empowering cutting-edge filmmakers with next-generation tech... so I'm having to help work on that type of future elsewhere. The upside, if there is any, is that I decided to give @Secondman and WSL the KartaVR for Fusion and Resolve toolset since BMD has thus far shown no interest in pushing immersive tech beyond what they shipped in FU 9. :bmd:
Last edited by AndrewHazelden on Mon Dec 17, 2018 3:07 am, edited 1 time in total.

User avatar
Chad
Fusionator
Posts: 1419
Joined: Fri Aug 08, 2014 1:11 pm
Been thanked: 14 times

Re: Building GUIs With Fusion's UI Manager

#174

Post by Chad » Thu Dec 13, 2018 12:38 pm

What's crazy is BMD could ship their highest price SKU with a new camera system. If they made something like a Facebook 360 camera and shipped it with Fusion for processing, they could move so much product and do it for 1/2 the price that Facebook is charging.

User avatar
AndrewHazelden
Fusionator
Posts: 1387
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 4
Location: West Dover, Nova Scotia, Canada
Been thanked: 59 times
Contact:

Re: Building GUIs With Fusion's UI Manager

#175

Post by AndrewHazelden » Thu Dec 13, 2018 12:55 pm

Chad wrote:
Thu Dec 13, 2018 12:38 pm
What's crazy is BMD could ship their highest price SKU with a new camera system. If they made something like a Facebook 360 camera and shipped it with Fusion for processing, they could move so much product and do it for 1/2 the price that Facebook is charging.
Hi @Chad.

Yeah. For the last ~year after Fu 9's VR toolset came out I had hoped BMD would do something like that. Now... I don't expect anything quite that modern from GP, PC, or SR. But you can get a hell of a good deal on ATEM switches with Resolve Studio 15 bundled in for free. :mrgreen:

Facebook Surround

Speaking of Facebook Surround 360 cameras, if you have one, KartaVR has a built-in PFM depth data batch processor script. So you can use PTGui + KartaVR + Fusion + Enblend to do a 6DOF color + depthmap stereo stitch from some of the really high spec 360VR systems. Neither Adobe AE's immersive toolset or Kolor APV can do that with such control and flexibility *inside* their app eco-system.

Convert PFM Depth Images Script

The is a Lua scripted tool from KartaVR for batch PFM conversions of Facebook Surround depth data.

script-convert-pfm-depth-images.png


CLI pfmtopsd Tool


This is a KartaVR based pfmtopsd command line tool Paul Bourke helped develop. The output can be piped into ImageMagick or ffmpeg from the terminal.

tools-pfmtopsd-command-prompt.png

JauntVR JauntOne Rigs

JauntOne Rig Imported.png
FYI this is what a JauntVR JauntOne rig's looks like when it is imported into Fusion. You can process the footage using either Eyeon Dimension based disparity approaches, your own CustomShader3D rectilinear spherical image remapping CG fragment shader code, or with split view stereo stitching + masking done on UV Pass (ST Map) warping maps or via node based procedural approaches. The JauntOne rigs have dropped from $100K USD down to $6K USD (@ the Surplus Liquidation Sale) to $25K USD (@ B&H Photo) now.

Amzazing Prices

The JauntOne camera liquidation auction is closing today. Look at these prices!!! I'd hate to think about the people who bought Ozo, GoPro Omni's, or an Orah 4i's in comparison. :shock:

2018-12-13 JauntOne rigs Clearance Auction.jpg

Edit: And now the JauntOne bidding has closed.

2018-12-13 JauntOne Internet bidding has closed.png

JauntOne Post Workflows


Stitching things like JauntOne media is where node-based workflows really shine. You don't need to render a lot of intermediate temp files going node based, and Fusion Standalone's proxy system is awesome and responsive. But you sure do need to know Fusion at an advanced level to get a fine stitch quality result.


PTGui Project Importer
PTGui Project Importer.png

This is a starting point tool for ingesting the media from a PTGui .pts file as Fusion nodes that are placed into your copy/paste clipboard.


PTGui Mask Importer
PTGui Mask Importer.png

This script saves out all of the PTGui custom painted masking data that is encoded in a .pts file as base64 encoded image data.


Generate UV Pass in PTGui
Generate UV Pass in PTGui.png

This script generates an automatic output of a modified PTGui .pts file with UV Pass (ST maps) images per camera view written to disk. Those UV Pass images could be used in Fusion's built-in Texture node, or TouchDesigner's UV pass warping node, or RE:Vision Effects RE:Map plugin, etc.

PTGui UV Pass Warping Maps.png
You do not have the required permissions to view the files attached to this post.

User avatar
AndrewHazelden
Fusionator
Posts: 1387
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 4
Location: West Dover, Nova Scotia, Canada
Been thanked: 59 times
Contact:

Fusion PipePixelFont Experiment

#176

Post by AndrewHazelden » Thu Dec 13, 2018 4:30 pm

I wanted to post a few tidbits left over from a small experiment I started back on Aug 11, 2017, when I was first exploring UI Manager based GUI creation ideas and the wonders of .fu file hotkey definitions.

The PipePixelFont test explained below was something that I never really got back to finishing up to the level I had originally hoped to do so it was basically incomplete and stuck in limbo - and as such not posted on WSL for more than a year. The release of WSL Reactor v1 and v2 and so many other projects + small reactor atoms happened in the meantime. :)




Macro Based PipePixelFont Prototype

PipeRouter-Pixel-Font-Alphabet.png
Download

Macro-Based-PipePixelFont-Prototype.zip

Overview

The PipePixelFont was a proof-of-concept set of macros + a config .fu file that used pipe-router nodes to create the rough look of a large scale font glyph set. Well. It looked okay if you zoomed out really wide in your comp.

The PipePixelFont goal was a bit of an edge case thing - I needed a way to label the parts of my then massive Fusion node graphs with captions so at the maximum zoom out level I could see what I was looking at. :D

Installation

Step 1. Install the Macros.

To use this example, unzip the Macro-Based-PipePixelFont-Prototype.zip file and put the "Macros/PipePixelFont" folder into your Fusion "Macros:/" PathMap location which exists in your Fusion user prefs folder.

Step 2. Install the .fu based Hotkeys file.

You need to take the "Config" based PipePixelFont Hotkeys.fu file and put it in your Fusion "Config:/" PathMap location which exists in your Fusion user prefs folder.

Step 3. When you restart Fusion Standalone and open a new composite, you will now have the ability to live type any character you want into the Flow area by holding down the "Shift" key then pressing the letters A-Z on your keyboard.

The way the PipePixelFont Hotkeys.fu file works is almost ridiculously simple: If you look at how the hotkey binding code snippet below each of the mapped per hotkey letters will run an AddSetting() command which to loads in an individual macro based .setting file.

Code: Select all

  Hotkeys
  {
    Target = "FlowView",
    
    -- Add the Pixel Pipe Font character key bindings so you can type your piperouter based words right into the Fusion comp flow area. :-)
    
    SHIFT_A = "AddSetting{filename = 'Macros:/PipePixelFont/FontA.setting'}",
    SHIFT_B = "AddSetting{filename = 'Macros:/PipePixelFont/FontB.setting'}",
    SHIFT_C = "AddSetting{filename = 'Macros:/PipePixelFont/FontC.setting'}",
Fusion Preferences

Disable Auto Remove Piperouter.png

You need to open the "Fusion > Preferences > Global and Default Settings > Flow" window.

Uncheck the "Auto remove routers" option. This setting is defined as a "global" scope but I think it also applies and is saved in any *new* composites you create and save from this point onwards in your use of Fusion.

This step is very important if you want to use piperouters in a comp for creative purposes. By disabling the "Auto remove routers" checkbox, Fusion will keep disconnected piperouters around in your comp after you delete a node.

UI Manager PipePixelFont GUI Demo

PipePixelFont UI.png

Download

UI-Manager-PipePixelFont-GUI-Demo.zip

Overview

I had soo much fun making this simple GUI demo as it gave me a way to generate a custom image-font based text preview window. It's surprisingly fast and you can live type in the letters A-Z, spaces, commas, periods, and exclamation marks!

This script is a Fusion Lua based example that works in Fusion 8.2.1 and Fusion 9 that uses the HTML loading capacity of the ui:textField to display an image.

If you look at the code in this demo you can see the resizable background "node view" like grid texture was done using old-school HTML + CSS with a "background-image" tag:

Code: Select all

	<style>
		body { background-image: url('grid.png') }
	</style>
Installation

Step 1. Copy the "PipePixelFont.lua" script and the "glyphs" folder of images to your Fusion user preferences "Scripts/Comp/" folder.

Step 2. Once the script is copied into the "Scripts/Comp/" folder you can then run it from inside Fusion's GUI by going to the Script menu and selecting the "PipePixelFont" item.

Step 3. Live type text into the top text field in the GUI and the output will be rendered in the HTML canvas area as PixelPixelFont characters. This is done using snapshotted sprites of each of the Node view glyphs.

Closing Notes

Originally, I had hoped to use this GUI as a visual text composition window that would then place the individual PixelPixelFont characters as you typed them into the copy/paste clipboard.

Life intervened, and I then had other priorities to attend to so this effort got parked at the state where you see it now.
You do not have the required permissions to view the files attached to this post.

User avatar
pixelstuff
Posts: 41
Joined: Sun Jul 15, 2018 11:50 am
Been thanked: 1 time

Re: Building GUIs With Fusion's UI Manager

#177

Post by pixelstuff » Fri Dec 21, 2018 1:37 pm

This is a good idea, would be good to have larger labels like Houdini and Substance designer.

I have a question related to referencing the screen with the mouse. So things like pick whipping the correct name "Angle" "Size" as an example instead of the user typing it in to a box on the GUI. Or even how you screen pick a color reference from the cursor position, like how the background tool has that option.

I have seen some code for getting the mouse x and y but nothing for sampling whats under the cursor, if that's possible with script?

User avatar
AndrewHazelden
Fusionator
Posts: 1387
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 4
Location: West Dover, Nova Scotia, Canada
Been thanked: 59 times
Contact:

The Guide to Mastering UI Manager Without an Official Guidebook

#178

Post by AndrewHazelden » Fri Dec 21, 2018 5:30 pm

pixelstuff wrote:
Fri Dec 21, 2018 1:37 pm
I have seen some code for getting the mouse x and y but nothing for sampling whats under the cursor, if that's possible with script?

That question has multiple answers.

Selection/Context Aware UI Manager Actions

Blackmagic Design has refused to publish any useful or detailed official documentation guides on the "UI Manager" API during the full Fusion 8.2.1, Fusion 9, and Resolve 15 release cycles that had UI Manager present in them. Nothing. Nada. Zip.

In fact for LOLz if you look at the Fusion 9 bundled developer documentation of the "Fusion 8 Script Manual.pdf" file, when you browse to the "Events and Callbacks" section on page 25 they list functionality that has never existed in Fusion 8 or 9!

Those features were ripped out after the Fusion 7.x era but BMD's technical writer team was "asleep at the switch" and spending all their time putting typographer's quotes into the code snippets in the PDF to look fancy but make code that could never run.

By Fusion 8 and 9 all the events and callbacks are actually done using .fu or .zfu files with Actions and Events entries.

These .fu files need to placed into one of your Config:/ PathMap folders to work. AFAIK you won't see any documentation on how to make a .zfu file either from any of BMD's official PDF guides...

TBH it's just not something the Resolve/Fusion product management staff prioritize, care about, or value. That's likely since software pipeline automation and supporting TD's... doesn't directly sell truckloads of BMD ATEM switches or Resolve control panels which appear to be what matters these days. :(

Events and Callbacks.png

The reason I am mentioning Actions and Events as being important in Fusion is that your custom GUI is capable of being context sensitive and responding to the active node selection that updates in real-time during the artist session in Fusion.

If you look at the following UI Manager Lua examples in Reactor you will see code examples and details that you could use to make it so your script's gui could refresh and list the inputs and outputs that exist on the selected node in a "ComboControl".

  • Scripts:/Comp/List Input Control Names.lua
  • Scripts:/Comp/List Output Control Names.lua
  • Scripts:/Comp/Action Listener.lua
  • Scripts:/Comp/Action Printout.lua
  • Config:/UI Manager/Selected Node Count HUD.fu.zip
  • Config:/UI Manager/FusionCompEvents.fu.zip

Other Approaches

Not everything you would think of doing as a "script" needs to be done in Lua/Python from a Tools or Comp script.

You can make a lot of custom tools in Fusion as macros and fuses and they will let you use expression linking, and a native color picker control on the macro node. You can also embed Lua scripts into the ButtonControls's "BTNCS_Execute" attribute in your macro node. And you can even pack UI Manager GUI's into a button on macro node too!

The Cryptomatte.fuse Locator Control

The Cryptomatte Fuse has a color picker that was implemented as a locator like "cursor" on the node. That position can then be used inside of the fuse to read data at a specific image coordinate.
cryptomatteFusionScreenshot.png

Macros and Expressions

VFXPedia Macro Tips

VFXPedia Gringo - User Controls - Color Control

Any expression field can hold a raw Lua code snippet by starting the line of the expression with a colon like :. Just make sure to return a value from the expression if you do the Lua code thing that way.

Learning how to discover and use Fusion/Resolve's Undocumented API Features

Technically, you could spend part of an afternoon and use Reactor to install the "Scripts/Comp/UI Manager Lua & Python Examples" atom package to answer your questions at a very very deep level. Anything that could *ever* be done in a fuse, macro, or script in the copy of Fusion sitting on your computer could *theoretically* be probed using the following tools:

You would start by running the "FusionScript Help Browser" script to peek inside Fusion and see what members and classes exist under the hood.

Then the "Action Listener" script can show you callbacks that are triggered when you interact inside of the Fusion UI with anything that was coded using the modern "Actions" system that can be listened too.

The "Fusion Global Variable Viewer" tool lets you browse through a memory dump of all global variables inside of Fusion. This can reveal types of UI controls on that have never been revealed by Eyeon or BMD for macros, fuses, and UI controls. It is technically a view of everything.

And finally, you could use the "Fusion Registry Scanner" tool as well.

Those tools don't tell you the code to use. But they give you a good idea of the base functions and features that are possible.

@pixelstuff Good Luck! I had a lot of fun exploring UI Manager in 2017 and 2018. I hope you get the same amount of joy seeing what is possible in 2019 when you customize your working environment and truly personalize your Fusion workflows. IMO it can be enormously satisfying and rewarding to make a tool work just how you like it. :)
You do not have the required permissions to view the files attached to this post.

User avatar
AndrewHazelden
Fusionator
Posts: 1387
Joined: Fri Apr 03, 2015 3:20 pm
Answers: 4
Location: West Dover, Nova Scotia, Canada
Been thanked: 59 times
Contact:

UI Manager Toolbar With Icons

#179

Post by AndrewHazelden » Thu Jan 24, 2019 12:17 pm

This week I updated the Reactor based "Scripts/Comp/UI Manager Lua & Python Examples" atom package. A new UI Manager "Toolbar" example was added that shows a simple GUI mockup that creates a ui:Icon and ui:Button based toolbar.


Where is the Toolbar Example Located?

After you install the "UI Manager Lua & Python Examples" atom package, you can access the Toolbar.lua example using the "Script > UI Manager > Toolbar > Toolbar" menu item.

Scripts-UI-Manager-Toolbar-Menu-Item.png

Toolbar UI

Reactor-UI-Manager-Toolbar-Example.png

The toolbar was designed to visually re-create the look of Fusion's viewer window using the icon resources pulled from the zipped Fusion Standalone 9 Fuskin file. It's worth noting that none of the buttons change the state of the active viewer window - the familiar controls are simply used as placeholders to inspire you to make your own custom UIs and tools.

Button Feedback

When the Toolbar buttons are clicked a textual message is printed to the Console view that indicates the pressed button name and its state.

Code: Select all

[360][Button State] true
[ROI][Button State] true
[DoD][Button State] true
[LockCold][Button State] true
[SmR][Button State] true

Some of the buttons have a Checkable = true, entry that allows the buttons to work with a toggled On/Off state.
You do not have the required permissions to view the files attached to this post.

User avatar
pixelstuff
Posts: 41
Joined: Sun Jul 15, 2018 11:50 am
Been thanked: 1 time

Re: Building GUIs With Fusion's UI Manager

#180

Post by pixelstuff » Sun Feb 03, 2019 4:14 am

Thanks for providing all of this info, I think I have an idea of how these actions work now, opens up a lot more possibilities. I have created a time change example running along with your tool input example.

A problem I'm running into is for some reason the action detection stops(see gif) after a period of time or number of iterations(both time and inputs). Would you have any idea what could possibly be causing this, as I also checked the UI Manager "List input control names" examples in Reactor and it seems to do the same in Win10 and Mac OSX.

The console "time changed" is within the function below.

Code: Select all

ui:AddNotify('Time_Set', comp)

function disp.On.Time_Set(ev)
	print('time changed')
end

Image