Welcome to WSL!

Make yourself at home, but before posting, please may I ask you to read the following topics.


Posting 101
Server space, screenshots, and you

Thank you!

PS. please pretty please:


Image

Macro Building Essentials

User avatar
svenneve
Fusioneer
Posts: 104
Joined: Fri Sep 12, 2014 1:47 am
Been thanked: 2 times
Contact:

Re: Macro Building Essentials

#16

Post by svenneve » Fri Nov 01, 2019 3:02 am

I wish there was a way to store what is exposed in Macros in some meta data so when I edit the original comp the macro was build from it would 'restore' those exposed outputs and inputs, rather than having to go through everything all over.
Or maybe there is and I've been avoiding using macros too often because I missed something?

User avatar
SecondMan
Site Admin
Posts: 4576
Joined: Thu Jul 31, 2014 5:31 pm
Answers: 28
Location: Vancouver, Canada
Been thanked: 129 times
Contact:

Re: Macro Building Essentials

#17

Post by SecondMan » Fri Nov 01, 2019 6:26 am

Not sure if I understand you correctly - but if you want to edit the contents of a Macro why not make it into a group, edit, and revert to a Macro?

You've even made a script for the first part :)

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

Re: Macro Building Essentials

#18

Post by AndrewHazelden » Fri Nov 01, 2019 1:05 pm

I often wish there was a Lua script that let you to select a plain old GroupOperator node in your comp.

Then the script would show a dynamically updating UI Manager window that quickly adds new input and output connections to your user-created GroupOperator node.

The script UI would pull a list of the available input and output connections you could expose on your macro from the nodes that are packed inside the group.

This would let macro creators who use a hybrid mix of external text editor crafting of a macro to rename elements and tweak things, while still being able to copy/paste the node data and tinker in Fusion so you could do expanded group node based visual programming and reediting of the internal logic, expressions, and node connections in your macro.

This is needed once the Fusion internal node editor window has hit the wall in functionality.

Ideally the tool would also offer to cleanup node names and scrub out the typical Merge1_2_1_1_5_7_3_3 stuff that builds up naturally over time when re-editing an existing macro found in an old .comp file.

And having an option in a new macro editing scripted UI to turn several identical nodes in a macro into instances would be handy. In this approach, the few unique controls that are at unique values would be deinstanced so you could streamline complex macros. My use case for that is when I have several duplicated elements like Camera3D nodes or Renderer3D nodes in my macro which are good tools but don't allow all controls to be expression linked without getting crashy.

User avatar
svenneve
Fusioneer
Posts: 104
Joined: Fri Sep 12, 2014 1:47 am
Been thanked: 2 times
Contact:

Re: Macro Building Essentials

#19

Post by svenneve » Mon Nov 04, 2019 2:46 am

SecondMan wrote:
Fri Nov 01, 2019 6:26 am
Not sure if I understand you correctly - but if you want to edit the contents of a Macro why not make it into a group, edit, and revert to a Macro?

You've even made a script for the first part :)
My problem is when I want to add a tool to an existing macro, or add / remove input outputs. The build in edit macro tool fails to work reliable when trying to do that. Then I go back to the comp the macro originated and recreate the macro, but then I have to check and uncheck all paramaters I want to be exposed and which I don't. That step is what I meant, if the tool would somehow allow adding meta data to mark what should be exposed and how, that would be a great QoL improvement for me.

Maybe we are just using macros wrong?

*edit*, note to self, this doesn't seem completely out of the realm of my spaghetti coding abilities.

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

Re: Macro Building Essentials

#20

Post by AndrewHazelden » Mon Nov 04, 2019 4:00 am

svenneve wrote:
Mon Nov 04, 2019 2:46 am
Maybe we are just using macros wrong?

*edit*, note to self, this doesn't seem completely out of the realm of my spaghetti coding abilities.
Hi @svenneve.

So. When I need to re-edit an existing macro node, I never *ever* go back to using the Fusion built-in Nodes view, right-click "Macro > Create Macro..." contextual menu item or the "File > Macro Editor" menu item since it is going to destroy a lot of the useful customizations I add by hand to a macro using an external text editor.

My workflow is that I simply turn my MacroOperator into a GroupOperator node. Then I do all internal node connection tinkering with the group expanded in the Nodes/Flow view.

Next I do a chaotic round-robin cycle of copy/pasting the macro from a Fusion comp into an external text editor, I tweak some settings, add a "HelpPage" entry, rename things on the Inputs = {} or Outputs = {} part of the macro, add a few UserControls like buttons and expandable nests. Then I copy/paste that highly edited macro data back into a Fusion comp.

Where I really slow down is when I add some new node using the Fusion Nodes/Flow view visually "inside" the macros' expanded group window. At this point, I typically want to wire that new node to one edge of the expanded group so it is exposed outside the node as either a new input connection or an output connection.

This means I have to then go back to my text editor with the macro settings text clipping and make those manual textual tweaks.

The new node that is inserted into the macro might be a Switch.fuse, or SwitchElse.fuse added to adjust the flow of things internally in the macro, or maybe I later decide to drop a Merge node in at the very start of things in the macro to act as the main node that determines the input resolution for all other expressions width and height settings in the macro.

Well. That's the method to my current Macro editing madness. :mrgreen:
Last edited by AndrewHazelden on Mon Nov 04, 2019 6:32 am, edited 1 time in total.

User avatar
svenneve
Fusioneer
Posts: 104
Joined: Fri Sep 12, 2014 1:47 am
Been thanked: 2 times
Contact:

Re: Macro Building Essentials

#21

Post by svenneve » Mon Nov 04, 2019 4:33 am

That seems like a lot of work :)
I'm toying with some prototypes today, one of which is a MacroParameter fuse (basically a passthrough fuse with extras) that together with a script allows to export to a macro.
The MacroParameter fuse stores the input/output name, and is picked up by the script, any input or output with such MacroParameter script connected is exposed in the macro.

I'll post if it amounts to anything useful.

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

Re: Macro Building Essentials

#22

Post by AndrewHazelden » Mon Nov 04, 2019 4:44 am

That sounds really interesting!

User avatar
Bernando
Posts: 26
Joined: Sat Dec 03, 2016 10:28 pm
Answers: 1
Real name: Bernd Klimm
Been thanked: 9 times
Contact:

Re: Macro Building Essentials

#23

Post by Bernando » Thu Oct 15, 2020 6:00 am

Are the MacroLUTs still working in v16? I just tried and failed on even the simplest BC node-turned Macro.
  1. BrightnessContrast1 cannot get Parameter for Input at time 0
  2. BrightnessContrast1 failed at time 0
Encouraged by the tutorial above, I tried the one from KartaVR shown above but get the same error message. Is it me, or did something change?