In the end, I think the solution I needed was to use OnPrepare. It seems to trigger for the Preview and Running the scene.
Not positive, but it seems in a Scene Event you can also do:
Self.Prepare() or Self.OnPrepare(Engine,Self) (not sure which works)
Still, it would be nice to have utility functions per scene, hence Scene scripts.
Example:
Election package
Only a couple scenes deal with all 50 states. A couple state processing functions needed but only for a couple scenes.
------------------------------
Azathoth
Son of Cthulhu
------------------------------
Original Message:
Sent: 06-16-2023 07:17
From: Red
Subject: VB Question
I normally use scripts on scene directors for this kind of stuff and call them.
------------------------------
Simon Redmile
Senior Graphic Programmer & Designer
Ross Video
Bristol United Kingdom
Original Message:
Sent: 06-09-2023 11:00
From: Azathoth
Subject: VB Question
Simple VB Question here. I am posting it here instead of Stack Overflow because the VB question is unique to this product and its implementation of VB. I am on Xpression 9.5 so C# is not an option.
Is there a syntax to use in an event like OnPreview to call OnPrepare or OnRender or some other Event? I've tried a couple ideas but I am not a VB expert.
I am asking before submitting an idea to "Ross Ideas". Just like there are "Global Scripts", my idea is "Scene Scripts". I have some large routines in globals that are for one scene so that it can render when OnPrepare and OnPreview fire so their scripts are FireMySceneScrript(Engine,Self). If OnPreview could trigger OnWhatever it would solve the problem. A massive Global Scripts feels like it could be prone to breaking the whole project the more custom functions there are per scene. It should only be for utility functions.
------------------------------
Azathoth
Son of Cthulhu
------------------------------