• 日本語
  • バイナリデータの一括変換

  • تم التحرير
Related Discussions
...

Spine Ver3.3.4.02 でエクスポートしたバイナリデータを Ver.3.8.55 のバイナリデータに置換する方法はなにかありますか?
大量のデータを一括で置換したいのでコンバータ的なものがあると助かるのですが……。

I want to know how to replace the binary data of Spine Ver. 3.3.4.02 with the binary data of Ver. 3.8.55.
I need a converter that can process a lot of data in one go

This runs Spine 3.4.02 and imports old.skel (which must be binary exported from 3.4.02) into the project.spine project file:
これにより、Spine 3.4.02が実行され、 old.skel(3.4.02からバイナリでエクスポートする必要があります)がproject.spineプロジェクトファイルにインポートされます。

spine -u 3.4.02 -i old.skel -o project.spine

You would of course change 3.4.02 to the actual version of the binary data, which is at the start of the binary data (unless it is very old data).
もちろん、「3.4.02」をバイナリデータの実際のバージョンに変更します。これは、バイナリデータの先頭にあります(非常に古いデータでない限り)。

You can specify more actions in one run of Spine:
Spineの1回の実行でさらに多くのアクションを指定できます。

spine -u 3.4.02 -i old1.skel -o project1.spine -i old2.skel -o project2.spine -i old3.skel -o project3.spine

If you are writing a shell script, Windows batch scripts are pretty nasty to deal with. On Windows I prefer to install Cygwin and use a bash script. For example, here is the script we use to export all the example projects:
シェルスクリプトを記述している場合、Windowsバッチスクリプトは扱いにくいものです。 Windowsでは、Cygwinをインストールしてbashスクリプトを使用することを好みます。たとえば、次のスクリプトはすべてのサンプルプロジェクトをエクスポートするために使用します。
spine-runtimes/export.sh at 3.8
As seen there, in a bash script you can escape the newline character using blackslash, so the command above can be written a bit more nicely:
そこに見られるように、bashスクリプトでは、ブラックスラッシュを使用して改行文字をエスケープすることができるため、上記のコマンドはもう少し上手に書くことができます。

spine -u 3.4.02 \
-i old1.skel -o project1.spine \
-i old2.skel -o project2.spine \
-i old3.skel -o project3.spine

There are many ways to write a script that runs a command like this on all files in a folder.
フォルダー内のすべてのファイルに対してこのようなコマンドを実行するスクリプトを作成するには、多くの方法があります。

I'm not sure when the command line functionality was added to convert binary data into a project file. If it was added after 3.4.02 then you will need to use the Spine editor UI to Import Data and save a project file. After that you can export the project file to binary from the command line.
データをプロジェクトファイルに変換するコマンドライン機能がいつ追加されたかはわかりません。 3.4.02以降に追加された場合は、SpineエディターUIを使用してImport Dataを実行し、プロジェクトファイルを保存する必要があります。 その後、コマンドラインからプロジェクトファイルをバイナリにエクスポートできます。
インポート - Spine ユーザーガイド: データ

In the future, please keep the Spine project files. Then you can load the project file with any newer Spine version and export, without needing to convert your binary files into project files.
今後は、Spineプロジェクトファイルを保持してください。その後、バイナリファイルをプロジェクトファイルに変換する必要なく、新しいSpineバージョンでプロジェクトファイルをロードしてエクスポートできます。

Now that you have project files, you can simply open them with any newer version of Spine (eg, the latest). If you want to export the project files to binary using the command line or a script, that is done like this:
これでプロジェクトファイルが作成されたので、Spineの新しいバージョン(最新のものなど)で簡単に開くことができます。コマンドラインまたはスクリプトを使用してプロジェクトファイルをバイナリにエクスポートする場合は、次のように行います。

spine -u 3.8.83 -i project.spine -o project.skel -e settings.export.json

The settings.export.json file can be saved from the export dialog in Spine. As before, you can do multiple exports with one Spine execution:
settings.export.jsonファイルはSpineのエクスポートダイアログから保存できます。以前と同様に、1回のSpine実行で複数のエクスポートを実行できます。

spine -u 3.8.83 \
-i project1.spine -o project1.skel -e settings.export.json \
-i project2.spine -o project2.skel -e settings.export.json \
-i project3.spine -o project3.skel -e settings.export.json

The command line interface (CLI) documentation has more detailed information:
コマンドラインインターフェイス(CLI)のドキュメントには、より詳細な情報があります。
エクスポート - Spine ユーザーガイド: コマンドライン

9 أيام لاحقا

返信ありがとうございます。
提案されたコマンドを試しましたが以下のエラーが表示され実行できませんでした。
どのような原因が考えられますか?

Thank you for your reply.
I tried the suggested command.

spine -u 3.4.02 -i old.skel -o project.spine

It has been done.

ERROR: Input and output specified without export, import, or pack.

An error was displayed and it could not be executed.

Exporting the 3.4.02 project file with 3.8.72

spine -u 3.8.83 -i project.spine -o project.skel -e settings.export.json

It has been done.

ERROR: Invalid update version

An error was displayed and it could not be executed.
What are the possible causes?

OZ_axel wrote

spine -u 3.4.02 -i old.skel -o project.spine

ERROR: Input and output specified without export, import, or pack.

これは、エディタ3.4.02がバイナリデータファイルをSpineプロジェクトファイルに変換することをサポートしていないことを意味します。 Spine 3.4.02を実行して( spine -u 3.4.02を使用するか、設定ダイアログで3.4.02を選択して)、UIを使用する必要があります。左上のSpineロゴをクリックしてください->データのインポート 、プロジェクトファイルを保存します。
Sorry, this means the editor 3.4.02 doesn't support converting a binary data file into a Spine project file. You'll have to run Spine 3.4.02 (using spine -u 3.4.02 or by choosing 3.4.02 in the settings dialog) and use the UI: click the Spine logo in the upper left -> Import Data, then save the project file.

OZ_axel wrote

>spine -u 3.8.83 -i project.spine -o project.skel -e settings.export.json

ERROR: Invalid update version

この正確なコマンドを入力しましたか? spine -u 3.8.83はバージョン3.8.83を実行しますか? それは私のためです。
Are you sure you typed this exact command? Does spine -u 3.8.83 run version 3.8.83? It does for me.

返信ありがとうございます。提案を参考に再度試してみます。

Thank you for your reply.
I will try again with the your suggestions.