Jump to: Board index » General » Fusion

[Solved] Macros: refresh the cache when buttons are used?

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

BartReynaard

  • Posts: 515
  • Joined: Thu Jul 08, 2021 8:31 pm
  • Real Name: Bart

[Solved] Macros: refresh the cache when buttons are used?

PostFri Apr 12, 2024 9:18 am

Sorry for the title I didn't find a better phrase.

however here is the problem:

In Fusion, I have made some macro and saved as Edit > Title, that is using several pre-configured text blocks.
I mean: text-block with their field with written phrases in them.

Each field contains a phrase in a language.
I do use 4 languages: English, Dutch, French, Italian.

The goal: I swith these phrase (these languages) just by clicking on a button in the Edit Page

how I do it? All these text-blocks go to a MultiMerge block.
With "Edit Controls" I created buttons, and the "Blend" control that receive the signal from each Text-Block, is controlled by the button.

Here below the code

Code: Select all
ENG
iif(Data.Language==0,1,0)
DUT
iif(Data.Language==1,1,0)
FRE
iif(Data.Language==2,1,0)
ITA
iif(Data.Language==3,1,0)


having said that: everything works fine. I do use this method successfully.
BUT ... yes there is a "but" ... once the Macro -Title I created is imported into the EDIT PAGE, if I click on any button BEFORE the cache is completed, I get the change as i want.

BUT if I switch it AFTER the cache is completed, i don't get it. I need to delete the cache, click on any button I need, then let the cache do its job.

Nwo the question is: how can i delete the cache when I just click on the button in order to get the change immediately? It seems indeed that DaVinci doesn't intercept any change when I click the button to switch forma text to another.
Last edited by BartReynaard on Sat Apr 13, 2024 3:20 pm, edited 1 time in total.
Bart
________
DaVinci Resolve Studio 18.6.6 on Windows 11 Pro 23H2

Prod. Machine: Ryzen 7 64GB 3.54 GHz
Video: MSI GeForce 4060Ti 16GB
Monitors: 1 x 3840x1440 widescreen, 2 x 1920 x 1080 16:9
Audio: Behringer UMC1820
Blackmagic Speed Editor
Offline

BartReynaard

  • Posts: 515
  • Joined: Thu Jul 08, 2021 8:31 pm
  • Real Name: Bart

Re: Macros: how to refresh the cache when buttons are used?

PostSat Apr 13, 2024 8:32 am

No suggestions?
Bart
________
DaVinci Resolve Studio 18.6.6 on Windows 11 Pro 23H2

Prod. Machine: Ryzen 7 64GB 3.54 GHz
Video: MSI GeForce 4060Ti 16GB
Monitors: 1 x 3840x1440 widescreen, 2 x 1920 x 1080 16:9
Audio: Behringer UMC1820
Blackmagic Speed Editor
Offline
User avatar

roger.magnusson

  • Posts: 3404
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Macros: how to refresh the cache when buttons are used?

PostSat Apr 13, 2024 11:00 am

I think you need to change an input value in order for Fusion to know something has changed. Maybe use a dropdown/MultiButtonControl to select the language instead?
Offline

BartReynaard

  • Posts: 515
  • Joined: Thu Jul 08, 2021 8:31 pm
  • Real Name: Bart

Re: Macros: how to refresh the cache when buttons are used?

PostSat Apr 13, 2024 2:33 pm

roger.magnusson wrote:I think you need to change an input value in order for Fusion to know something has changed. Maybe use a dropdown/MultiButtonControl to select the language instead?

but a Button isn't an input value that when I click it it changes?
Bart
________
DaVinci Resolve Studio 18.6.6 on Windows 11 Pro 23H2

Prod. Machine: Ryzen 7 64GB 3.54 GHz
Video: MSI GeForce 4060Ti 16GB
Monitors: 1 x 3840x1440 widescreen, 2 x 1920 x 1080 16:9
Audio: Behringer UMC1820
Blackmagic Speed Editor
Offline

Sander de Regt

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

Re: Macros: how to refresh the cache when buttons are used?

PostSat Apr 13, 2024 2:38 pm

I would expect it to react to what you're doing, definitely.
Without seeing the exact way you set it up it's hard to tell, but changing a value should trigger a refresh in my opinion.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline

BartReynaard

  • Posts: 515
  • Joined: Thu Jul 08, 2021 8:31 pm
  • Real Name: Bart

Re: Macros: how to refresh the cache when buttons are used?

PostSat Apr 13, 2024 2:45 pm

Sander de Regt wrote:I would expect it to react to what you're doing, definitely.
Without seeing the exact way you set it up it's hard to tell, but changing a value should trigger a refresh in my opinion.


in this moment, while I was experimenting what you suggested, I found that in Edit Controls:

if I setup the button as "Passive", it just switch.
if I set them up as "Animatable" when i switch, it removes the cache and I see the changes, then it re-caches of course the block.

Can you confirm this behaviour?
Bart
________
DaVinci Resolve Studio 18.6.6 on Windows 11 Pro 23H2

Prod. Machine: Ryzen 7 64GB 3.54 GHz
Video: MSI GeForce 4060Ti 16GB
Monitors: 1 x 3840x1440 widescreen, 2 x 1920 x 1080 16:9
Audio: Behringer UMC1820
Blackmagic Speed Editor
Offline

Sander de Regt

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

Re: Macros: how to refresh the cache when buttons are used?

PostSat Apr 13, 2024 2:54 pm

That makes a lot of sense. I am not sure where I read this - I should bookmark stuff like that - but I think 'passive' edit controls don't create undo buffer events (or whatever they're called) so it would definitely explain the behavior you're seeing.
Sander de Regt

ShadowMaker SdR
The Netherlands
Offline
User avatar

roger.magnusson

  • Posts: 3404
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Macros: how to refresh the cache when buttons are used?

PostSat Apr 13, 2024 3:15 pm

Ah, yes that's right. I thought maybe that attribute only existed in Fuse plugins which is what I'm more used to. And yes, it should work for standard buttons as well.

When coding, the "INP_Passive" attribute is false by default. When set to true it lets Fusion know that the value of the input doesn't affect the rendered result which is why it won't clear the cache.
Offline

BartReynaard

  • Posts: 515
  • Joined: Thu Jul 08, 2021 8:31 pm
  • Real Name: Bart

Re: Macros: how to refresh the cache when buttons are used?

PostSat Apr 13, 2024 3:19 pm

Thank you to both. now I finally understood what these 2 settings serve "Animatable" and "Passive".
Great :-)

thank you to all of you guys and have a great week-end
Bart
________
DaVinci Resolve Studio 18.6.6 on Windows 11 Pro 23H2

Prod. Machine: Ryzen 7 64GB 3.54 GHz
Video: MSI GeForce 4060Ti 16GB
Monitors: 1 x 3840x1440 widescreen, 2 x 1920 x 1080 16:9
Audio: Behringer UMC1820
Blackmagic Speed Editor

Return to Fusion

Who is online

Users browsing this forum: No registered users and 16 guests