[2/3] SFM Tutorial: Advanced Element Viewer
Part 2 of my advanced Element Viewer tutorial, where I will show you how to create a basic animation set control, as well as showing what else you could do with this knowledge.
Links:
DmeChannel's "mode" parameter: https://developer.valvesoftware.com/wiki/SFM/Python_script_commands#SetOperationMode
Camera Sampling Animation Script: https://sfmlab.com/item/3127/
Part 1: https://youtu.be/1zNxG4M_EOc
Part 3: https://youtu.be/oKZ1ukGfEfo
Timestamps:
0:00 Intro
1:52 Intro ends
2:25 Creating the control
4:48 Creating the channel
10:14 Use cases of this technology
Creating an animation set control, step by step:
1) Add a "DmElement" to the animation set's "controls"
Give the control the following attributes:
"value" (float)
"defaultValue" (float)
"channel" (element)
2) Paste a reference of the control into a control group (see "rootControlGroup" of the animation set)
3) Go to the ChannelsClip and create a new DmeChannel
4) Paste a reference of the control in the "fromElement" of the channel
5) Paste a reference of the channel in the control's "channel" attribute
6) Specify "fromAttribute" to be "value"
7) Specify "toElement" and "toAttribute" accordingly
8) Ensure that the "mode" is set to 3, so that values can be stored
9) Ensure that the "log" is specified (otherwise right-click → set element → select the fitting data type)