こんにちは。
Spine4.2.10-betaから直接Photoshopのデータを読み込めるようになったことは大変素晴らしい事ですが、
仕事上"PhotoshopToSpine"スクリプトを使いたい場面はまだあります。
しかしプロジェクトの都合上、スクリプトの機能を変えたい箇所があり、
元のスクリプトを以下のように改造したいと考えています。

●"レイヤーマスク"で画像を書き出す境界を設定できる機能を"任意のレイヤーのサイズ"で境界を設定できるようにしたい。(レイヤー名はユニークな物に統一するものとする)
※パーツを書き出し範囲ごと自由に動かしたいため。
●原点の設定を定規で変更するのではなく、任意のレイヤーの座標を原点として用いたい
(レイヤー名はユニークな物に統一するものとする)
※Photoshopのデータは使い回すことが多く、毎回定規の設定を行うよりも例えば"root"レイヤーを
あらかじめ置いておき、その座標を参照した方が楽なため。

そのため以下の質問があります。
1.レイヤーマスクで書き出し画像の境界を設定している箇所はどこでしょうか?
2.原点を格納している変数などはありますでしょうか?

よろしくお願いいたします。

    Related Discussions
    ...

    mojimoji こんにちは!

    ご質問いただいた内容については後ほど別のスタッフから回答があると思いますが、先に原点の設定についてだけ補足しますと、今後Spineエディターに搭載されているPSDインポート機能に追加する予定の機能の中に、原点を指定できる「[origin]タグの追加」というものがあります。
    これは、Photoshop以外の画像エディター(ガイド線を引くことができないツール)を使用している場合でも原点を自由に設定できるように、名前に[origin]タグが含まれているレイヤーを原点の基準として利用できるようにするための機能です。
    おそらく実現されたいことの2点目に近い機能になると思います。

    その他にも、追加要望があった機能については随時検討していますので、もちろんご自身でPhotoshopToSpineを修正して利用されても問題ありませんが、PSDインポートに不足している機能 / 追加して欲しい機能があればどうぞお気軽に以下のスレッドでご提案ください。(日本語で書き込んでいただいて問題ありません): https://ja.esotericsoftware.com/forum/d/25617-spine-42-imports-psds-directly-no-photoshop-scripts-needed/81

    mojimoji

    It's completely legitimate to continue using the PhotoshopToSpine script. This is why it's our intention to keep it aligned with the features introduced in the Import PSD new option of Spine. Unfortunately, we did not have the time to align it yet since we were very busy with the 4.2 release.

    Regarding the possibility to change origin, we're working on introducing the [origin] tag that will let you set the origin using the center of the layer having this tag. As Misaki linked in her answer, you can find more info in this thread.
    This means that the PhotoshopToSpine script will probably receive this feature too.

    While for "setting image boundaries", we've actually considered and had internal discussions about using other layers to determine trimming bounds. We were thinking of using the tag [trim:reference_layer_name] to trim the respective layer using the size and position of the layer named reference_layer_name. However, for now, we discarded this possibility since we thought [trim:mask] was enough.
    We'll discuss it further and see if it's worth adding this new behavior.

    In any case, this will take some time, and new features will be added to the "Import PSD" option of Spine first. If there are no particular limitations, my advice is to switch to this rather than continuing to use the PhotoshopToSpine script.
    If you need to continue using the script and need these features now, you can fork the project and implement them yourself. Feel free to submit a Pull Request if you think your work can be reused by others.