dump¶
dump prints out the structure of a puppet, one record per line, so that it is easy to read, search, and compare with diff. It takes a CMO3 file, a MOC3 file, or an artwork file.
Synopsis¶
dump <file> [--sections] [--xml] [--puppet]
dump takes exactly one file. For example:
./gradlew -q :cli:run --args="dump model.cmo3 --puppet"
Numbers are printed with up to six significant digits and without trailing zeros, so 30 is 30 and not 30.0000.
Output by Format¶
MOC3¶
Without options, dump prints the static rig of a MOC3 file. This includes the parameters, the parts, and the drawables exactly as they are stored. Nothing is evaluated, so there are no posed positions or opacities.
# MOC3 version=6
# canvas size=1000,2000 origin=500,1000 ppu=1000
# counts parameters=27 parts=14 drawables=0 deformers=0 glues=0 groups=3 bindings=1 blendShapes=0 offscreens=2
[parameters]
P 0 id=ParamAngleX type=0 min=-30 max=30 def=0 repeat=0
P 1 id=ParamAngleY type=0 min=-30 max=30 def=0 repeat=0
...
[parts]
T 0 id=PartRough parent=-1
T 1 id=PartFace parent=-1
...
The lines that start with # are the header. They give the MOC3 version, the canvas size, origin, and pixels per unit, and how many of each kind of object the file holds. The other lines are records:
Line |
Fields |
|---|---|
|
A parameter: Its index, |
|
A part: Its index, |
|
A drawable: Its index, |
--sections prints the structure of the file instead: The MOC3 version, the number of sections, the counts for each section that the file declares, and one S line for each section that is present with its number of elements.
# MOC3 version=6 sections=167 bigEndian=false
# countInfo 14,0,0,0,0,27,14,...
S COUNT_INFO count=64
S CANVAS count=16
S PARAM_RUNTIME_SLOT count=27
...
# sections present=53 modeled=167
CMO3¶
A CMO3 file is an archive. Without options, dump prints the Cubism version the file targets, the archive’s header, a table of the archive’s entries, the embedded images, and a summary of the model document inside, main.xml.
# CMO3 targetVersionNo=5030000
# caff formatVersion=0.0.0 archiveVersion=0.0.0 obfuscateKey=1237796726
[entries]
E 0 path=image.png tag= size=96 compression=RAW obfuscated=1
E 1 path=image_0.png tag= size=83 compression=RAW obfuscated=1
E 2 path=image_1.png tag= size=75 compression=RAW obfuscated=1
E 3 path=main.xml tag=main_xml size=70914 compression=FAST obfuscated=1
[images]
[xml]
# versions ModelStateSet=1 KeyformGridSource=1 CParameterGroup=4 ...
# imports com.live2d.cubism.doc.gameData.motions.CGameMotionSet ...
Line |
Fields |
|---|---|
|
An archive entry: Its index, |
|
An embedded layer image: Its index, |
|
The version of each class that the model document uses, as |
|
The classes that the model document imports. |
--xml prints the entirety of the XML model document, main.xml, and its output can be redirected to a file:
./gradlew -q :cli:run --args="dump model.cmo3 --xml" > main.xml
Artwork¶
For a PSD, CLIP, or KRA file, or a flat image, dump prints the canvas, the groups, and every layer. A flat image is treated as a layered artwork file with a single layer.
[artwork] KritaLayerVisibility.kra
# canvas 1024x1024
# counts layers=6 raster=6 groups=2
G path=Group 6 name=Group 6 vis=0 op=1 blend=Normal clip=0 through=0
G path=Group 6/Group 7 name=Group 7 vis=1 op=1 blend=Normal clip=0 through=0
L 3 order=2 kind=Raster id={63d5ac9d-7c99-4c7a-8251-ed3e0e71e2a7} name=Paint Layer 4 at=512,256 size=512x256 alpha=419x162+49+61 op=1 blend=Normal vis=1 clip=0 group=Group 6
...
Line |
Fields |
|---|---|
|
A group: Its |
|
A layer: Its index, |
A layer’s order counts from the top of the stack: 0 is the top-most layer. Its kind is Raster for a layer of pixels, and Text, Vector, Adjustment, Fill, or Unknown for the layers without pixels.
The alpha column is how atlas and mesh see the layer. It is the layer’s opaque area, trimmed to the smallest rectangle that holds every pixel with any opacity, written as width x height +left+top, measured from the corner of the layer’s own pixels. A layer with nothing opaque in it has alpha=empty. Such a layer is never packed into an atlas.
Options¶
Option |
Applies to |
Effect |
|---|---|---|
|
MOC3 |
Prints the structure of the file instead of the rig. |
|
CMO3 |
Prints |
|
CMO3, MOC3 |
Adds a summary of the model as Umamo imports it. |
An option on a kind of file that it does not apply to is a usage error.
--puppet prints the model after the normal output, as Umamo imports it. This is the import that the editor and convert use, so use this option to investigate when a conversion is not what you expected.
[puppet]
# counts parameters=27 parts=15 deformers=0 drawables=0 glues=0 parameterGroups=0 links=0
# canvas 1000x2000 origin=500,-1000 target=Cubism53
P 0 id=ParamAngleX min=-30 max=30 def=0
P 1 id=ParamAngleY min=-30 max=30 def=0
...
N 0 param id=ParamAngleX
N 0 param id=ParamAngleY
...
Line |
Fields |
|---|---|
|
How many parameters, parts, deformers, drawables, glues, parameter groups, and links the model has. |
|
The canvas size, the position of the origin, and the runtime |
|
A parameter: Its index, |
|
A node of the parameter panel, in the order the panel shows it. The number after |
|
A pair of parameters that the panel links into one two-dimensional control, with the |
Warnings¶
A MOC3 file that has no readable .cdi3.json imports without its display names, parameter groups, and linked parameters. --puppet prints this warning to standard error:
Warning: no readable cdi3.json for model.moc3; importing without display names, parameter groups, or linked parameters
A .cdi3.json that cannot be parsed is ignored, with a warning of its own.
--puppet on an artwork file prints the artwork first and then stops with a usage error, because artwork has no rig to import.
See also