About cdi3.json

[Last updated: 01/30/2020]

 

Summary

Starting with Cubism Editor 3.3.02 (released 04/23/2019), .cdi3.json can be exported when exporting models from the Cubism editor.
.cdi3.json is a file that contains information linking parameters, parameter groups, and part IDs and names.

Parameter names, parameter group names, and part names set in the Editor are not exported to moc3 because they are unnecessary items when handling models in the SDK.
However, if you want to display the names of the parameters, as in an application that allows users to directly manipulate model parameters, you can use .cdi3.json to obtain the names.

 

Contents described in .cdi3.json

• Parameters
 • Parameter ID, parameter name (name displayed in the editor), and ID of the parameter group to which it belongs
• ParameterGroups
 • Group ID, group name (name displayed in editor), ID of parameter group to which you belong
• Parts
 • Part ID, part name (name displayed in editor)

* ID of the parameter group to which you belong:
 Parameter groups are represented as a tree structure in the editor, but the structure in cdi stores data in a List structure.
 When working with parameter group tree structures on the SDK, this information must be used to restore the placement.
 If there is no parameter group to which you belong (the root of the tree structure in the editor), this field will be left blank.

For more information on the cdi3.json specification, see CubismSpecs on GitHub.

To parse cdi3.json, use CubismCdiJson in Cubism SDK for Native.
Cubism SDK for Web has its own Json parser, so users can use it to handle .cdi3.json implementations.

 

CubismCdiJson

Instance Creation

 

 

Parameters

The API to obtain parameter-related information is as follows.

• Number of parameters: CubismCdiJson::GetParametersCount()
• Parameter ID: CubismCdiJson::GetParametersId()
• ID of the parameter group to which you belong: CubismCdiJson::GetParametersGroupId()
• Parameter name: csmChar* CubismCdiJson::GetParametersName()

 

 

Parameter Groups

The API to obtain parameter group-related information is as follows.

• Number of parameter groups: CubismCdiJson::GetParameterGroupsCount()
• Parameter group ID: CubismCdiJson::GetParameterGroupsId()
• Parameter group ID of the parent of the parameter group: CubismCdiJson::GetParameterGroupsGroupId()
• Parameter group name: CubismCdiJson::GetParameterGroupsName()

 

 

Parts

The API to obtain parts-related information is as follows.

• Number of parts: CubismCdiJson::GetPartsCount()
• Part ID: CubismCdiJson::GetPartsId()
• Part Name: CubismCdiJson::GetPartsName()

© 2010 - 2022 Live2D Inc.