• Announcements
  • Spine 4.2 imports PSDs directly, no Photoshop scripts needed

valahaha

Thanks for your screenshots! I was able to reproduce the bug.

I confirm that in 4.4.40 we did an update to make attachments visibility more consistent with what is shown in the saved PSD.

However, there was a bug connected to the fact that if a slot has more than one attachment, like for the nose, if the first layer in the PSD is hidden, the slot is hidden in Spine.

Regarding the trick to show the attachment toggling the mesh checkbox, that is a side effect of making an attachment visible when the mesh checkbox is clicked and the attachment is hidden. You can achieve the same behavior just by clicking the paper clips in the tree on the left of the skin placeholder.

You'll find the fix in the next release 🙂

Related Discussions
...

Hi,
So I was using the script photoshop to PSD before and I wanted to try your new system !
Unfortunatly, even if it is working fine, it doesn't name the slot based on the layer name, but rather on the folder and skin name ?

If I have :

Before, it created everything right, like this :


(My bad I did it myself to show it, the picture name should still be Body/Girl Body/Girl Body/Body Arm Color 1 Right, only the skin slot should be different)

But now, it does this :

Is this wanted ? It is really bothersome because if you're creating skin you will have to move all picture to the same skinslot, while before it was working fine right at the start.

    Pentacles

    Pentacles it doesn't name the slot based on the layer name

    Hi, from your first screenshot, you have used the slot tag [slot:Body Arm Color 1 Right] which has rightfully used that as the slot name and not the layer name.

    As for your skin placeholder, it takes the name from your folder structure minus the skins. Please note that if you want shorter names you can simply add folders to your skin name this way: [skin: Body/GirlBody] So these parts will be omitted from the skin placeholder name.

    If instead you want to keep them for your naming logic, please also note that what is not part of a skin should have neutral naming, so for example, calling a folder that shall be used for both Girls and Boys [folder:Girl Body] would not give you a correct folder structure for Boy parts.

    Folders can be very useful to organize objects, directions, and anything that should not be used only by a single skin, but that should be common. When that is not the case, skins are preferrable for single skin usage.

    • Pentacles hat auf diesen Beitrag geantwortet.

      Pentacles

      Hello Pentacles 🙂

      You are right, we changed the rules to define names for skins, slots, skin placeholders, attachments, and attachment paths. The new system is quite versatile. it's just a matter of knowing how it works. We are in the process of writing the documentation, so it will be easier to understand how names are assigned to all of them.

      Here's a brief summary of the rules. Given a layer - in your example Body Arm Color 1 Right - the hierarchy is traversed from the outermost group to the layer. In this case, we have this hierarchy: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right (the layer).

      Skin name: concatenation of [folder]s and [skin]s, from the first element to the latest [skin] (/ is allowed). In your example: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right resulting in Body/Normal/Normal, where Body and the first Normal are managed as folders.

      Placeholder name: concatenation of [folder]s, from the first element to the layer name (/ is allowed). In your example: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right resulting in Body/Normal/Body Arm Color 1 Right.

      Attachment name: concatenation of [folder]s and [skin]s, from the first element to the layer name (/ is allowed). In your example: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right resulting in Body/Normal/Normal/Body Arm Color 1 Right.

      PNG path: If [path] tag is on layer name, its value is used (/ is allowed). Otherwise, the attachment name is used. Then .png is added to define the PNG path. In your example, no [path] tag is used, so the attachment name + .png is the PNG path: Body/Normal/Normal/Body Arm Color 1 Right.png.

      Slot name: The last [slot] tag in the hierarchy or the layer name (/ is allowed). In your example: [folder:Body] > [folder:Normal] > [skin:Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right resulting in Body Arm Color 1 Right.

      When I say "/ is allowed," it means that a forward slash can be used in the tag value or layer names. In that case, if used as:

      • "leading slash" (e.g., /Normal), then parent layers won't affect the name
      • "slash in the middle" (e.g., Body/Normal), to easily make subfolders.

      Let us know what you think about these new rules and if you can achieve a layer organization in Photoshop that allow you to import it as you desired.

      • Pentacles hat auf diesen Beitrag geantwortet.

        Erika
        The slot name is right, "Body Arm Color 1 Right", I was talking about the skin slot, the skin placeholder I guess ? I'm french, I use spine in French so I don't know exactly how it is named in english. The orange hanger thing.

        I'm using the [folder] on a separated folder (on Photoshop) because it's simplier and more understandable from looking than having on each picture [skin:Body/Normal/Normal], [skin:Body/Normal/Blue Shirt],[skin:Body/Normal/Red Shirt], etc.
        It's just more easy to understand by having a [folder] body with the [folder] Normal with inside the [skin] folder and inside of it picture related to.
        I try to stay tidy in the PSD file with sperated [folder] from [skin] and [slot]🙂 I found it more tidy and understandable like this, but it's personnal I guess 😅

        Davide
        So if I want to have the placeholder name (It's the orange hanger, right ?) to "Body Arm Color 1 Right" only then I have to put the folder in the [skin] ? Like if it was named : [skin:Body/Normal/Normal] > [slot:Body Arm Color 1 Right] > Body Arm Color 1 Right, it would have resulted in only "Body Arm Color 1 Right" for the placeholder ?

        To be honest, I don't understand why it have to take the folders name 🤔 No offense intended, but I don't see where it could be usefull to have the folder name in the placeholder name. I'm quite curious to hear use though, I'm doing animations from less than two years on a indie side, so maybe there's things that I don't know (Actually, no, I'm pretty sure there's a lot of things I don't know 🤣)

        I'm gonna use the old "Photoshop to Spine" script because I actually coded a full program to precreate the folder and rename picture correctly and all boring stuff so my artist can concentrate of drawing more freely. (Actually, the program create a script for photoshop based on the skin and folder asked in the program... well, anyways)
        This way we doesn't have to create and rename all the photoshop layer and all, we just drag and drop layer in the related folder and my second script does everything so that the "Photoshop to Spine" make the magic work perfectly. (By renaming layer using the slot name, mainly)
        Sadly as it doesn't result in the desired placeholder name with your new system, I'll use the old solution, even if it's less performant that your solution.
        Thanks for your hard work though 👍

        • Nate hat auf diesen Beitrag geantwortet.

          We had a lot of internal discussion about this. We need to define a convention to determine the placeholder name automatically. We think the most common usage is to want the [folder]s in the placeholder name. This is what the PS script does, except it ignores [folder]s above the [skin].

          Pentacles The PSD screenshot you showed may just be an example, but it seems to be an unusual way to setup skins and seems to have [folder]s that are ignored by the PS script. I believe these folders in your example are ignored by the PS script because they are above the [skin]:

          Bild entfernt wegen fehlender Unterstützung für HTTPS. | Trotzdem zeigen


          Instead of using the PS script, you can just take out those [folder] tags that the PS script ignores.

          It can make sense to put [folder]s above the skin, so we should support that. It enables a skin to have images elsewhere, in their own folder outside the rest of the skin images, which may be needed if you want to pack those in their own atlas because sometimes you don't want to load them at runtime.

          • Pentacles hat auf diesen Beitrag geantwortet.

            Nate
            I created a mess it seems 😅

            Originally, I was doing it like this to have a tidy PSD file, because I have a lot of skin in the same file.
            So I wanted to have folder to have a tidy view just as in Spine, with all skin in a folder.

            By exemple, I've got all my body skin in the folder Body because there's actually six different kind of body. If there was only those, I wouldn't need the folder Body, but I've also got others skin related to the scene, like clothes, or tattoo... So I've separated them in folder Body, Clothes and Tattoo. This way I don't have to sort visually the skin, I just have to open / close a folder. The same goes for the PSD file, I just have to open / close the group (I believe folder are called group in photoshop)

            Also, I duplicated the skin to folder because before there was subskin that would goes with some body skin (Like a skin for the tail that was different of the original so I splitted them in subskin) so to have a tidier file, I created folder to gather the skin related to the base skin. It's the reason why it' "Body/Normal/Normal/Arm Right" and not just "Body/Normal/Arm Right"

            But I could remove the [folder], but that would mean I would have to create manually in the spine project the folder to tidy the skin. Trough I could probably remove the [folder:Normal] and that would make it work as it would have result in "Body/Body Arm Color 1 Right" for every piece.

            Anyways, I can still use the photoshop to spine script as it work fine, it just take longer to compute and doesn't center the picture, I just wanted to make sure this was intented as it behave differently than the script.

            Sorry if I'm unclear, I'm not english 😅

            6 Tage später
            • Bearbeitet

            re: open standard support sometime in the future, it would be nice if it also supported popular vector art tools such as inkscape and graphite.rs

            Open standards are severely needed now that Canva have acquired Affinity.

            Nate
            Really excited for the ability to directly import PSDs into Spine!

            I have a question re: it though. PSD does not show up as an option for me when I try to import data, just JSON and binary file. Is there a step I'm missing, or is there a reliable way to troubleshoot this issue? I'm on Mac OS and I'm on the latest beta version, if that helps. Additionally, the PSD file is all flattened layers (less than 30), with no hidden layers or anything fancy.

            I'd appreciate any advice; thank you!

            • SnzdIV hat auf diesen Beitrag geantwortet.

              dlcolon It's a separate import option : top left > spine > import PSD

              • dlcolon hat auf diesen Beitrag geantwortet.

                SnzdIV
                Thank you so much! I actually found it after I decided to play around with the file using the tried and true PhotoshoptoSpine script. I guess the beta got jealous and decided to show itself lol

                Yep, we decided it was more visible as its own option rather than overloading Import Data with more stuff.

                It's worth mentioning again a drawback to Import PSD, which is that layer styles need to be rasterized by Photoshop before saving the PSD. If you aren't using Photoshop, other image editors may always do this when writing a PSD.

                Hi, thank you so much for this. I no longer need to keep PS!
                I have a question, does "Use layer mask bounds instead of whitespace trimmed bounds" thing work on the current version of PSD import? Because it seems to me it's ignoring layer masks when trimming, while it's said all the tags are supported. (technically not a tag? but i can't live without it!)
                Again, thank you for this wonderful update!

                Hi Chive!

                The "Use layer mask bounds instead of whitespace trimmed bounds" feature has been implemented, but we've decided to activate it using the tag [trim:mask]. So essentially, for the trim tag, we have the following options:

                • [trim], or [trim:true], or [trim:ws]: trims at whitespaces
                • [trim:false], or [trim:canvas]: trims at canvas
                • [trim:mask]: trims at the layer mask

                However, I've just noticed that currently it doesn't seem to work as expected 😱

                To ensure we're on the same page, could you show me an example of your layers structure and explain the behavior you're expecting?

                Thank you Davide!


                the structure's something like this!

                and then I exported PSD from ClipStudioPaint, tested exporting with:
                ①Photoshop script(Photoshop CC2024)
                ②Spine PSD import of 4.2.61-beta.
                (both are set padding=0)

                the results are: ①trimmed as intended, using masks as bound, ②whitespace trimmed with 0 padding.
                And then I tested exporting without [merge]tag and layer groups, as individual layers with masks, got the same result from ②.

                I didn't know about [trim:mask] tag! thank you for the info. I assumed it'd automatically work as it's been like that as the photoshop plugin.
                I tested again with [trim:mask] tag, but as you said it doesn't seem to work. it's resulted with whitespace trimming.

                Thank you for looking into this!

                The mask value for the trim tag is new, and since we're currently in the process of writing the documentation, you couldn't have known that 😃

                In any case, thanks for pointing this out; it helped us discover a bug! 😅
                I'll let you know as soon as we fix this.

                Thanks! I'll look forward to it!

                • Davide hat auf diesen Beitrag geantwortet.

                  chive

                  We realized that the [trim:mask] tag was working only on layers.
                  We just implemented this feature also for groups.
                  You'll be able to use it in the next beta release (4.2.62-beta) that will probably be ready tomorrow!
                  Let us know then if it works as expected 😃

                  It seems that the adjustment layer does not work. I've tried it with clip studio paint and affinity photo.

                  • Davide hat auf diesen Beitrag geantwortet.

                    Bloss0mx

                    Adjustment layers are not supported yet, and since it will be complex and time-consuming to implement them, I'm sorry to say that it won't happen soon 🙁
                    If you really need them, you can still use the Photoshop to Spine script.

                    May I ask you which Adjustment layers you use more frequently? Since there are a lot, it might be helpful to define a priority among them.

                    • Bloss0mx hat auf diesen Beitrag geantwortet.