Single Template for different Viz scenes

ruimac

Member
In Template Wizard there is a variable named SCENE_NAME that contains the full path to the Viz scene associated with the template.
But I think it is a read only variable because, if I change it to point to a different Viz scene, pressing the Take/Load/Start button will not launch the scene pointed by the variable.
Is there any way to change dynamically the Viz scene that a Template will launch when the Take/Load/Start button is pressed?
 
If template Variants don't work for your use case, you could look at using Execution Logic in the template to send a viz command to the current channel which loads a custom scene on Start/Take.

Something like

Code:
<log role="note" name="note">My Execution Logic TAKE !</log>
    <env>
        <forked_exec>
            <entry name="execution_group"><var>channel</var></entry>
            <env>
                <viz>RENDERER SET_OBJECT <ref><var>element</var>/data/my_scene</ref></viz>
            </env>
        </forked_exec>
    </env>

where "my_scene" is the ControlObjectName of the template field holding your cusrom scene full path.
 
If template Variants don't work for your use case, you could look at using Execution Logic in the template to send a viz command to the current channel which loads a custom scene on Start/Take.

Something like

Code:
<log role="note" name="note">My Execution Logic TAKE !</log>
    <env>
        <forked_exec>
            <entry name="execution_group"><var>channel</var></entry>
            <env>
                <viz>RENDERER SET_OBJECT <ref><var>element</var>/data/my_scene</ref></viz>
            </env>
        </forked_exec>
    </env>

where "my_scene" is the ControlObjectName of the template field holding your cusrom scene full path.

Thank you.
I will save this code to try it out.
 
Back
Top