Jump to: Board index » General » Fusion

Added a Reload Button to the Loader Node

Learn about 3D compositing, animation, broadcast design and VFX workflows.
  • Author
  • Message
Offline

bentheanimator

  • Posts: 431
  • Joined: Mon May 13, 2019 10:38 pm
  • Location: Minneapolis, MN
  • Real Name: Ben Hall

Added a Reload Button to the Loader Node

PostFri Dec 02, 2022 7:47 pm

If you have ReLoadLoaders downloaded from Reactor this macro adds a "Reload Loader" button.
Screenshot 2022-12-02 134511.png
Screenshot 2022-12-02 134511.png (128.9 KiB) Viewed 592 times

Code: Select all
{
   Tools = ordered() {
      Loader = Loader {
         Clips = {
         },
         CtrlWZoom = false,
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 1925, -280.5 } },
         UserControls = ordered() {
            ML = {
               ICS_ControlPage = "File",
               LINKID_DataType = "Number",
               BTNCS_Execute = " tool = comp.ActiveTool; comp:RunScript(\"Scripts:Reactor\Deploy\Scripts\Comp\AlbertoGZ\ReloadLoaders\ReloadLoaders.py\", tool) ",
               INPID_InputControl = "ButtonControl",
               INP_Default = 0,
               LINKS_Name = "Reload Loader",
            },
         }
         
      }
   },
}





I called it Loader Plus to go along with Saver Plus that comes with Saver Manager from Alexey Bogomolov on Reactor aswell.

This macro will create a Loading flow with:
Loader Plus -- Resize -- OUT_Bol Wireless_OUT
To save time adding footage.
Code: Select all
{
   Tools = ordered() {
      Loader = Loader {
         Clips = {
         },
         CustomData = {
            Path = {
               Map = {
                  ["Setting:"] = "Macros:\\"
               }
            },
         },
         Inputs = {
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
         },
         ViewInfo = OperatorInfo { Pos = { 110, -2920.5 } },
         UserControls = ordered() {
            ML = {
               LINKS_Name = "Reload Loader",
               ICS_ControlPage = "File",
               BTNCS_Execute = " tool = comp.ActiveTool; comp:RunScript(\"Scripts:ReactorDeployScriptsCompAlbertoGZReloadLoadersReloadLoaders.py\", tool) ",
               LINKID_DataType = "Number",
               INPID_InputControl = "ButtonControl",
               INP_Default = 0,
            }
         }
      },
      Resize = BetterResize {
         CustomData = {
            Path = {
               Map = {
                  ["Setting:"] = "Macros:\\"
               }
            }
         },
         Inputs = {
            Width = Input { Value = 1920, },
            Height = Input { Value = 1080, },
            HiQOnly = Input { Value = 0, },
            PixelAspect = Input { Value = { 1, 1 }, },
            Input = Input {
               SourceOp = "Loader",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 110, -2821.5 } },
      },
      OUT_Loader = ChannelBoolean {
         CustomData = {
            Path = {
               Map = {
                  ["Setting:"] = "Macros:\\"
               }
            },
         },
         Inputs = {
            Background = Input {
               SourceOp = "Resize",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo {
            Pos = { 110, -2722.5 },
            Flags = {
               ShowPic = true
            }
         },
      },
      wLoader = Fuse.Wireless {
         CtrlWZoom = false,
         NameSet = true,
         CustomData = {
            Path = {
               Map = {
                  ["Setting:"] = "Macros:\\"
               }
            },
         },
         Inputs = {
            Input = Input {
               SourceOp = "OUT_Loader",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 110, -2623.5 } },
      }
   }
}


This macro will call Saver Plus from your Select Tool pop-up.
Code: Select all
{
   Tools = ordered() {
      Saver1 = Saver {
         CtrlWZoom = false,
         Inputs = {
            ProcessWhenBlendIs00 = Input { Value = 0, },
            Clip = Input {
               Value = Clip {
                  Length = 0,
                  Saving = true,
                  TrimIn = 0,
                  ExtendFirst = 0,
                  ExtendLast = 0,
                  Loop = 1,
                  AspectMode = 0,
                  Depth = 0,
                  GlobalStart = -2000000000,
                  GlobalEnd = 0
               },
            },
            OutputFormat = Input { Value = FuID { "OpenEXRFormat" }, },
            ["Gamut.SLogVersion"] = Input { Value = FuID { "SLog2" }, },
            ["OpenEXRFormat.CompressionLevel"] = Input { Value = 4, },
         },
         ViewInfo = OperatorInfo { Pos = { 220, 940.5 } },
         UserControls = ordered() {
            SOLO = {
               BTNCS_Execute = "    \n        function check_selected(tool)\n            return tool:GetAttrs('TOOLB_Selected')\n        end\n\n        function check_enabled(tool)\n            return tool:GetAttrs('TOOLB_PassThrough')\n        end\n\n        local comp = fu:GetCurrentComp()\n        local selectedSavers = comp:GetToolList(true, \"Saver\")\n        local allSavers = comp:GetToolList(false, \"Saver\")\n\n        comp:StartUndo(\"Solo Saver\")\n        \n        for _, currentSaver in pairs(allSavers) do\n            if not check_selected(currentSaver) then\n                currentSaver:SetAttrs( { TOOLB_PassThrough = true } )\n            end\n        end\n        \n        for _, sel in pairs(selectedSavers) do\n            if check_enabled(sel) then\n                sel:SetAttrs({ TOOLB_PassThrough = false})\n            end\n        end \n        comp:EndUndo()\n    ",
               LINKS_Name = "Solo",
               LINKID_DataType = "Number",
               INP_Default = 0,
               INPID_InputControl = "ButtonControl",
               ICS_ControlPage = "File",
            },
            ML = {
               BTNCS_Execute = " tool = comp.ActiveTool; comp:RunScript(\"Scripts:Comp/Saver Tools/LoaderFromSaver.lua\", tool) ",
               LINKS_Name = "Make Loader",
               LINKID_DataType = "Number",
               INP_Default = 0,
               INPID_InputControl = "ButtonControl",
               ICS_ControlPage = "File",
            },
            VersionUP = {
               BTNCS_Execute = " tool = comp.ActiveTool; comp:RunScript(\"Scripts:Support/SaverPlus/ButtonVersionUp.py\", tool) ",
               LINKS_Name = "Version UP",
               LINKID_DataType = "Number",
               INP_Default = 0,
               INPID_InputControl = "ButtonControl",
               ICS_ControlPage = "File",
            },
            VersionDOWN = {
               BTNCS_Execute = " tool = comp.ActiveTool; comp:RunScript(\"Scripts:Support/SaverPlus/ButtonVersionDown.py\", tool) ",
               LINKS_Name = "Version DOWN",
               LINKID_DataType = "Number",
               INP_Default = 0,
               INPID_InputControl = "ButtonControl",
               ICS_ControlPage = "File",
            }
         }
      }
   },
   ActiveTool = "Saver1"
}


Add these to your Macros folder for Fusion or Resolve and you can call them from the Tool Selection pop-up.

This forum is great for troubleshooting but useful flows are a little sparse. Maybe we can start sharing some of the stuff we use to make Fusion more useful. Houdini has a bunch of tools that are just bundles of other tools so you don't have to rebuild Rome every time. We should have the same.
Resolve & Fusion Studio 18.6.5
Windows 10
Intel Xeon CPU 2699A @ 2.40GHz | 128GB RAM | 2xRTX3090 | 512NVME System | 8TB NMVE Scratch | 80TB 8Gbps Fiber

MacOS 12.7.2
MacBook Pro 13,3 | 16GB | Radeon 460 4GB | 256GB System | 256GB Scratch
Offline
User avatar

Bryan Ray

  • Posts: 2478
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Added a Reload Button to the Loader Node

PostSat Dec 03, 2022 12:39 am

Instead of a macro, I just save the tool with the buttons as a default. If you want to get super fancy in Reactor, check out what I did with the install script for the Loaders_MakeLocal atom. If I remember what I did correctly, it will even splice the button into an existing modified default.

Good idea on the Reload button! I'm kind of surprised nobody thought of it previously!
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

bentheanimator

  • Posts: 431
  • Joined: Mon May 13, 2019 10:38 pm
  • Location: Minneapolis, MN
  • Real Name: Ben Hall

Re: Added a Reload Button to the Loader Node

PostSat Dec 03, 2022 5:01 am

Thanks! I'll look at that atom. I thought about modifying the reload script instead of just using the existing one but then I used it a few times and realized that it still worked on multiple loaders. So if you select a few loaders and hit the button on any of them, it will reload all the ones selected. Which cuts down on mouse clicks.

I'm moving 4 people to Fusion from After Effects and testing then how to comp ACEScg in it. I didn't want to remove any defaults yet in their deployment. They should have access to the real tools for tutorials and stuff. Have you used Deadline to deploy updates and scripts before? Had a TD friend tell me about his pipeline using Deadline to update and clean render nodes. Deploying updated Macros in that fashion seems like a win.
Resolve & Fusion Studio 18.6.5
Windows 10
Intel Xeon CPU 2699A @ 2.40GHz | 128GB RAM | 2xRTX3090 | 512NVME System | 8TB NMVE Scratch | 80TB 8Gbps Fiber

MacOS 12.7.2
MacBook Pro 13,3 | 16GB | Radeon 460 4GB | 256GB System | 256GB Scratch
Offline
User avatar

Bryan Ray

  • Posts: 2478
  • Joined: Mon Nov 28, 2016 5:32 am
  • Location: Los Angeles, CA, USA

Re: Added a Reload Button to the Loader Node

PostSat Dec 03, 2022 5:16 am

Never heard of using Deadline for deployments. I'm not sure what we were using at Muse; that wasn't in my yard. But for Fusion assets, we preferred putting everything on a network path and adjusting the pathmaps. That way you have a central location where you can make changes, and you don't need to push anything to workstations or render nodes, just set an environment variable to point to the user profile.
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

bentheanimator

  • Posts: 431
  • Joined: Mon May 13, 2019 10:38 pm
  • Location: Minneapolis, MN
  • Real Name: Ben Hall

Re: Added a Reload Button to the Loader Node

PostSat Dec 03, 2022 6:18 am

Yeah, I've got that set up for our asset libraries in VRay and stock but haven't done the network pathing for Fusion. I like the idea of doing all the updates and plug in tweaks for Max, Maya and both Blackmagic software from one process. Hopefully, a could set a process can be set to distribute the updated Fusion paths when I push Fusion and Resolve updates, install Reactor and get things synced on the five distributions. Let you know if it works out.
Resolve & Fusion Studio 18.6.5
Windows 10
Intel Xeon CPU 2699A @ 2.40GHz | 128GB RAM | 2xRTX3090 | 512NVME System | 8TB NMVE Scratch | 80TB 8Gbps Fiber

MacOS 12.7.2
MacBook Pro 13,3 | 16GB | Radeon 460 4GB | 256GB System | 256GB Scratch

Return to Fusion

Who is online

Users browsing this forum: No registered users and 37 guests