Jump to: Board index » General » Fusion

Re-Edit a macro

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

MarnMxxx

  • Posts: 252
  • Joined: Sat Dec 22, 2018 6:45 am
  • Real Name: Marn Morris

Re-Edit a macro

PostTue Mar 19, 2019 4:34 pm

I don't mean the "Edit Macro" menu option. I want to break the macro single node back into it's original nodes before it was turned into a macro.
USING:
iMac 2020
OS 13.5.1
3.8 GHz 8-core Intel Core i7
64GB 2667 MHz DDR4 RAM
AMD Radeon Pro 5700 XT 16GB
12TB RAID
Online

Sander de Regt

  • Posts: 3561
  • Joined: Thu Nov 13, 2014 10:09 pm

Re: Re-Edit a macro

PostTue Mar 19, 2019 4:53 pm

Open up your macro in a text editor like notepad ++ and look for the word MacroOperator, change it to GroupOperator and copy/paste it back into your flow, now the nodes are back in grouped form and you can decide to ungroup them if that's really important to you :lol:
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

Jamie Dickinson

  • Posts: 353
  • Joined: Thu Aug 22, 2013 7:38 am

Re: Re-Edit a macro

PostSat Mar 30, 2019 2:40 pm

Sander de Regt wrote:Open up your macro in a text editor like notepad ++ and look for the word MacroOperator, change it to GroupOperator and copy/paste it back into your flow, now the nodes are back in grouped form and you can decide to ungroup them if that's really important to you :lol:

Nice trick :)
Offline

pinthenet

  • Posts: 138
  • Joined: Mon May 18, 2020 3:23 pm
  • Real Name: John Payne

Re: Re-Edit a macro

PostThu Oct 01, 2020 1:03 pm

It's an old thread but as an extension:

I can edit a macro using Sander's 'trick' but when I want to save it as a macro again, maybe after adding (or deleting) a node I have to redefine all the parameters that I want to expose with the Macro. Is there any other way to edit macros or would I have to edit the .setting file directly?
[size=85]
Laptop: Intel i7-10750H/32GB/RTX2060-6GB & Intel UHD Graphics 630
Windows 10 Home; NVIDIA 536.67 Studio; Resolve+Fusion 18.5
Offline
User avatar

TheBloke

  • Posts: 1905
  • Joined: Sat Nov 02, 2019 11:49 pm
  • Location: UK
  • Real Name: Tom Jobbins

Re: Re-Edit a macro

PostFri Oct 02, 2020 7:20 pm

pinthenet wrote:It's an old thread but as an extension:

I can edit a macro using Sander's 'trick' but when I want to save it as a macro again, maybe after adding (or deleting) a node I have to redefine all the parameters that I want to expose with the Macro. Is there any other way to edit macros or would I have to edit the .setting file directly?
Now you've got the macro as a Group, you can expand it and edit it on the flow as you've found. Having edited it you could then copy the group on the current flow, and then paste the resulting text into a .setting file - either overwriting the existing macro file, or creating a new one in the Macros folder. When deployed again as a Macro, it will reflect your changes.

You don't need to restart Resolve or Fusion for it to see new macros, or changes to macros. The list updates automatically whenever files are added to the Macros folder, and the deployment of a macro always uses the current version of that file on disk.

If you want to change the Macro controls, eg what tool controls are exposed for editing on the macro itself, you separately have the option to right-click on the flow and choose Edit Macro. You pick the macro from the menu and will then get back the same Macro Editor UI as when you first made it, which will edit the macro file on disk and allows changing its exposed parameters. This UI can only read the macro file on disk, and so it can't see or use any changes you've made on the current flow. If you wish to both change the macro's flow and its exposed parameters, you will need to combine Edit Macro with the manual copying and pasting described above. Edit the Group macro on the flow, copy it, save it to the same or different .setting file in Macros, then select that macro in Edit Macro and alter its inputs, outputs and exposed controls.

Many advanced users will go in and edit the .setting file directly when they want to make any changes, certainly for exposed parameters but maybe also internal tool changes. Here's a great thread on WSL that goes into that in some detail, in case you've not already seen it: Macro Building Essentials. Once you've learnt some of the syntax it is often more efficient to edit the macro in a text editor, versus trying to do it on the flow and via the limited Macro Editor UI.
Resolve Studio 17.4.3 and Fusion Studio 17.4.3 on macOS 11.6.1

Hackintosh:: X299, Intel i9-10980XE, 128GB DDR4, AMD 6900XT 16GB
Monitors: 1 x 3840x2160 & 3 x 1920x1200
Disk: 2TB NVMe + 4TB RAID0 NVMe; NAS: 36TB RAID6
BMD Speed Editor
Offline

pinthenet

  • Posts: 138
  • Joined: Mon May 18, 2020 3:23 pm
  • Real Name: John Payne

Re: Re-Edit a macro

PostSat Oct 03, 2020 10:09 am

Thanks Tom, you confirmed what I found out yesterday by trial & error. I also found this on VFXPedia https://www.steakunderwater.com/VFXPedia/96.0.243.189/index3370.html?title=Settings_and_Macros#External_Links
Code: Select all
 Tabs in Macros
You can create multiple tabs for macro controls to make the interface of complicated ones more readable and convenient. Open the macro in a text editor and add Page = 'Tab page' to one of the macro's inputs. That will put it and all the following inputs on that tab until you give it a new page. This example will create a "Common Controls" tab for the blend slider:

   Blend = InstanceInput {
      SourceOp = ...,
      Source = ...,
      Page = "Common Controls",
      Default = ...,
   },

which lets me bring some structure into the Macro inspecor panel. Unfortunately if I then use Fusion's 'Edit Macro' I lose my tab definitions....

Thanks for reminding me about the WSL overview, that should be useful
[size=85]
Laptop: Intel i7-10750H/32GB/RTX2060-6GB & Intel UHD Graphics 630
Windows 10 Home; NVIDIA 536.67 Studio; Resolve+Fusion 18.5
Offline
User avatar

Bryan Ray

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

Re: Re-Edit a macro

PostSun Oct 04, 2020 4:50 pm

Yeah, the Edit Macro feature is okay for a very quick macro definition to get one started, or if you don't intend to distribute, but it's not great otherwise. I typically skip it entirely. I set up my nodes, group them, then copy-paste the group into Notepad++ and define controls by hand.

But I find it easier to type several lines than to poke a checkbox with my mouse. People who prefer GUI interaction may disagree. :D
Bryan Ray
http://www.bryanray.name
http://www.sidefx.com
Offline

pinthenet

  • Posts: 138
  • Joined: Mon May 18, 2020 3:23 pm
  • Real Name: John Payne

Re: Re-Edit a macro

PostMon Oct 05, 2020 8:33 am

After reading the WSL post I see what you all mean. Don't mind a bit of hand-coding.

Thanks to all
[size=85]
Laptop: Intel i7-10750H/32GB/RTX2060-6GB & Intel UHD Graphics 630
Windows 10 Home; NVIDIA 536.67 Studio; Resolve+Fusion 18.5
Offline

CircaChroma

  • Posts: 2
  • Joined: Fri Jan 27, 2023 10:26 am
  • Real Name: David Lee

Re: Re-Edit a macro

PostFri Jan 27, 2023 10:35 am

Sander de Regt wrote:Open up your macro in a text editor like notepad ++ and look for the word MacroOperator, change it to GroupOperator and copy/paste it back into your flow, now the nodes are back in grouped form and you can decide to ungroup them if that's really important to you :lol:
TheBloke wrote:
pinthenet wrote:It's an old thread but as an extension:

I can edit a macro using Sander's 'trick' but when I want to save it as a macro again, maybe after adding (or deleting) a node I have to redefine all the parameters that I want to expose with the Macro. Is there any other way to edit macros or would I have to edit the .setting file directly?
Now you've got the macro as a Group, you can expand it and edit it on the flow as you've found. Having edited it you could then copy the group on the current flow, and then paste the resulting text into a .setting file - either overwriting the existing macro file, or creating a new one in the Macros folder. When deployed again as a Macro, it will reflect your changes.

You don't need to restart Resolve or Fusion for it to see new macros, or changes to macros. The list updates automatically whenever files are added to the Macros folder, and the deployment of a macro always uses the current version of that file on disk.

If you want to change the Macro controls, eg what tool controls are exposed for editing on the macro itself, you separately have the option to right-click on the flow and choose Edit Macro. You pick the macro from the menu and will then get back the same Macro Editor UI as when you first made it, which will edit the macro file on disk and allows changing its exposed parameters. This UI can only read the macro file on disk, and so it can't see or use any changes you've made on the current flow. If you wish to both change the macro's flow and its exposed parameters, you will need to combine Edit Macro with the manual copying and pasting described above. Edit the Group macro on the flow, copy it, save it to the same or different .setting file in Macros, then select that macro in Edit Macro and alter its inputs, outputs and exposed controls.

Many advanced users will go in and edit the .setting file directly when they want to make any changes, certainly for exposed parameters but maybe also internal tool changes. Here's a great thread on WSL that goes into that in some detail, in case you've not already seen it: . Once you've learnt some of the syntax it is often more efficient to edit the macro in a text editor, versus trying to do it on the flow and via the limited Macro Editor UI.



Hey guys I'm a new user and I'm trying to replace two diamond "shapes" in an animation graphics with another 3d file... the company I got the animation from said I need to do this "Edit Macro" with text but can't exactly tell me how to do it.

So I loaded the file into DaVinci Timeline -> Right-clicked on its Node inside Fusion -> Saved as a Macro -> I Found the Macro. setting file in %appsettings% and edited the text to be "GroupOperators" instead -> I go back to DaVinci and go to Fusion and right-click an empty space and went to "AddTool" then "Node" and clicked the Macro file I saved -> Nothing happens!

I also tried to click and drag the Macro. setting file into DaVinci and nothing

Am I missing something? Can someone please guide me please

Return to Fusion

Who is online

Users browsing this forum: audiocage, Google [Bot], Sander de Regt, Warped Kings and 12 guests