User Data and Events

(Updated 07/06/2020)

This section describes how to set up user data and events.
User data and events can be used to trigger an application or animation when a certain frame is reached, for example.

For example, the following items can be done.

  • Triggering of additional visual expressions such as comic notes, visual effects, etc.
  • Activation of sound effects and other audio expressions
  • Invincibility and other changes in hit detection

 

Elements and locations where user data and events can be set

The elements where user data can be set are on the ArtMesh (model workspace) and where events can be set are on the timeline (animation workspace).

Note that user data and events have different meanings.

Set to ArtMesh:
Active triggers on the SDK => User data

Set to Timeline:
Passively triggered on the SDK => Event

 

ArtMesh

Set user data in the ArtMesh

Select the ArtMesh for which you want to set user data.
Browse to the [Inspector] palette and click on the [UserData] entry to open the entry field.

Enter user data.
Click the [Update] button to confirm your entries.
If you move on to other operations after entering user data, your input is also confirmed.

You can zoom in and out by dragging the arrow buttons up and down in the input field.

 

Delete user data set in ArtMesh

To delete user data set for an ArtMesh, refer to the [Inspector] palette and delete the contents of the [UserData] entry field.

 

Timeline

Setting events on the timeline

Right-click at any frame position on the track where you want to set the event.
Select [Add Event] from the menu that appears.

The Event Entry dialog box opens.
Enter the event details and click [OK].

Keyframes representing events are displayed on the model track.
The difference between event keyframes and animation keyframes is shown in the figure below.

Differences in keyframe display
Event only Animation
Keyframes and
Events
Animation
Key frame only
 

POINT
Unlike animated keyframes, keyframes representing events cannot be moved or copied& pasted.
Only when moving the entire track with the arrow buttons to the left of the track, the event keyframes move simultaneously with the animation keyframes.

If an animated keyframe exists on the same keyframe, copy& paste will copy& paste only the animated keyframe.

 

Check the events set in the timeline

There are two ways to check the events you have entered.

  • Hover the mouse over the event keyframe.
  • The event is displayed in a tooltip.

  • Double-click on the keyframe of the event displayed on the timeline.
    The event entry dialog opens.

 

Deleting an event set on the timeline

There are two ways to delete an entered event.

  • Right-click on the keyframe of the event displayed on the timeline.
    Select [Delete Event] from the menu that appears.

  • Double-click on the keyframe of the event displayed on the timeline.
    Deletes all events in the displayed dialog.

 

Export of user data and events

When using events in the SDK, user data and events must be exported along with model and motion data.

Export of user data set in ArtMesh

The user data set in the ArtMesh is stored in the model data, but a user data file (userdata3.json) must be exported separately from the moc3 data when embedding.
To export user data to an ArtMesh, select [File] menu -> [Export Embedded Data] -> [Export as moc3 file] to open the Export Settings dialog box.

Check the [Export user data file (userdata3.json)] checkbox.
Click [OK] to execute the export.

POINT
User data cannot be used with moc data for 2.1.

 

Exporting events set in the timeline

The events set in the timeline are written out in the motion data (.motion3.json).
To export events set in the timeline, select [File] menu -> [Export Embedded Data] -> [Export motion file] to open the Export Settings dialog box.

Check the [Export Events] checkbox.
Click [OK] to execute the export.

POINT
Events are not available in mtn data for 2.1.

 

© 2010 - 2022 Live2D Inc.